Thomas M
Thomas M
IImmich
Created by Thomas M on 4/26/2025 in #help-desk-support
Problem with Immich Setup on QNAP (Database Error)
Thanks a lot for the explanation! I did create my own minimal docker-compose.yml, based on the official example but adapted for QNAP paths and folders. When I start with docker compose up -d, I get the ECONNREFUSED error several times in the immich-server logs, but the container does not recover automatically and Immich never becomes accessible in the browser. I can see that the database container (immich-db) is running, and it seems healthy.
However, the immich-server container keeps restarting because of the connection issue. Based on your suggestion, maybe a healthcheck on the database would help? Or should I rather add some retry/wait logic to the server startup? Thanks again for your help - I'm learning a lot!
23 replies
IImmich
Created by Thomas M on 4/26/2025 in #help-desk-support
Problem with Immich Setup on QNAP (Database Error)
Quick update based on the progress: After adjusting the permissions (770 + correct owner/group) as discussed, I started a fresh new setup: - Completely cleaned up old containers, volumes, and networks - Created a new docker-compose.yml from scratch - Created the folders /photos and /pgdata freshly with sudo and applied the correct permissions - Volumes are now correctly mounted into the containers Current situation: - All three containers (immich-db, immich-redis, immich-server) are starting - But the immich-server container shows the following error in the logs:
Error: connect ECONNREFUSED 172.29.0.2:5432

Error: connect ECONNREFUSED 172.29.0.2:5432

- It seems that the Immich server is trying to connect to the database before it's fully ready. --- My next thoughts/questions: - Do I need to add a healthcheck or wait-for-it script for the database startup? - Or maybe add depends_on with the correct options for waiting? - Is there something specific about QNAP and volume/database startup timing I should be aware of? --- Thanks a lot for your amazing help so far! πŸ™
I'm ready to continue here as needed πŸš€
23 replies
IImmich
Created by Thomas M on 4/26/2025 in #help-desk-support
Problem with Immich Setup on QNAP (Database Error)
I have created the folders photos and pgdata now using sudo, and I set the permissions according to the recommendation (770 with correct owner/group). Ready to continue.
23 replies
IImmich
Created by Thomas M on 4/26/2025 in #help-desk-support
Problem with Immich Setup on QNAP (Database Error)
βΈ» Good point, thanks! I had reset the permissions to 700 to lock down access temporarily after cleaning up the system. However, I now realize that this prevents the Docker containers (Postgres and Immich) from accessing their volumes properly. I will correct it to: sudo chmod -R 770 /path/to/Immich sudo chown -R admin:everyone /path/to/Immich so that the containers can read/write inside the mounted volumes. Thanks for pointing that out!
23 replies
IImmich
Created by Thomas M on 4/26/2025 in #help-desk-support
Problem with Immich Setup on QNAP (Database Error)
Hi everyone, I am trying to set up Immich from scratch on my QNAP NAS (model TVS-473, 64 GB RAM, AMD RX-421BD CPU) using Docker/Portainer. I had previously attempted a manual installation via Portainer, but I kept encountering database connection errors (TypeError: Cannot read properties of undefined (reading 'replace')). Now, I have fully cleaned my system: β€’ Completely removed Portainer (including the portainer_data volume) β€’ Deleted all Immich containers, images, networks, and volumes β€’ Cleared the Immich folder on my NAS β€’ Reset the file permissions to admin-only (chmod 700) Current situation: I would like to reinstall Immich correctly with a clean docker-compose.yml setup that fits my environment and QNAP configuration. I have reviewed the checklist: β€’ βœ… Latest release verified β€’ βœ… Release notes checked β€’ βœ… FAQ and GitHub issues reviewed β€’ βœ… Attempted local access without reverse proxy β€’ βœ… Troubleshooting with incognito mode, extensions disabled, cache cleared β€’ βœ… Full logs available if needed System details: β€’ QNAP NAS TVS-473, AMD RX-421BD, 64 GB RAM β€’ QTS version 5.2.3.3006 β€’ Storage: Standard encrypted volume β€’ Docker CE, trying with Portainer CE I would really appreciate if someone could guide me through the proper setup, or provide a clean, working docker-compose.yml example that is known to work well with QNAP. Thank you so much in advance for any support!
23 replies