Error: no pg_hba.conf entry for host "172.19.0.4", user "postgres", database "immich", no encryption
Hi, I am trying to setup immich through portainer and received this error on the logs. I was following the official immich guide for portainer. I used the exact docker-compose.yml and .env files from the github except I changed all of the ".env" to "stack.env" on the .yml file, and I changed the backup location to a location on my machine. When I try to visit the webpage where the server is supposed to have the login page, it says 500 | connect ECONNREFUSED 172.19.0.5:3001. immich_microservices is on 172.19.0.4 if that helps. Thanks
34 Replies
try to bring down the stack and then bring them back up again
And/or send us the immich server container logs
Ok, thanks
Ok, bringing it down and back up again didn't work. I'll send the logs now
this means the typesense container is still bringing itself up, indexing the assets
and it doesn't relate to database error message afaik
oh okay
It seems to keep running through this though
It says retrying but then fails
yeah it might take a few retry
According to portainer immich_typesense has been running for 8 minutes
So I would think that it should have indexed by now?
it should, is the server still restarting?
How many assets do you have?
No, everything is running
I have about 20K of assets and it takes about 20 seconds to complete start up
Nothing is backed up yet. Is that what you mean?
yep
Can you try accessing the web now?
I'm still getting the same errors
Can you take a screenshot of your setup?
If it makes a difference I'm running this locally
just to double check on things
Yes
Which part do you want a screenshot of?
gotta run now, will cycle back and take a look later
docker-compose and .env
Ok will do

I believe this error is a TypeOrmModule error, and it is related to being unable to connect to the database.
Do you have any advice on how to troubleshoot this?
This is a brand new installation?
Yes
I would try to stop and remove the database container, then delete the database volume, then start the stack again.
I would just stop/remove the stack, then make sure the volume
pgdata
is deleted, then start the stack again.Ok I'll try that
You normally don't want to delete
pgdata
as that is your database and all your metadata about your photos, but since it is a new install it should be fine to clear it and try again. Don't normally do that to try to "fix" something though 😄Ok haha
When you say remote the database container, are you referring to immich_server?
The postgres one
Ah okay
"server" -> "immich_server"
"microservices" -> "immich_microservices"
"database" -> "immich_postgres"
Ok, that makes sense. Thanks
That worked. Thank you so much