Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Immich, PostgreSQL_Immich and NGNIX Proxy Manager

Featured Replies

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):

Screenshoton17_07.2024at19.59@2x.thumb.png.bd26bf4e533556165e624726f5161639.png

 

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.

  • 1 month later...

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.

 

 

  • 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. 

  • 4 months later...

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

  • 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

image.png.31f69f766051a3768ae6ae42c5e6f2d4.png

 

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:
image.png.0a2f41e68dc2c009bb2bd219024d13ef.png

 

for security you should change the password.
image.png.6601edbff262e832698c6219f3e6e9b4.png
 

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

image.png.818fa5f066396e32dd2b5d16cc4585f8.png

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:

image.png.55cc2a0496674aedda6c629c068edfaa.png

 

Information on that is inside Additional Requirements: within the template.
you will need to add unraids IP to the postgress line:

image.png.2f016ffe727d2625baa1c36d321ee55d.png


If you changed the password make sure the password matches here:
image.png.8b619d5934e553112f48cdf85bf6c460.png

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:

image.png.f7fd4affe42d8c51a322f6354e2ecc1d.png

 

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:

 

  • 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:

image.png.e8c1c97af71e9be8ec7df6aa85b46621.png

Edited by bmartino1
data - typo

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 by Klench

  • 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

image.png.5e984593501aca37d5b4c700e8bf070f.png

 

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 by bmartino1

  • 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

image.thumb.png.c622c811edb161e4c46d59b559fb5ea2.png

 

you can copy that and make/ use coposerize to convert your immich docker into a docker compose

https://www.composerize.com/

 

 

Edited by bmartino1
data - typo

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

image.png.5e984593501aca37d5b4c700e8bf070f.png

 

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

image.thumb.png.c622c811edb161e4c46d59b559fb5ea2.png

 

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.