Skip to content

Immich: PostgreSQL healthcheck fails due to unescaped $Chksum variable #6035

Description

@GitjoPowershell

Bug

The PostgreSQL healthcheck in the Immich docker-compose.yml uses $Chksum which Docker Compose interprets as an environment variable, replacing it with an empty string before the shell script runs.

This causes the healthcheck to always fail (exit code 1) with output:

checksum failure count is 

(empty value instead of "0"), marking PostgreSQL as unhealthy even though it's running fine. This eventually causes Immich to refuse uploads/backups.

Docker Compose also logs this warning at startup:

level=warning msg="The \"Chksum\" variable is not set. Defaulting to a blank string."

Fix

Escape $Chksum as $$Chksum in the healthcheck command:

- echo "checksum failure count is $Chksum"; [ "$Chksum" = '0' ] || exit 1
+ echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1

File: Apps/immich/docker-compose.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions