Replies: 19 comments 43 replies
-
Hi there, thanks for the excellent guide! I'm encountering an issue at Step 6:
Any idea on a solution? It doesn't seem to be permissions related, but at the same time the language does suggest as much. |
Beta Was this translation helpful? Give feedback.
-
To complete my migration I also needed to import my database backup. After making my files available using the above how-to (partly) I did the following to restore the database of my Docker setup to the LXC installation. Warning Make sure you have backups in place and are working on the correct system etc. No warranty for the steps below.
To list the databases and the privileges:
I had some minor issues with differences between permissions of the |
Beta Was this translation helpful? Give feedback.
-
Hi Thanks a lot for the amazing guide. I notice that when immich is creating files it creates them readable only by the immich user. How do I get it to automatically create the files so that they are readable by the group/all? |
Beta Was this translation helpful? Give feedback.
-
Running into DB restore issues, anyone else see it ? I followed the above steps to recreate the immich db and get the following when I attempt a restore: $ gunzip --stdout "/mnt/immich/backups/immich-db-backup-1751156950651.sql.gz" \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| sudo -u postgres psql --dbname=immich --username=immich
...
COPY 59511
ERROR: relation "public.face_search" does not exist
...
invalid command \N
invalid command \N
...
ERROR: syntax error at or near "3038832"
LINE 1: 3038832 Vila 1.56654 42.53176 AD 03 2024-11-04 Encamp
^ |
Beta Was this translation helpful? Give feedback.
-
Also pardon my ignorance but where does |
Beta Was this translation helpful? Give feedback.
-
For your advanced setup wouldn't it make more since to place upload/library on the NAS instead of upload/upload? |
Beta Was this translation helpful? Give feedback.
-
I noticed something yesterday, all my videos from before my migration are not working anymore because their paths are incorrect. A recent video has /mnt/immich/upload/... as path, while an older video has upload/upload/... as path. Anyone else noticed this? |
Beta Was this translation helpful? Give feedback.
-
Hello, shouldn't we modify |
Beta Was this translation helpful? Give feedback.
-
(updated 15th Aug.) Thank you very much for this script. I installed immich again from beginning two days ago.
Setting in immich I made: Changes in Quality of thumbmails (lower quality); Turned on Reading Metadata of Faces in EXIF (because I have lots of pictures where faces are already tagged correctly); hardware acceleration - turned on from "none" to VAAPI Everything looks like above and seems to work fine. I can see all the pictures and videos, VAAPI works with trancoding all the videos and even the already given face-tags are there. But I get many errors like this tail -f /var/log/immich/web.log , I think because of AI(?)
GPU is passing through. (Dell Wyse 5070 with Intel J5005, immich priv. lxc with 6GB ans 1GB SWAP) OpenVINO seems to work (see log above) I put that into the ..../lxc/120.conf on host:
Noone else with those errors in the log? |
Beta Was this translation helpful? Give feedback.
-
I am a bit confused as to what to do here. I have an unprivileged LXC container running immich. I have an NFS share on my truenas server where I want the data to live. I have mounted the NFS share on my PVE host using the gui. I have bound said mounted share to my container using the pct set command. The mounted share always has an images folder and is permanently owned by nobody/nogroup. I am quite stuck. |
Beta Was this translation helpful? Give feedback.
-
Bingo! That got it! You may want to streamline the steps to reflect this. |
Beta Was this translation helpful? Give feedback.
-
I asked my document expert friend Chet G. Petey to beautify my steps on how to fix the permissions: 📸 Immich Bind Mount Permissions for Unprivileged LXC on ProxmoxThis guide explains how to set correct permissions on a bind-mounted media directory (e.g., ✅ Prerequisites & Assumptions
🛠️ Steps1. Confirm Immich user UID inside the LXCRun this on the Proxmox host: pct exec 200 -- id immich
2. Set ownership of the bind mount on the hostStill on the Proxmox host: chown -R 100999:100000 /mnt/immich
3. Set access permissions for group and userchmod -R 770 /mnt/immich
4. Resume Immich setupReturn to Step 7 in: ✅ Notes
Hopefully, my friend Chet is okay to use. 😄 |
Beta Was this translation helpful? Give feedback.
-
I still have an issue with an NFS export configured with no_root_squash, Privileged container. I am migrating a previous SMB media folder, the current NFS is mounted directly in the guest to /mnt/photos with nfs-common. On the host, all the files are owned by root:media. I have recreated the same media group GID (1000) on the Immich server and added immich to it, but I am still getting this error.
I have already tried recursively changing the ownership of all directories on the NFS server to UID:GID 999:996. After doing this, the web UI works, but the collection is not visible, it's empty. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. Unfortunately, I need to use a privileged LXC in order to utilise OpenVINO machine learning acceleration. |
Beta Was this translation helpful? Give feedback.
-
This script has been a life saver! Thank you for the amazing guide! |
Beta Was this translation helpful? Give feedback.
-
I installed immich using a script. Can you tell me the password for the root user? I need to log in using ssh. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the great guide! I'm running into an upload The error I'm getting is: Anyone else getting this error? Hitting a wall here, and not really sure what's wrong. I may move on to trying an NFS Share instead. |
Beta Was this translation helpful? Give feedback.
-
i did this and it seemed to delete all my media from the previous immich server. Is there any way to get it back, or is it gone? |
Beta Was this translation helpful? Give feedback.
-
@vhsdream you are Not in discord, so i need to random ping you in some Discussions. Immich switched to pnpm |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Immich in an LXC
Love Immich? Hate Docker? Me too! That's why I wanted a Proxmox Helper Script for the best open-source, self-hosted photo management software to ever exist.
So the script is here, and it seems to work, and it's huge and kind of complex. Let's go over what the script CAN do and what it CANNOT do.
✅ Can do
🚫 Cannot Do
/opt/immich/upload
.Since so far we've been receiving feedback that the major problem people are having is related to using a different upload folder (with good reason!), this guide is mainly geared towards attempting to demystify that part.
📁 The upload Folder
It's located by default in
/opt/immich/upload
, on the same disk as the LXC itself. Definitely not ideal, since you're gonna have to continuously increase the size of the disk as you add more media. I'd wager that pretty much all of us use some kind of NAS, which is likely on completely different disks, and that's where we want to store our Immich uploads.It defaults to where it does because there are many different ways to configure storage on Proxmox, and the script is unable accommodate them as well as properly setup permissions in each use case. So this is left up to you to figure out. That being said, this guide is not going to cover how to properly mount a network share in your LXC, aside from the fact of whether you should choose to create an unprivileged LXC or a privileged LXC.
❓ Choose Privileged if...
immich
user can write to the share.❔ Choose Unprivileged (default and recommended) if...
/etc/subuid
and/etc/subgid
entries on your Proxmox host.Needless to say, regardless of the path you choose, you should have this figured out before proceeding. But to be a good sport and to get you started, I'll say you need to learn about how unprivileged LXCs operate in relation to the host, and how to leverage that to be able to mount a writable share in your Immich LXC. Try this writeup for a good starting point. And now, the GUIDE.
⚙ Changing the Immich upload directory in your Immich LXC
systemctl stop immich-web immich-ml
/opt/immich/.env
) to reflect your chosen mount pointnano/vi /opt/immich/.env
Look for
IMMICH_MEDIA_LOCATION
and change it to the path of your bind mount.For example, say your bind mount is at
/mnt/immich
. Do this:Save and close the file.
root
user can write to the folder. Even if you haven't uploaded data, there are files in each of those folders that must also be present for this to work.cp -a /opt/immich/upload/* /mnt/immich
(or whatever your location is)You want the folder structure to look like this:
And within each of those dirs there should be an
.immich
file, and potentially a folder with a long alphanumeric name which is your user ID, if you have existing uploaded content.Delete these symlinks:
Recreate them so they point to your new location:
So the folders should look like the below:
Confirm ownership of the Immich folder in case it's changed.
chown -R immich:immich /opt/immich
NEW STEP as of v1.136.0/July 31 2025. Apparently changing your IMMICH_MEDIA_LOCATION can wreak some havok on how immich now handles path management. In their efforts to get to stable and to have a more sane handling of paths, with v1.136.0+ (actually I noticed something funny with some paths a couple versions earlier) you may need to run the following in order to have all your images/videos/thumbnails appear.
This will start an interactive script that allows you to update the path of assets in the DB from relative to absolute. Right now I can't tell if running this is absolutely necessary, but one tip off that you might need to is if you see lots of blurry thumbnails, or if you go to zoom into an image on the web and it suddenly disappears.
I should also note that it's OK to run this later on, well after you've changed the location; just make sure that Immich services are stopped before you do it.
ANOTHER UPDATE - literally as I posted the above, a new version dropped which apparently will detect a change to IMMICH_MEDIA_LOCATION and will do the above for you automatically.
You need to check Immich because if you messed up or skipped the symlink thing, if you only check the log things will seem fine. As soon as you try to look at your timeline (all thumbnails blurred) or open a photo (it won't load), then you'll see the problem.
rm -rf /opt/immich/upload
That should be it.
📝 A Note About Updating
During the update process, the script deletes everything in the
/opt/immich/app/
directory, including those symlinks. But they get recreated, using the information from your .env, whereIMMICH_MEDIA_LOCATION
will point to your current upload directory! So you do not need to recreate anything yourself.🚀 Advanced Settings
I mentioned earlier that my setup is a bit different, which caused me to overlook the symlink step. I actually have not changed
IMMICH_MEDIA_LOCATION
in my .env file. Instead I made an additional symlink from/opt/immich/upload/upload
to my bind mount. I did this because I prefer to store the thumbnails, encoded videos and other data on the LXC (for the responsiveness and speed), while storing the photos themselves on the NAS. So far this has worked out for me, but keep in mind that if you want to do this, thumbnail and encoded video data do take up space on your LXC disk, so you'll have to make sure you increase your LXC disk size accordingly. You can also customise this to your liking, for example create another symlink for/opt/immich/upload/backups
to your bind mount, to store the DB backups on your NAS (I might do this myself).Steps (Photo files only, as an example)
**If you have any existing data in the
/opt/immich/upload/upload
folder, you better copy/move it to your bind mount location! And make double-certain that your destination has a.immich
file (you can simply create an empty one if needed).Delete the
/opt/immich/upload/upload
dir, leaving the others intact.rm -r /opt/immich/upload/upload
Create the symlink(s) and restore ownership
Looks like this:
./immich-admin change-media-location
in/opt/immich/app/bin
. See step 6 from above for more info.OK, that's all folks! If you think anything in this guide can be made more clear and/or explicit, or if you find any errors, please let me know and I will fix 👍🏼
Beta Was this translation helpful? Give feedback.
All reactions