July 17, 20241 yr I've got Immich, PostgreSQL_Immich (spaceinvaderone's image) and NGNIX Proxy Manager all installed via Apps on my UNRAID server. My router is configured to port forward 80 and 443 to my NPM docker image (10.0.3.254). For the life of me, I can't work out the correct way to get these to all talk to each other in terms of network config. On some occasions, I can get Immich to be able to connect to the DB, but then NPM refuses to see it, and othertimes the other way around. I've tried having them all on custom br0 with their own IPs, but Immich (10.0.3.17) refuses to connect to the DB (10.0.3.18): I've put Immich and the DB on the 'Bridge' network type and changed the config so that it uses the 172.17.0.x address for the DB (Immich IP then becomes 10.0.3.1:8080) which work, but then NPM behind Cloudflare gives me the 502 error. Can someone please help me with this and guide me on what the best way to set all of these up is please? Thank you.
August 19, 20241 yr Did you happen to to figure this out? I'm trying to something similar but without the NPM. I'm using cloudflare tunnel to access immich from the Wan side and I'd like to be able to use the same URL on the LAN side with split DNS through pi hole. I need immich to have its own IP address on the LAN network to do that so the bridge network is out.
August 19, 20241 yr Author 4 hours ago, Dijk21 said: Did you happen to to figure this out? I'm trying to something similar but without the NPM. I'm using cloudflare tunnel to access immich from the Wan side and I'd like to be able to use the same URL on the LAN side with split DNS through pi hole. I need immich to have its own IP address on the LAN network to do that so the bridge network is out. Unfortunately not. The only other thing I thought of trying, but I haven’t gotten around to yet, is installing NPM on another device and pointing it at the Immich container’s LAN IP.
January 6, 20251 yr I believe I am somewhat in same situation. I have tried Nginx Proxy with Cloud Flare tunnel at the back and failed to get it working. I am not good with networking but some how it's working fine if I remove Nginx Proxy and let cloudflare tunnel call directly to Immich Server. It's probably due to my own ignorance but so far I haven't found any guide which can help me doing this successfully or help me resolve the issues I am having. I don't want to do any changes in my router settings. Internet --> Cloudflare tunnel--> Nginx --> Immich
January 6, 20251 yr Community Expert imichi offical documentation want unraid to use a docker compose. docker compose plugin: https://immich.app/docs/install/unraid/ *while i was able to get this to work i found it easier to due cuda/machien learnign with the CA... As Space invader setup these 2 docker in Unriads CA... it can be a bit trickey to weed through it all. As it appears ther was a setup step missing and your redis database / postgress database is not talking or working as intended... So lets double check your docker settings for immich and the postgress for immichi... it is recommend to install the postgress v16 immichi database as it will be pre-set for immichi for this docker it Should run as Docker network host. the only path that should be edited is where teh database physical files will be stored on unraid: for security you should change the password. Now on to immichi In my case i installed the cuda one as i have a nvdia gcard and want the machine learning face detection... This docker network should be set to a custom ip I had to add a extra parmerter to confirm and gurantee the nvdia device inside the docker: --runtime=nvidia --hostname immich.home.arpa --device=/dev/dri:/dev/dri It is also recommend to add the docker mod and use redis inside this docker. add 2 addition variables not found in the default template: Information on that is inside Additional Requirements: within the template. you will need to add unraids IP to the postgress line: If you changed the password make sure the password matches here: the template is prefilled with the other defaults. do not change them. if using the docker mod option, leave the redis info alone and password blank: Thats it. install postgress docker first. then chose the immich verison you want. watch immich tags. ghcr.io/imagegenius/immich:latest more info in video:
January 6, 20251 yr Community Expert once Postgres is set to unriad docker host netowrk, it will be at unraids ip address. then immich as it has its own IP on the lan... You can then use nginx... npm to setup the reverse proxy to imichi ip address. you may also need addition unraid docker setting enabled: Edited January 6, 20251 yr by bmartino1 data - typo
January 13, 20251 yr Sorry if I am hijacking this thread. I updated PostgreSQL_Immich from pg16-v0.2.0 to pg16-v0.3.0 (because I am stupid) but it made Immich stop working. I tried to revert back to v0.2.0 but the log now states the following: PostgreSQL Database directory appears to contain a database; Skipping initialization What can I do? Edited January 13, 20251 yr by Klench
January 13, 20251 yr Community Expert immich makes backups of its database. By trying to move out of Postgres, you changed and edited the database structure and files. You will need to console into the Postgres database and run commands to restore a backup. For my current Setup, I'm running Unraids CA of immich: As of writing: postgress_imich docker repo: tensorchord/pgvecto-rs:pg16-v0.3.0 immichi repo: ghcr.io/imagegenius/immich As you will need to stop both and potential resetup maintaining some data and paths. But due to the errors, your database needs remade. we will need to delete the postgress appdata folder and have Postgres remake its database: Example docker data paths: My paths are different as i told them to be stored else where defuatl is /mnt/user/appdata root@BMM-Unraid:/mnt/user/Dockers/PostgreSQL_Immich# ls PG_VERSION global/ pg_dynshmem/ pg_logical/ pg_replslot/ pg_stat/ pg_tblspc/ pg_wal/ postgresql.conf base/ log/ pg_hba.conf pg_multixact/ pg_serial/ pg_stat_tmp/ pg_twophase/ pg_xact/ postmaster.opts current_logfiles pg_commit_ts/ pg_ident.conf pg_notify/ pg_snapshots/ pg_subtrans/ pg_vectors/ postgresql.auto.conf postmaster.pid root@BMM-Unraid:/mnt/user/Dockers/PostgreSQL_Immich# root@BMM-Unraid:/mnt/user/Dockers/immich# ls config/ libaries/ photos/ root@BMM-Unraid:/mnt/user/Dockers/immich# and then cd into immichi and restore a sql backup. This should be located under your appdatafolder located in immich/photos/backups then review postgress commands to restore that file from backup after making the lattest postgress docker formthe repo you want. Review doc: https://immich.app/docs/administration/backup-and-restore/ Edited January 13, 20251 yr by bmartino1
January 13, 20251 yr Community Expert 50 minutes ago, Klench said: Sorry if I am hijacking this thread. I updated PostgreSQL_Immich from pg16-v0.2.0 to pg16-v0.3.0 (because I am stupid) but it made Immich stop working. I tried to revert back to v0.2.0 but the log now states the following: PostgreSQL Database directory appears to contain a database; Skipping initialization What can I do? That is a normal to see as a postgress DB has bee created already. also see docs: https://immich.app/docs/administration/postgres-standalone/ Maintainers Unraid install: https://immich.app/docs/install/unraid it is easier to move to docker compose after getting unraids dockers working. Doc may refer to editing a compose file.... So remember that the maintainer now wants this stack as a compose file. So immich docs may be a bit advanced... when you click apply after editing a template you have a docker run cli you can copy that and make/ use coposerize to convert your immich docker into a docker compose https://www.composerize.com/ Edited January 13, 20251 yr by bmartino1 data - typo
January 17, 20251 yr On 1/13/2025 at 11:47 PM, bmartino1 said: immich makes backups of its database. By trying to move out of Postgres, you changed and edited the database structure and files. You will need to console into the Postgres database and run commands to restore a backup. For my current Setup, I'm running Unraids CA of immich: As of writing: postgress_imich docker repo: tensorchord/pgvecto-rs:pg16-v0.3.0 immichi repo: ghcr.io/imagegenius/immich As you will need to stop both and potential resetup maintaining some data and paths. But due to the errors, your database needs remade. we will need to delete the postgress appdata folder and have Postgres remake its database: Example docker data paths: My paths are different as i told them to be stored else where defuatl is /mnt/user/appdata root@BMM-Unraid:/mnt/user/Dockers/PostgreSQL_Immich# ls PG_VERSION global/ pg_dynshmem/ pg_logical/ pg_replslot/ pg_stat/ pg_tblspc/ pg_wal/ postgresql.conf base/ log/ pg_hba.conf pg_multixact/ pg_serial/ pg_stat_tmp/ pg_twophase/ pg_xact/ postmaster.opts current_logfiles pg_commit_ts/ pg_ident.conf pg_notify/ pg_snapshots/ pg_subtrans/ pg_vectors/ postgresql.auto.conf postmaster.pid root@BMM-Unraid:/mnt/user/Dockers/PostgreSQL_Immich# root@BMM-Unraid:/mnt/user/Dockers/immich# ls config/ libaries/ photos/ root@BMM-Unraid:/mnt/user/Dockers/immich# and then cd into immichi and restore a sql backup. This should be located under your appdatafolder located in immich/photos/backups then review postgress commands to restore that file from backup after making the lattest postgress docker formthe repo you want. Review doc: https://immich.app/docs/administration/backup-and-restore/ On 1/13/2025 at 11:53 PM, bmartino1 said: That is a normal to see as a postgress DB has bee created already. also see docs: https://immich.app/docs/administration/postgres-standalone/ Maintainers Unraid install: https://immich.app/docs/install/unraid it is easier to move to docker compose after getting unraids dockers working. Doc may refer to editing a compose file.... So remember that the maintainer now wants this stack as a compose file. So immich docs may be a bit advanced... when you click apply after editing a template you have a docker run cli you can copy that and make/ use coposerize to convert your immich docker into a docker compose https://www.composerize.com/ Thank you! You pushed me in the right direction. I managed to restore the database by following the Immich docs. I deleted the contents in the 'appdata/PostgreSQL_Immich' directory and then restored from database backup by running the command stated in the documentation.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.