© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•2mo ago•
21 replies
Explorator000

Immich gallery empty after restart

Hi everyone, I'm new here.

I'm running Immich on ZimaOS on my NAS.

After restarting the container, which wasn't working properly, I reinstalled Immich using the same Docker Compose and environment configuration, but it doesn't work as expected: my gallery is empty, even though the /library folder is full of images.

I've looked at the documentation here: https://docs.immich.app/administration/backup-and-restore, which says I should run these commands:

docker compose down -v  # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull             # Update to latest version of Immich (if desired)
docker compose create           # Create Docker containers for Immich apps without running them
docker start immich_postgres    # Start Postgres server
sleep 10                        # Wait for Postgres server to start up
# Check the database user if you deviated from the default
# Replace <DB_USERNAME> with the database username - usually postgres unless you have changed it.
gunzip --stdout "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --dbname=postgres --username=<DB_USERNAME>  # Restore Backup
docker compose up -d            # Start remainder of Immich apps
docker compose down -v  # CAUTION! Deletes all Immich data to start from scratch
## Uncomment the next line and replace DB_DATA_LOCATION with your Postgres path to permanently reset the Postgres database
# rm -rf DB_DATA_LOCATION # CAUTION! Deletes all Immich data to start from scratch
docker compose pull             # Update to latest version of Immich (if desired)
docker compose create           # Create Docker containers for Immich apps without running them
docker start immich_postgres    # Start Postgres server
sleep 10                        # Wait for Postgres server to start up
# Check the database user if you deviated from the default
# Replace <DB_USERNAME> with the database username - usually postgres unless you have changed it.
gunzip --stdout "/path/to/backup/dump.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i immich_postgres psql --dbname=postgres --username=<DB_USERNAME>  # Restore Backup
docker compose up -d            # Start remainder of Immich apps

But I'm scared of deleting all the data.

Besides, I don't even know where to run these commands because I don't know where ZimaOS stores the Docker images.

Can someone help me get my photos back in the gallery? Any help would be much appreciated!
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Infinite Immich restart
ImmichIImmich / help-desk-support
3w ago
Immich fails to restart after server shutdown / reboot.
ImmichIImmich / help-desk-support
2mo ago
Unable to start Immich after Docker restart or update
ImmichIImmich / help-desk-support
13mo ago
Immich always reset at restart
ImmichIImmich / help-desk-support
3mo ago