Connect / Setup PGAdmin to Immich (postgres) database

I have loaded Immich photo App and I’m now trying to view the database using PGAdmin. I’m unable to connect PGAdmin to the database. Any help would be appreciated.

do you mean how to access the immich database?

psql -d [database-name] -U [username] -W

e.g. default was something this i think
psql -d immich -U postgres -W

had to do this at one point because they wanted us to add an extra table which one of the immich upgrades introduced to the database whcih you had to added manually i think.

if you use portainer or dockge you can enter the shell/bash for that container then procede to add the command. thats how i did it

Not sure when you installed immich, but they changed their docker compose recently, so i had ammend my old docker compose to comply with those changes.

I’m using (or trying to) PgAdmin to access the database. When I Add New Server and connection is where I’m having the issue. I’m not sure of the Host name / address. I set Truenas / Immich up using the defaults and have tried every combo that I can think of. I’ve also used the values suggested by the documentation and I can’t get a connection.

oic what you mean.

well i can’t help you with that since i never used this.

all i can say is how i accessed the immich database was through portainer shell via the UI there. This enters the shell directly for the database for immich, then using the command i logged in, then could proceed to run whatever command in the database. that’s all i know sorry :sweat:

maybe you can try google pgadmin immich database and see if any results pop up. or use AI search which might get you a better result.

for me i setup immich as a docker container using jailmaker on truenas. for networking i setup the bridge with a static ip for the docker.

so when i do jlmkr list in shell for truenas, i can see the static ip for my docker. as for the port, it’s listed in my docker compose what port the db is using.

not sure about yours :sweat_smile:

Solved? Same problem here

Столкнулся с такой же проблемой
Решил проблему подключения к базе данных таким образом:
установил porteiner, далее во вкладке “containers” находим ix-immixh-pgvecto-1, заходим в него, далее кнопка “duplicate/edit”, там “port mapping” окно “host” свой любой свободный порт в локальной сети (у меня 54321 ), а окно “container” порт базы данных (по умолчанию 5432), далее чуть ниже кнопка “deploy the container” выскочит предупреждение , соглашаемся, готово.
Можно подключаться к серверу базы данных по ip host truenas, но предупреждаю в этот момент immich перестанет корректно работать. После перезапуска приложения все вернётся как и было и подключение в pgAdmin разорвется, а immich продолжит работу как и было.
То есть, всё что изменено в portainer будет сброшено на настройки “truenas”

Edit: Translation by Google:
I encountered the same problem
I solved the problem of connecting to the database this way:
installed porteiner, then in the “containers” tab we find ix-immixh-pgvecto-1, we go into it, then the “duplicate/edit” button, there “port mapping” the “host” window is any free port in the local network (I have 54321), and the “container” window is the database port (by default 5432), then just below the “deploy the container” button a warning will pop up, we agree, it’s done.
You can connect to the database server via ip host truenas, but I warn you that at this point immich will stop working correctly. After restarting the application, everything will return to how it was and the connection in pgAdmin will be broken, and immich will continue to work as it was.
That is, everything that is changed in portainer will be reset to the “truenas” settings