Immich: make UPLOAD_LOCATION and DB_DATA_LOCATION take effect - #355
Merged
Merged
Conversation
The compose file mounted fixed ./${SERVICE}-data paths, so the two
storage variables in .env were never read. Changing UPLOAD_LOCATION had
no effect on where Immich stored media.
- compose.yaml: mount ${UPLOAD_LOCATION} and ${DB_DATA_LOCATION}, as the
upstream compose file does.
- .env: set the defaults to the folders the stack used so far, so a
default installation keeps its data in place.
- README: document both variables and tell existing users to replace
the old ./library and ./postgres values before restarting.
crypt0rr
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #310.
What changed
compose.yaml: the media and database mounts now use${UPLOAD_LOCATION}and${DB_DATA_LOCATION}, as the upstream Immich compose file does..env: the defaults are now./${SERVICE}-data/uploadand./${SERVICE}-data/database. These are the folders the stack used so far, so a default installation keeps its data in place.README.md: two new usage notes. One explains the storage variables, the other tells existing users what to check before they restart.Why
Issue #310 reports that changing
UPLOAD_LOCATIONin.envhas no effect. The compose file mounted fixed./${SERVICE}-data/...paths and never read either variable, while the comment above each mount said to change the location in.env.DB_DATA_LOCATIONhad the same problem, so this fixes both.Upgrade note
The old
.envdefaults were./libraryand./postgres. They were ignored before and take effect now. Agit pullmerges the new defaults in. Anyone who updatescompose.yamlbut keeps an older.envmust replace those two values first. Otherwise Immich starts with an empty library and a new database. The existing files stay untouched in./immich-data. The README covers this.Testing
Tested on Docker 29.8.2 with a test node in a Tailnet,
SERVICE=immich-test-310:./immich-test-310-data/, andhttps://<node>.<tailnet>.ts.net/api/server/pinganswered{"res":"pong"}.model-cache, and the ping answeredpong.docker compose configresolves the default mounts to the same host paths asmain.docker compose config --quiet,rumdl check, andgit diff --checkpass.Not tested: updating an existing installation that already holds photos. Both runs started from an empty stack.