Immich keeps using System Storage

Hello Bro’s and Sis,

been trying this problem for a week now and kind of loosing my hair😂, sorry for such a noob here. I have searched the community and none of them really solved but gave me Ideas and thanks. My problem is I can’t seem to change the Storage location of Immich where it should save the Photos. It always use the System SSD with 250gb. I want it to store it in my 1TB HDD (for testing) but it’s not using it. I tried CogZog instruction (thanks for your effort) but Immich (version 2.7.4) keeps failing to start or it breaks. I tried the one that says before opening immich “In the immich-server tab, map your album storage location in the Volumes section (default is /DATA/Gallery/immich).” Keeps failing to start too after changing the Path. Even in my Mobile Phone when I tried to upload, the Storage shown is the System SSD. I appreciate very much for the help.

PS: I opened a new Topic cause I mostly see is from version 2.3.1 , I am not sure maybe there’s a difference since I just starting to make my own Homeserver. Sorry if it’s wrong for starting this Topic again, Thank you.

I agree. I want to be able to do similar. If Immich ran native on Windows, i’d be there in a flash…

Had similar problems with immich, tried for hours with no sucess. Finally decided to install photoprism and it works for me, with the help of chatgpt. all data (photos) on harddrive, program on my ssd. so maybe you could consider to install photoprism instead of immich.

:file_folder: How to Change the Photo Storage Folder in Immich (Simple Way)

In Immich, you can change where photos are stored by editing the storage (volume) path in your container settings.

:white_check_mark: Steps:

  1. Open your Immich container settings

  2. Go to Storage / Volume configuration

  3. You will see something like:

    • Host (your system / ZimaOS):
      /DATA/Gallery/immich

    • Container (Immich):
      /usr/src/app/upload

  4. To change where photos are stored:
    :backhand_index_pointing_right: Simply change the Host path to any folder you want
    (for example: /DATA/photos)

  5. Save the changes and restart the container


:warning: Important:

  • The container path /usr/src/app/upload should stay the same

  • Only change the Host path

  • Make sure the folder exists and has permissions

3 Likes

Didn’t seem to work for me. I had added an external path to a folder on my storage drive and that worked but replacing the default upload path to the same did not…

Hi! Thanks for your reply.

Could you please share a few screenshots of your container setup (especially the volume/storage configuration)? That would really help me understand what might be going wrong.

Thanks a lot!

this is my attempt and fail.

Hi! Thanks again for your screenshots.

Instead of using:
/Elements/Photos

it should actually be:
/DATA/.media/Elements/Photos

I think I found the issue. My path was wrong before.

/DATA/.media/Elements/Photos/upload

nope that failed as well. a message came up and said the container was unhealthy and for the last hour it has continued to try to load.

i am beginning to wonder if it goes back to the message on the first image i shared with the warning saying that external hdd is read only. i find that hard to believe because the “Files” container allows me to transfer files from my windows pc…. and i had previously reformatted that hard drive in exfat. but the “/DATA/.media/Elements/Photos” allowed the container to actually start. It was not until i tried to actually run immich that it became a problem.

Hi! I’ll send you my YAML configuration now.

Could you please try it on your side and see if it works?

Thanks a lot!

name: database
services:
  database:
    cpus: 4
    cpu_shares: 90
    command: []
    container_name: immich-postgres
    deploy:
      resources:
        limits:
          memory: 4294967296
        reservations:
          devices: []
    environment:
      - PG_DATA=/var/lib/postgresql/data
      - POSTGRES_DB=immich
      - POSTGRES_PASSWORD=casaos
      - POSTGRES_USER=casaos
    image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
    labels:
      icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/immich.svg
    mem_reservation: "2147483648"
    restart: unless-stopped
    volumes:
      - type: bind
        source: /DATA/AppData/big-bear-immich/pgdata
        target: /var/lib/postgresql/data
    ports: []
    devices: []
    cap_add: []
    networks:
      - big_bear_immich_network
    privileged: false
  immich-machine-learning:
    cpus: 4
    cpu_shares: 90
    command: []
    container_name: immich-machine-learning
    deploy:
      resources:
        limits:
          memory: 4294967296
        reservations:
          devices: []
    environment:
      - DB_DATABASE_NAME=immich
      - DB_HOSTNAME=immich-postgres
      - DB_PASSWORD=casaos
      - DB_PORT=5432
      - DB_USERNAME=casaos
      - REDIS_HOSTNAME=immich-redis
    image: ghcr.io/immich-app/immich-machine-learning:release
    labels:
      icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/immich.svg
    mem_reservation: "2147483648"
    restart: unless-stopped
    shm_size: "1073741824"
    volumes:
      - type: bind
        source: /DATA/AppData/big-bear-immich/model-cache
        target: /cache
    ports: []
    devices: []
    cap_add: []
    networks:
      - big_bear_immich_network
    privileged: false
  immich-server:
    cpus: 4
    cpu_shares: 90
    command: []
    container_name: immich-server
    depends_on:
      database:
        condition: service_started
        required: true
      redis:
        condition: service_started
        required: true
    deploy:
      resources:
        limits:
          memory: 4294967296
        reservations:
          devices: []
    devices: []
    environment:
      - DB_DATABASE_NAME=immich
      - DB_HOSTNAME=immich-postgres
      - DB_PASSWORD=casaos
      - DB_PORT=5432
      - DB_USERNAME=casaos
      - IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003
      - REDIS_HOSTNAME=immich-redis
    image: ghcr.io/immich-app/immich-server:release
    labels:
      icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/immich.svg
    mem_reservation: "2147483648"
    ports:
      - target: 2283
        published: "2283"
        protocol: tcp
    restart: unless-stopped
    shm_size: "1073741824"
    volumes:
      - type: bind
        source: /DATA/.media/Elements/Photos/upload
        target: /usr/src/app/upload
    cap_add: []
    networks:
      - big_bear_immich_network
    privileged: false
  redis:
    cpus: 2
    cpu_shares: 90
    command: []
    container_name: immich-redis
    deploy:
      resources:
        limits:
          memory: 2147483648
        reservations:
          devices: []
    image: redis:6.2.20-alpine
    labels:
      icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/immich.svg
    mem_reservation: "1073741824"
    restart: always
    ports: []
    volumes: []
    devices: []
    cap_add: []
    environment: []
    networks:
      - big_bear_immich_network
    privileged: false
networks:
  big_bear_immich_network:
    name: database_big_bear_immich_network
    driver: bridge
x-casaos:
  author: self
  category: self
  hostname: ""
  icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/immich.svg
  index: /
  is_uncontrolled: false
  port_map: "2283"
  scheme: http
  store_app_id: database
  title:
    custom: Immich
    en_us: database

i thought for sure that was gna work. sadly it did not.

I was running into this exact same issue. Every time I mapped my 1TB HDD as the main storage location for Immich.

Fix that worked for me:

  1. Uninstall Immich.
  2. Go to your ZimaOS Files app.
  3. If you already have photos inside /ZimaOS-HD/Gallery/immich/, rename it to something like Saved_Photos so they don’t get deleted.
  4. Navigate to /ZimaOS-HD/AppData/ and Delete the Immich folder to destroy the corrupted database.
  5. Re-install Immich, clean official version from the App Store (ignore the BigBear versions).
  6. Voilà!

Hope it works for you.

2 Likes

that did it. I followed your instructions then I used isanto1306’s YAML configuration to install immich and it now works.

1 Like

Glad it worked @scott492010!

Hello everyone,

first of all, thanks to everyone for replying and for the effort everyone did. @isanto1306 , I have been doing the Path you recommended (/DATA/.media/etc…), I couldn’t make it work. Then I followed @TonyTony somehow that did not work for me either…so I had an Idea :thinking:hmmm! “why not install in 1TB HDD, instead of the System”…so I went back at TonyTony’s clean install, restart my ZimaOS then before installing changed the Path to 1TB HDD Storage to install…(see below)

but what I don’t understand is, I tried the Path what you said @isanto1306 but it kept breaking after install. But I changed it before install then it worked. Is this supposed to be like this or I just got lucky? In upcoming Apps that I needed, do I need to do it like, installing directly to the drive I want to use or changing the Path to the Drive I want to use before Install? I am really noob at this🤦‍♀️

PS: Sorry for the late Reply. A lot of things came in between. And thank you all again :victory_hand::flexed_biceps:

1 Like

This has been an issue I’ve been facing for the past couple days. I keep running into the issue where when trying to move it to my main storage and not my system storage it tells me that it’s unable to even with Privileges turned on. The error message is “error while creating mount source path ’ read-only file system”
I’ve tried changing the permission in the ssh terminal to read-write that just broke another thing.

Edit: I’m using RAID set up so I wouldn’t be surprised if that’s where the issue is

Hi!
With this procedure I solved the problem.

Markdown

### ❌ Issue: Immich Storage Integrity Check Error (`ENOENT`)

If your Immich container fails to start on ZimaOS and you see this error in the logs:

```text
ERROR [Microservices:StorageService] Failed to read (/usr/src/app/upload/encoded-video/.immich): Error: ENOENT: no such file or directory

:magnifying_glass_tilted_left: Root Cause

Immich performs a system integrity check on startup (Storage Folder Checks). When you point Immich to a custom host path or a newly created directory, it expects a specific subfolder structure (library, thumbs, upload, profile, encoded-video, backups), with each containing a hidden marker file named .immich. If the directory is empty or incomplete, the missing .immich files cause the startup check to fail.

:hammer_and_wrench: Solution (via Terminal)

Open the Terminal in ZimaOS (or connect via SSH) and run the following commands in order:

1. Create the required subfolder structure

Bash

mkdir -p /DATA/Main-Storage/immich/upload/{library,thumbs,upload,profile,encoded-video,backups}

2. Generate the missing .immich marker files

Bash

touch /DATA/Main-Storage/immich/upload/library/.immich
touch /DATA/Main-Storage/immich/upload/thumbs/.immich
touch /DATA/Main-Storage/immich/upload/upload/.immich
touch /DATA/Main-Storage/immich/upload/profile/.immich
touch /DATA/Main-Storage/immich/upload/encoded-video/.immich
touch /DATA/Main-Storage/immich/upload/backups/.immich

3. Fix permissions

Bash

sudo chmod -R 777 /DATA/Main-Storage/immich

Note: Make sure to replace /DATA/Main-Storage/immich/upload with your actual host storage path if it is different.

After running these commands, return to the ZimaOS Dashboard and restart the Immich app. The integrity checks will pass and the app will start up properly.