#Moved STORAGE_LOCATION in .env, "Failed to read (/data/encoded-video/.immich)" and stuck in restart

1 messages · Page 1 of 1 (latest)

drifting fable
#

I've looked at similar issues, discussions, and threads here, and haven't found a solution specific enough to my particular setup that i would feel safe attempting, so i figure asking is my best bet.

PROBLEM
I have had immich set up for 3 weeks at this point, and have successfully uploaded and sorted about 8,000 photos and videos without issue. i've added an HDD to my server that's hosting the immich container, and want to move my uploads folder to the HDD, leaving everything else on the SATA SSD.

I have changed only the .env file, and it was changed from /home/user/immiches to "/media/user/server hdd/immich" (put in quotations due to the space)

i checked the docker-compose file, and it has that line about just changing the .env instead of altering itself, so i made no changes to it.

i opened my terminal from the folder on my /home partition containing the .env and compose files and ran docker compose up -d, the containers gave me green checks on all 4, but the logs for immich_server show it in a restart loop failing to run its initial checks due to missing files.

SYSTEM + IMMICH INFO
OS: Debian 13, amd64
INSTALL: Docker Compose through Docker CLI
VERSION: v2.7.5

(messages with env, compose, and log contents to follow, character limit)

lean houndBOT
#

:wave: Hey @drifting fable,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

drifting fable
#

.ENV CONTENTS:


# The location where your uploaded files are stored
UPLOAD_LOCATION="/media/user/server hdd/immich"

# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=America/Chicago

# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=v2

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=**************

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=**********

DOCKER-COMPOSE.YML CONTENT:

# WARNING: To install Immich, follow our guide: https://docs.immich.app/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    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
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:9@sha256:3b55fbaa0cd93cf0d9d961f405e4dfcc70efe325e2d84da207a0a8e6d8fde4f9
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    shm_size: 128mb
    restart: always
    healthcheck:
      disable: false

volumes:
  model-cache:
#

RELEVANT LOG OUTPUT:

Detected CPU Cores: 4
(node:7) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Starting api worker
Starting microservices worker
(node:7) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:WebsocketRepository] Initialized websocket server
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for clip_index of 8207 rows
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseRepository] targetLists=1, current=1 for face_index of 2198 rows
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseRepository] Running migrations
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseRepository] Finished running migrations
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseService] Checking for schema drift
[Nest] 25  - 06/06/2026, 2:53:21 AM     LOG [Api:WebsocketRepository] Initialized websocket server
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:DatabaseService] No schema drift detected
[Nest] 7  - 06/06/2026, 2:53:21 AM     LOG [Microservices:StorageService] Verifying system mount folder checks, current state: {"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}}
[Nest] 7  - 06/06/2026, 2:53:21 AM   ERROR [Microservices:StorageService] Failed to read (/data/encoded-video/.immich): Error: ENOENT: no such file or directory, open '/data/encoded-video/.immich'
microservices worker error: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read: "<UPLOAD_LOCATION>/encoded-video/.immich (/data/encoded-video/.immich) - Please see https://docs.immich.app/administration/system-integrity#folder-checks for more information."
    at StorageService.verifyReadAccess (/usr/src/app/server/dist/services/storage.service.js:130:19)
    at async /usr/src/app/server/dist/services/storage.service.js:57:21
    at async /usr/src/app/server/dist/repositories/database.repository.js:392:27
    at async /usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/kysely.js:541:20
    at async DefaultConnectionProvider.provideConnection (/usr/src/app/server/node_modules/.pnpm/[email protected]/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
    at async /usr/src/app/server/dist/repositories/database.repository.js:389:13
microservices worker exited with code 1
Killing api process
#

im happy to provide logs for the other 3 containers if needed!

bitter granite
#

You need to move the files to the new path

drifting fable
#

and my storage used hasnt gone down, so i wouldnt think that they're wiped or anything

bitter granite
#

That sounds like something is wrong

#

If you undo the changes in the .env does immich start?

drifting fable
#

i hadnt tried that for fear it would make it worse somehow. ill do that real quick and let you know

drifting fable
bitter granite
#

Alright, so next it's time to figure out where the files actually are and why you aren't seeing them when you open the original path

drifting fable
#

...i realized why i couldnt find the files 😑

#

i set the path as /home/Immiches, and was looking for them at /home/user/Immiches

#

the actual path does indeed have stuff in it

#

so i just bring the server down, copy all the contents to the new directory, change the env, docker compose up -d?

bitter granite
#

That should do it yeah

drifting fable
#

YEAAHHH it works!!

#

god thats a real PEBKAC moment. happens to the best of us