I
Immich3d ago
Wopske

External NFS share (Synology) cannot be accessed by Immich docker container (read/write checks fail)

Good morning! I have used Immich for a while but I'm running out of storage. So now i want to use a NFS share that have exposed from my Synology NAS as my UPLOAD_LOCATION. I have been trying this for a while now but i keep running into the same problem and I hope that one of you guys might now the answer! I currently have the postgres container running on my Synology NAS and I think that is working as it should. What i've done: 1. I have made a Shared Folder on my NAS called immich which contains the folder library. See photo 1 2. I have given the user admin Full control of the immich share. See photo 2 3. I have enabled NFS on my Synology. See photo 3 4. I have given my server on which i want Immich to run permission to access the NFS share. See photo 4 5. I have mounted the NFS share to my server: sudo mount -t nfs 192.168.50.107:volume1/immich /mnt/immich storage/ The mounted share has the following permissions: /mnt$ ls -l drwxrwxrwx 1 root root 42 Apr 26 10:41 immich-storage I have made a directory called library in this share. 6. I have altered my .env file to the following:
/immich.app/docs/install/environment-variables
UPLOAD_LOCATION=/mnt/immich-storage/library
IMMICH_VERSION=release
DB_HOSTNAME=192.168.50.107
DB_PORT=2266
DB_USERNAME=postgres
DB_PASSWORD=REDACTED
DB_DATABASE_NAME=immich
/immich.app/docs/install/environment-variables
UPLOAD_LOCATION=/mnt/immich-storage/library
IMMICH_VERSION=release
DB_HOSTNAME=192.168.50.107
DB_PORT=2266
DB_USERNAME=postgres
DB_PASSWORD=REDACTED
DB_DATABASE_NAME=immich
-- END OF PART 1 --
No description
No description
No description
No description
11 Replies
Immich
Immich3d ago
:wave: Hey @Wopske, Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA Checklist I have... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable (an item can be marked as "complete" by reacting with the appropriate number) Information In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider: - Your docker-compose.yml and .env files. - Logs from all the containers and their status (see above). - All the troubleshooting steps you've tried so far. - Any recent changes you've made to Immich or your system. - Details about your system (both software/OS and hardware). - Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h). - The version of the Immich server, mobile app, and other relevant pieces. - Any other information that you think might be relevant. Please paste files and logs with proper code formatting, and especially avoid blurry screenshots. Without the right information we can't work out what the problem is. Help us help you ;) If this ticket can be closed you can use the /close command, and re-open it later if needed.
Wopske
WopskeOP3d ago
-- PART 2 --- 6. I have altered my docker-compose.yaml to the following:
name: immich

services:
immich-server:
user: "0:0"
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
restart: always
healthcheck:
disable: false

immich-machine-learning:
user: "0:0"
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
healthcheck:
disable: false

redis:
user: "0:0"
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1
healthcheck:
test: redis-cli ping || exit 1
restart: always

volumes:
model-cache:
name: immich

services:
immich-server:
user: "0:0"
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
restart: always
healthcheck:
disable: false

immich-machine-learning:
user: "0:0"
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
healthcheck:
disable: false

redis:
user: "0:0"
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1
healthcheck:
test: redis-cli ping || exit 1
restart: always

volumes:
model-cache:
As you can see i have tried to fiddle with the user value as i thought maybe the docker container would have the right amount of rights. But it doens't work. This is the output i get when i start the container
[Nest] 7 - 04/26/2025, 9:31:53 AM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
immich_server | [Nest] 7 - 04/26/2025, 9:31:53 AM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
[Nest] 7 - 04/26/2025, 9:31:53 AM LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
immich_server | [Nest] 7 - 04/26/2025, 9:31:53 AM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
I have tried to follow the instructions that were linked in the error message but it did not help. When i create the necessary folders myself including the .immich files it works but I have read that that is not a smart thing to do. I think i have given all the information that I can. Do any of you guys know why Immich cannot create or read the files from my NAS? Thank you very much in advance! Oh yes and one more thing, when i start up the container NO files or folders where added to my share. To me that indicates that, at least, a write permission is missing.
Immich
Immich3d ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
bo0tzz
bo0tzz3d ago
Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
It's not a permission issue, it's looking for a file that doesn't exist https://immich.app/docs/administration/system-integrity
Wopske
WopskeOP3d ago
Hey! Thank you for the reply. Am I supposed to create the right folders myself? Currently I have it pointing only to the library directory.
NoMachine
NoMachine3d ago
you are supposed to move your previous library, including all files, since you already have a running instance
Wopske
WopskeOP3d ago
Ah okay. What I'm trying here to do here is a clean install. I thought I should first get it working using my NFS share before exporting my current library.
NoMachine
NoMachine3d ago
are you reusing your postgres instance?
Wopske
WopskeOP3d ago
It is new but was used briefly when i put all the folders that where needed by hand including the .immich files. When i did that the container did start up.
NoMachine
NoMachine3d ago
the .immich file checking is just a safe measure. immich will create the folder structure automatically during installation. if for some reason the DB is already initialized and you made changes to UPLOAD_LOCATION it will fail with this error. you can create the folder structure by hand if you are sure everything is ok. or remove the DB and start over
Wopske
WopskeOP3d ago
Okay i will remove the db and reinstall and deploy You are right, that was the issue. Thank you guys very much!

Did you find this page helpful?