ScaleTail icon indicating copy to clipboard operation
ScaleTail copied to clipboard

🐞 Bug: Immich - Changing UPLOAD_LOCATION in .env has no effect on where files are stored

Open grovesjosephn opened this issue 5 months ago • 1 comments

Bug Description: I have a NAS with 2 storage pools and wanted to store my Immich library on the second pool. I changed UPLOAD_LOCATION in the .env file to point to a path on that pool, but Immich kept writing to the default ./immich-data/upload directory instead. The env var seems to be ignored.

Expected Behavior: Setting UPLOAD_LOCATION in .env should control where uploads are stored.

Actual Behavior: No matter what I set UPLOAD_LOCATION to, data always ends up in ./immich-data/upload.

grovesjosephn avatar Jun 08 '26 23:06 grovesjosephn

I am a beginner to this, so I only discovered this while trying to set it up myself. The Immich compose.yaml file contains the following lines:

   volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ./${SERVICE}-data/upload:/data
      - /etc/localtime:/etc/localtime:ro

If I understand correctly, this would set the data folder to ./${SERVICE}-data/upload independently of ${UPLOAD_LOCATION}. Comparing this with the official Immich docker-compose.yml, which reads:

    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      - /etc/localtime:/etc/localtime:ro

I believe the solution is just to write ${UPLOAD_LOCATION}:/data instead of ./${SERVICE}-data/upload:/data in the volume declaration.

Based on this, I would guess the same issue appears for the database location as well. I think the compose.yml should read ${DB_DATA_LOCATION}: instead of ./${SERVICE}-data/database: at the very end.

stefano-ronchi avatar Jun 27 '26 14:06 stefano-ronchi