Immich Storage Location is Being Deprecated Issue

Hello,
I’m running Immich in TrueNAS without any issues. One thing that would be helpful is being notified when app settings change. It would help with issues like this where the default storage location is being deprecated, but I would not have known about that if I did not go through all my app settings one by one looking for changes in the GUI for each app.

What I found is that the default location for storage is changing for Immich, being deprecated and being removed at some date in the future.

When setting up Immich, I did so following the detailed instructions provided by Immich on their site. It has worked absolutely fine. In doing so, I created individual folders for backups, library, pgdata, profile, thumbs, upload, and video.

When I deselect the option to “Use Old Storage Configuration (Deprecated)”, I get only one option to select storage and it advises that this is the “upload” folder. I did this and it breaks.

There is no guidance on transitioning from the standard advised way to install the app from Immich TrueNAS [Community] | Immich or TrueNas about this adjustment and how to migrate from the old Immich advised setup to the new storage setup. To complicate this, I have my upload folder set up as a samba share so that I can review the actual images from another device outside the Immich system.

Please advise if anyone has found the proper way to do this - because the settings in the screenshot say that this will just eventually migrate (and therefore risk breaking many users’ systems).

Thanks,

Matt

According to the PR (#2552) there should be a warning generated for apps still using the old structure with instructions, but you can read it here as well: apps/ix-dev/community/immich/ix_values.yaml at master · truenas/apps · GitHub.

Ah, okay, that helps. The notification just says what I posted in the screenshot. If the notification were to add a link to this PR, that would help a lot because just “switching” like I tried to do, obviously breaks things. Also, if folks do not manually do this work of updating the YAML file, will a TrueNAS update automate this for users before “removing it in the future” as the notification says?

For convenience for others facing the same issue, here is the body text of the PR that explains what to do to make this process work. 

images:
  image:
    repository: ghcr.io/immich-app/immich-server
    tag: v1.134.0
  ml_image:
    repository: ghcr.io/immich-app/immich-machine-learning
    tag: v1.134.0
  ml_cuda_image:
    repository: ghcr.io/immich-app/immich-machine-learning
    tag: v1.134.0-cuda
  ml_rocm_image:
    repository: ghcr.io/immich-app/immich-machine-learning
    tag: v1.134.0-rocm
  ml_openvino_image:
    repository: ghcr.io/immich-app/immich-machine-learning
    tag: v1.134.0-openvino
  pgvecto_image:
    repository: ghcr.io/immich-app/postgres
    tag: 15-vectorchord0.3.0-pgvectors0.2.0
  redis_image:
    repository: bitnami/redis
    tag: 8.0.2

consts:
  server_container_name: server
  ml_container_name: machine-learning
  pgvecto_container_name: pgvecto
  redis_container_name: redis
  perms_container_name: permissions
  ml_port: 32002
  ml_cache_path: /mlcache
  db_user: immich
  db_name: immich

  old_storage_warning: |
    The storage configuration you are using is deprecated and will be removed in a future version.
    Please migrate to the new storage configuration format.
    What you essentially have to do is to create a new dataset/directory,
    move your data there and then update the configuration by unchecking the 'Use old storage config' option.
    And pointing the 'Data Storage' to the new dataset/directory.
    For example if you create a new dataset at '/mnt/tank/immich'
    In this directory create 2 datasets/directories:
    `/mnt/tank/immich/data` and `/mnt/tank/immich/postgres-data`

    Now inside the `/mnt/tank/immich/data` directory create the following directories (**NOT** datasets):
    `mkdir -p /mnt/tank/immich/data/{upload,thumbs,library,profile,backups,encoded-video}`
    Then you have to move your data from the old separate dataset/directories to the new ones.
    For example `/mnt/tank/old-immich-data/upload` to `/mnt/tank/immich/data/upload`.

Do you know how long we have to make the switch before TrueNAS plans to remove the deprecated option?

I’ll be honest, this one is making me a little nervous…

See ##UPDATE## below for the final step to take in doing this that worked for me. Your mileage may vary.

I went into Apps page and unset the app pool. I don’t know if this is necessary, but I assumed it would make it easier in case files were in use when I tried to copy them over.

I created two datasets per the documentation from TrueNAS and named them according to my setup. Make sure that if you copy the way that I did this, that you adjust the file path according to how you setup your system originally.

/mnt/Main_Tank/Immich/data and /mnt/Main_Tank/Immich/postgres-data

Since I nested these two new datasets under the original /mnt/Main_Tank/Immich dataset, it inherited the permissions (as I had done that before so that nested datasets would have the same permissions). You may need to adjust your datasets because I believe Immich needs root permissions according to their documentation.

I tried running the command per the described PR listed in this thread (edited for my setup):

cp -a /mnt/Main_Tank/Immich/pgdata/. /mnt/Main_Tank/Immich/postgres-data/

However, it returned this error:

cp: preserving times for '/mnt/Main_Tank/Immich/postgres-data/.': Operation not permitted

So, I used rsync to do this and it worked fine. Rsync will preserve file attributes and also copy over any hidden files. I do not know if this is necessary, but it worked for me.

Note that in my setup below that the naming convention has changed from “video” to “encoded-video”. The rest remains the same (per the documentation on Immich’s website.

rsync -avh --progress /mnt/Main_Tank/Immich/pgdata/ /mnt/Main_Tank/Immich/postgres-data/
rsync -avh --progress /mnt/Main_Tank/Immich/backups/ /mnt/Main_Tank/Immich/data/backups
rsync -avh --progress /mnt/Main_Tank/Immich/video/ /mnt/Main_Tank/Immich/data/encoded-video 
rsync -avh --progress /mnt/Main_Tank/Immich/library/ /mnt/Main_Tank/Immich/data/library
rsync -avh --progress /mnt/Main_Tank/Immich/profile/ /mnt/Main_Tank/Immich/data/profile
rsync -avh --progress /mnt/Main_Tank/Immich/thumbs/ /mnt/Main_Tank/Immich/data/thumbs
rsync -avh --progress /mnt/Main_Tank/Immich/upload/ /mnt/Main_Tank/Immich/data/upload

Finally, I went in unchecked the ‘Use old storage config’ option and pointed the data to the new data sets/directory. However, note that this likely needs to be updated:

Now, when I went to launch the container, I got this error message:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 515, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 562, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 622, in run_in_thread
    return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 619, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py", line 101, in wrapped
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/app_scale.py", line 62, in start
    compose_action(app_name, app_config['version'], 'up', force_recreate=True, remove_orphans=True)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py", line 61, in compose_action
    raise CallError(err_msg)
middlewared.service_exception.CallError: [EFAULT] Failed 'up' action for 'immich' app. Please check /var/log/app_lifecycle.log for more details

Here are the logs:

admin@truenas[/var/log]$ sudo cat app_lifecycle.log
[2025/06/03 10:18:56] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'nginx-proxy-manager' app:  Network ix-nginx-proxy-manager_default  Creating\n Network ix-nginx-proxy-manager_default  Created\n Container ix-nginx-proxy-manager-npm-1  Creating\nError response from daemon: invalid mount config for type "bind": bind source path does not exist: /mnt/Main_Tank/Nginx/data\n

[2025/06/17 11:40:22] (ERROR) app_lifecycle.compose_action():56 - Failed 'up' action for 'immich' app:  Network ix-immich_default  Creating\n Network ix-immich_default  Created\n Container ix-immich-permissions-1  Creating\n Container ix-immich-permissions-1  Created\n Container ix-immich-redis-1  Creating\n Container ix-immich-machine-learning-1  Creating\n Container ix-immich-pgvecto-1  Creating\n Container ix-immich-redis-1  Created\n Container ix-immich-machine-learning-1  Created\n Container ix-immich-pgvecto-1  Created\n Container ix-immich-server-1  Creating\n Container ix-immich-server-1  Created\n Container ix-immich-permissions-1  Starting\n Container ix-immich-permissions-1  Started\n Container ix-immich-permissions-1  Waiting\n Container ix-immich-permissions-1  Waiting\n Container ix-immich-permissions-1  Waiting\n Container ix-immich-permissions-1  Exited\n Container ix-immich-pgvecto-1  Starting\n Container ix-immich-permissions-1  Exited\n Container ix-immich-redis-1  Starting\n Container ix-immich-permissions-1  Exited\n Container ix-immich-machine-learning-1  Starting\n Container ix-immich-redis-1  Started\n Container ix-immich-pgvecto-1  Started\n Container ix-immich-machine-learning-1  Started\n Container ix-immich-machine-learning-1  Waiting\n Container ix-immich-permissions-1  Waiting\n Container ix-immich-pgvecto-1  Waiting\n Container ix-immich-redis-1  Waiting\n Container ix-immich-permissions-1  Exited\n Container ix-immich-pgvecto-1  Error\n Container ix-immich-redis-1  Healthy\n Container ix-immich-machine-learning-1  Healthy\ndependency failed to start: container ix-immich-pgvecto-1 is unhealthy\n

##UPDATE##

Running this to chown the new postres database fixed the issue:

chown -R 999:999 /mnt/Main_Tank/Immich/postgres-data/

Matt

I am not sure how to best share the issue but I posted my steps here: immich: change "uploads" to "upload" in storage migration guide by 190n · Pull Request #2572 · truenas/apps · GitHub to share the feedback. Hope that this helps get it fixed.

The notification shown in that file with instructions should have displayed as a warning if you tried to update immich instead of redeploying it while using the old storage configuration.

There won’t be an automatic migration, but at the point where the deprecated structure is removed those users would just get a new notification at the point when they tried to update Immich telling them it is no longer supported and they must migrate storage locations.

There is no hard timeline for it. Probably a few months at least, maybe 3-4. But as I said, even after the option is removed, users can still make the changes then and resume updates.

Exactly. Glad you got there. You could also add acl permissions for 999 to the PG dataset using the UI.

1 Like

Thank you for sharing your steps. I tried to update yesterday, which did not work. I will give it another go using your suggestions in a day or so.

John

1 Like