© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•9mo ago•
6 replies
Powermachine

Changing the database location

I want to change the database location from the pgdata docker volume to explicitly live in a folder on my server. I first backed up the pgdata volume to an external hard drive to avoid mishaps. I then copied the contents of the pgdata volume to a folder where I want the database to be stored. I then updated the DB_DATA_LOCATION in the .env file to the new path.

I notived however, that in the docker compose file it still says
    volumes:
      - pgdata:/var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data


do I have to change the pgdata: to the new path on my server as well? I checked the docs and it only mentions DB_DATA_LOCATION.
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

Upload location and Database location
ImmichIImmich / help-desk-support
15mo ago
Changing file location afterwards
ImmichIImmich / help-desk-support
4mo ago
Help with changing my storage location
ImmichIImmich / help-desk-support
6mo ago
database location missing after update
ImmichIImmich / help-desk-support
6mo ago