|
2 | 2 | title: Errors when uploading icons |
3 | 3 | --- |
4 | 4 |
|
| 5 | +There are two common causes for icon and image upload problems when authentik uses local file storage. |
| 6 | + |
| 7 | +## 1. Permissions problems |
| 8 | + |
5 | 9 | :::info |
6 | | -This is specific to the Docker Compose installation. If you're running into issues on Kubernetes, please open a GitHub issue. |
| 10 | +This section applies to Docker Compose and other deployments that use bind mounts, where host filesystem permissions determine whether authentik can write to the mounted data directory. |
7 | 11 | ::: |
8 | 12 |
|
9 | 13 | This issue is most likely caused by permissions. Docker creates bound volumes as root, but the authentik processes do not run as root. |
10 | 14 |
|
11 | 15 | This will cause issues with icon uploads (for Applications), background uploads (for Flows) and local backups. |
12 | 16 |
|
13 | | -To fix these issues, run these commands in the folder of your Docker Compose file: |
| 17 | +For Docker Compose, run these commands in the directory of your Compose file: |
14 | 18 |
|
15 | 19 | ```shell |
16 | 20 | sudo chown 1000:1000 data/ |
17 | 21 | sudo chown 1000:1000 custom-templates/ |
18 | 22 | sudo chmod ug+rwx data/ |
19 | 23 | sudo chmod ug+rx certs/ |
20 | 24 | ``` |
| 25 | + |
| 26 | +Alternatively, If you are using Kubernetes, ensure that the volume mounted at `/data` is writable by the authentik container. |
| 27 | + |
| 28 | +## 2. Legacy `/media` mounts after upgrading |
| 29 | + |
| 30 | +If you upgraded from an older release and existing files still appear, but the upload controls are missing in **Customization** > **Files**, or you cannot upload new files, check your local storage mount path. |
| 31 | + |
| 32 | +Current authentik versions expect local file storage at `/data`, with media files stored under `/data/media`. A legacy mount to `/media` will still allow older files to be read through compatibility handling, while preventing new uploads and file management. |
| 33 | + |
| 34 | +Update your deployment to use the current storage layout. |
| 35 | + |
| 36 | +Examples: |
| 37 | + |
| 38 | +```yaml |
| 39 | +# Docker Compose |
| 40 | +volumes: |
| 41 | + - ./data:/data |
| 42 | + - ./data/custom-templates:/templates |
| 43 | +``` |
| 44 | +
|
| 45 | +For Kubernetes deployments, mount your persistent storage at `/data` instead of `/media`. |
| 46 | + |
| 47 | +If you previously stored files under a path mounted to `/media`, move that data so it is available under `/data/media` inside the authentik container. |
0 commit comments