Hello. Had a working instance. Upgrading from 1.123 to 1.137. Updated the docker-compose file with the new db image. Restarted, and DB wouldn't start. Inifinite restart loop with: 2026-01-18 13:38:28 Using HDD storage 2026-01-18 13:38:29 The files belonging to this database system will be owned by user "postgres". 2026-01-18 13:38:29 This user must also own the server process. 2026-01-18 13:38:29 2026-01-18 13:38:29 The database cluster will be initialized with locale "en_US.utf8". 2026-01-18 13:38:29 The default database encoding has accordingly been set to "UTF8". 2026-01-18 13:38:29 The default text search configuration will be set to "english". 2026-01-18 13:38:29 2026-01-18 13:38:29 Data page checksums are enabled. 2026-01-18 13:38:29 2026-01-18 13:38:29 initdb: error: directory "/var/lib/postgresql/data" exists but is not empty 2026-01-18 13:38:29 If you want to create a new database system, either remove or empty 2026-01-18 13:38:29 the directory "/var/lib/postgresql/data" or run initdb 2026-01-18 13:38:29 with an argument other than "/var/lib/postgresql/data".
My .env file:
UPLOAD_LOCATION=./Data
DB_DATA_LOCATION=./Database
Bottom of docker compose:
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
DB_STORAGE_TYPE: 'HDD'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache:
pgdata:
external: true
Please help.
.