Hello,
My Immich is working well with 'docker compose' but not with 'stacks' under portainer.
issue is not my environnement set with password. Tested with : sql -U postgres -h 172.18.0.3
Working well but unsecured with : 'host all all all trust' under 'pg_hba.conf'
error :
Using SSD storage PostgreSQL Database directory appears to contain a database; Skipping initialization 2025-11-16 14:32:57.374 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" 2025-11-16 14:32:57.374 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf" 2025-11-16 14:32:57.401 UTC [1] LOG: starting PostgreSQL 14.19 (Debian 14.19-1.pgdg12+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14+deb12u1) 12.2.0, 64-bit 2025-11-16 14:32:57.401 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2025-11-16 14:32:57.402 UTC [1] LOG: listening on IPv6 address "::", port 5432 2025-11-16 14:32:57.404 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-11-16 14:32:57.407 UTC [32] LOG: database system was shut down at 2025-11-16 14:32:14 UTC 2025-11-16 14:32:57.413 UTC [1] LOG: database system is ready to accept connections 2025-11-16 14:33:01.511 UTC [42] FATAL: password authentication failed for user "postgres" 2025-11-16 14:33:01.511 UTC [42] DETAIL: Connection matched pg_hba.conf line 100: "host all all all scram-sha-256" 2025-11-16 1Connection matched pg_hba
conf data base : database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
DB_STORAGE_TYPE: 'HDD'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
restart: always
networks:
- backend