#Setting up Immich primary server – fails to create .immich markers in storage folders

1 messages · Page 1 of 1 (latest)

limpid brook
#

Hi you lovely people,

I'm currently setting up Immich for the first time. My goal is to use a remote server for transcoding and ML processing, while the primary server should host the web UI and manage the photo/video library.

At the moment, I'm preparing the main server (API + DB + Redis).
Storage is a fresh ZFS dataset on Unraid (/mnt/zfs/immich bind-mounted to /usr/src/app/upload).

I manually created the required folders (encoded-video, thumbs, library, etc.) with full permissions (chmod 777), but Immich still fails to create the .immich marker files on startup.

I’ve set IMMICH_IGNORE_MOUNT_CHECK_ERRORS=true – but still getting errors like:

Failed to read upload/encoded-video/.immich: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
WARN [Api:StorageService] Ignoring mount folder errors

The API server starts (web UI works), but no processing happens – and the marker files are not created.

My questions:

  • Is Immich supposed to generate .immich marker files automatically on a fresh setup?
  • Or do I need to manually create empty .immich files inside each folder?
  • What's the correct approach to initialize storage folders for a new primary server?

Thanks in advance for your help.

My .env is in the screenshot.

thank you in advance!!

grizzled radishBOT
#

:wave: Hey @limpid brook,

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.

limpid brook
#

And here is my compose file


services:
  immich-server:

    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    volumes:
      - /mnt/zfs/immich:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "2283:2283"
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:2283/server-info"]
      interval: 30s
      timeout: 5s
      retries: 5

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping || exit 1"]
      interval: 30s
      timeout: 3s
      retries: 5
    restart: always
    # Remote-Worker braucht Zugriff → Port öffnen
    ports:
      - "16379:6379"

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
    env_file:
      - stack.env
    volumes:
      - /mnt/cache/appdata/immich/postgres:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d immich || exit 1"]
      interval: 30s
      timeout: 5s
      retries: 5
    # Remote-Worker braucht Zugriff → Port öffnen
    ports:
      - "15432:5432"```
grizzled radishBOT
proven mortar
#

You probably started immich stack before you set the location to the mount, or the mount was unmounted (either initially or now)

#

you should never have to set ignore mount errors. You should wipe the postgres database folder and start again with a fresh mount for the /usr/src/app/upload

#

It's not failing to create them, it already created them but now they are missing, based on the error you shared

limpid brook
#

Come on, seriously?

#

God, im so mad at myself, haha. I've been debugging for hours.

#

Well, it worked. Thanks a lot, you guys rock.

limpid brook
#

Sorry, something else (which is related to the above) came up:


microservices worker error: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information.", stack: Error: Failed to read "<UPLOAD_LOCATION>/encoded-video/.immich - Please see https://immich.app/docs/administration/system-integrity#folder-checks for more information."

    at StorageService.verifyReadAccess (/usr/src/app/dist/services/storage.service.js:84:19)

    at async /usr/src/app/dist/services/storage.service.js:38:21

    at async /usr/src/app/dist/repositories/database.repository.js:385:27

    at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:535:20

    at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)

    at async /usr/src/app/dist/repositories/database.repository.js:382:13

microservices worker exited with code 1```

This happens at the "worker" site. Shouldnt the worker add those folders himself?
#

Compose file:


services:
  immich-server:
    container_name: immich_server_worker
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    env_file:
      - stack.env
    environment:
      - UPLOAD_LOCATION=/usr/src/app/upload
    volumes:
      - /mnt/remotes/100.77.91.63_immich/upload:/usr/src/app/upload
    restart: always
    gpus:
      - capabilities: [gpu]
        count: all

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    env_file:
      - stack.env
    volumes:
      - /mnt/zfs/system/appdata/immich/ml-cache:/cache
    restart: always
    ports:
      - "3003:3003"      # ML-API
    gpus:
      - capabilities: [gpu]
        count: all
#

Okay i found it myself.