I
Immich•3mo ago
elco

Help with setting up Immich on a VM within Proxmox

Hi, I originally started immich on an LXC running docker. This is not supported and i think ive understood why... too many issues! I have now decided to go the VM supported route, spun up a VM with docker. To pass my /upload location which is a dataset on my hdd array, I have mounted an NFS mount point. /mnt/immich-library. My NFS server is actually on the Proxmox PVE itself, UPDATE: I have fixed the permissions issue, I am now able to start up immich and I can sucesfully see the mount mounted onto it. However .... immich has decided to create all the files in the mount location when ive explicitly told it to use the current installed directory where it was installed in .... UPDATE 2: Ok it seems immich creates all the folders even in the upload location, but it seems to only write the encoded videos / thumbs onto the library within the docker install, is this behaviour expected, I would ONLY like the mount to have the actual RAW pictures? .env file:
# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/immich-library
THUMB_LOCATION=./library/thumbs
ENCODED_VIDEO_LOCATION=./library/encoded-video
PROFILE_LOCATION=./library/profile
BACKUP_LOCATION=./library/backups
# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/immich-library
THUMB_LOCATION=./library/thumbs
ENCODED_VIDEO_LOCATION=./library/encoded-video
PROFILE_LOCATION=./library/profile
BACKUP_LOCATION=./library/backups
docker-compose.yml
volumes:
# Do not edit the next line. If you want to change the media storage loca>
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${BACKUP_LOCATION}:/usr/src/app/upload/backups
- /etc/localtime:/etc/localtime:ro
volumes:
# Do not edit the next line. If you want to change the media storage loca>
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
- ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${BACKUP_LOCATION}:/usr/src/app/upload/backups
- /etc/localtime:/etc/localtime:ro
my mounted folder (on PVE HOST):
/tank/library# backups encoded-video library profile thumbs upload
/tank/library# backups encoded-video library profile thumbs upload
my immich-app folder (on VM):
/immich-app/library# backups encoded-video profile thumbs
/immich-app/library# backups encoded-video profile thumbs
49 Replies
Immich
Immich•3mo ago
:wave: Hey @elco, 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 - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA 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.
Mraedis
Mraedis•3mo ago
Hi @elco looks like your final version is the right one for local everything except raws Do you have any questions left?
elco
elcoOP•3mo ago
Hi, so in my mounted folder, doesit have to have all of those other folders in there as well, can it not just be the upload and library folder ? thanks and for multiple users I believe their names will be added under /library. Another question sorry. I have another folder within that zpoo which I will mount to this immich VM. Now that folder has sub folders with the names of our family, so myself , mum dad etc. within these folders are more folders based on the date of the backup. Is there a way to move these over to the /library folder with their names, or is this an automated process. what would the best way be and to make the format nice and clean? thank you
Mraedis
Mraedis•3mo ago
It sounds like you'd want that as external library more than uploading it There is no way to keep the folder structure, at best a one level album can be made through the CLI. You CAN however use storage templating, it is possible to have it stored by date and some other parameters, but that will mean the metadata of the file will need to be correct https://immich.app/docs/administration/storage-template https://immich.app/docs/features/libraries
elco
elcoOP•3mo ago
i will take a look of that, I dont mind moving the pictures I would prefer to have just one folder where all of our pictures are grouped by name, thanks hi @Mraedis ive had a backup of my upload locaiton /library/musaab stored on my hdd, ive now copied that to the immich folder , itdoesnt seem to show all the files, ive made it do the migration job again but no luck and to ad to that issue., ive uploaded a image on the immich app right now dated 2025, using ls on the mount i do not see any 2025 folder being made !
Mraedis
Mraedis•3mo ago
Is your storage template using years? They will still be under library/user-storage-id/2025
elco
elcoOP•3mo ago
that is right
Mraedis
Mraedis•3mo ago
And you can't copy the library on it's own, it needs to be in the database as well
elco
elcoOP•3mo ago
oof right, hmmmmm so is there no way to do this unless i do a manual upload ?
Mraedis
Mraedis•3mo ago
Not if you want it managed by immich no
elco
elcoOP•3mo ago
got it thanks just to confirm, if my library/userid folder is copied to somewhere, I then also need to backup the databse. to restore everything I would restore the DB first, then copy paste the user id into /library and do a scan ? i hope i am right after reading the backup and restore docs im also thinking how do i make everything neat right now This is my current setup on HDD storage
HHD storage :

phone_backups
-musaab_phone
-backup_DDMMYY
-Camera
-Whatsapp
-backup_DDMMYY
-Camera
-Whatsapp
HHD storage :

phone_backups
-musaab_phone
-backup_DDMMYY
-Camera
-Whatsapp
-backup_DDMMYY
-Camera
-Whatsapp
Ofcourse immich stores it through a differnt method, as you said I cannot convert it so I would have the only option of manually uploading everything ive also noticed a slight issue When reviewing duplicates, i review them. save/del whatever. Now when i go back to it again it comes back review duplicates. it seems this isnt working ?
schuhbacca
schuhbacca•3mo ago
Are the duplicates from your phone? They may be getting re-uploaded. There's no blacklist yet to tell the device not to re-upload assets deleted via the web
elco
elcoOP•3mo ago
i have not set my phone up yet
elco
elcoOP•3mo ago
No description
elco
elcoOP•3mo ago
No description
elco
elcoOP•3mo ago
No description
elco
elcoOP•3mo ago
ive confirmed when I go to trash and click delete, It does get deleted from my mount (ofcourse not with these because i decide to keep all, theya re not duplicates) sorry just bumping this, any ideas guys ? Need to start the journey of backing up but want to fix this duplicate issue
Mraedis
Mraedis•3mo ago
I have an inkling the keep function is not functioning as intended Feel free to open an issue for this 🙂
elco
elcoOP•3mo ago
on github ?
elco
elcoOP•3mo ago
seems im not the only one, 5hr ago already an issue
No description
Mraedis
Mraedis•3mo ago
Tracking in #15868
Immich
Immich•3mo ago
[Issue] Deduplication from external library does not resolve (immich-app/immich#15868)
elco
elcoOP•3mo ago
Thanks I will keep a track of this does immich really take up this much space? its eaten up all 4G of assigned memory andn ow ive got errors it seems at the start it didnt have much memory, does it keep certain things in RAM even after reboot?
schuhbacca
schuhbacca•3mo ago
Minimum recommended is 6gb. The machine learning model can eat up ram quite quickly
elco
elcoOP•3mo ago
daym, ok nice now imich says its a new install .... (after i stopped the machine and increased the ram) whath the hell man, all of my user info is gone backups folder also got wiped, everything just got reset somehow , still have my mounts though
Mraedis
Mraedis•3mo ago
Probably means your mounts did not... mount either before or after restart
elco
elcoOP•3mo ago
no,immich restarted and it thinks its a new install i had to create admin account and everything
Mraedis
Mraedis•3mo ago
I understand yes
elco
elcoOP•3mo ago
something must have happened with the database, the database backup file is gone, it thinks its a new install, the thumbs and encoded videos are there however
Mraedis
Mraedis•3mo ago
where is your DB_DATA_LOCATION and is there anything inside it
elco
elcoOP•3mo ago
No description
elco
elcoOP•3mo ago
root@docker-immich:/immich-app/postgres# ls
PG_VERSION pg_hba.conf pg_snapshots pg_wal
base pg_ident.conf pg_stat pg_xact
current_logfiles pg_logical pg_stat_tmp postgresql.auto.conf
global pg_multixact pg_subtrans postgresql.conf
log pg_notify pg_tblspc postmaster.opts
pg_commit_ts pg_replslot pg_twophase
pg_dynshmem pg_serial pg_vectors
root@docker-immich:/immich-app/postgres# ls
PG_VERSION pg_hba.conf pg_snapshots pg_wal
base pg_ident.conf pg_stat pg_xact
current_logfiles pg_logical pg_stat_tmp postgresql.auto.conf
global pg_multixact pg_subtrans postgresql.conf
log pg_notify pg_tblspc postmaster.opts
pg_commit_ts pg_replslot pg_twophase
pg_dynshmem pg_serial pg_vectors
might have created, because ive logged in as a new admin now
Mraedis
Mraedis•3mo ago
It will always create even before you log in is the ls -la date right now or from before
elco
elcoOP•3mo ago
the only thing i done was docker compose down, shutdown the vm, increase ram to 6G, start it back up, docker compose up -d half way through i ctrl + c it becasue i needed to run it logged, docker compose up could it be i ctrl c it half way ?
Mraedis
Mraedis•3mo ago
Probably not no
elco
elcoOP•3mo ago
some of it is from now, some are from 11 in the morning
Mraedis
Mraedis•3mo ago
the database backup file is gone
What do you mean?
elco
elcoOP•3mo ago
so in /immich/library there is a backup folder, before there was a file in there i remember, now its just vanished, i thought i could use that to backup ....
root@docker-immich:/immich-app/postgres# ls -la
total 144
drwx------ 21 999 root 4096 Feb 11 17:27 .
drwxr-xr-x 4 root root 4096 Feb 11 17:36 ..
-rw------- 1 999 systemd-journal 3 Feb 11 11:24 PG_VERSION
drwx------ 7 999 systemd-journal 4096 Feb 11 11:24 base
-rw------- 1 999 systemd-journal 44 Feb 11 17:17 current_logfiles
drwx------ 2 999 systemd-journal 4096 Feb 11 17:18 global
drwx------ 2 999 systemd-journal 4096 Feb 11 17:17 log
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_commit_ts
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_dynshmem
-rw------- 1 999 systemd-journal 4821 Feb 11 11:24 pg_hba.conf
-rw------- 1 999 systemd-journal 1636 Feb 11 11:24 pg_ident.conf
drwx------ 4 999 systemd-journal 4096 Feb 11 17:27 pg_logical
drwx------ 4 999 systemd-journal 4096 Feb 11 11:24 pg_multixact
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_notify
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_replslot
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_serial
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_snapshots
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_stat
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_stat_tmp
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_subtrans
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_tblspc
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_twophase
drwx------ 4 999 systemd-journal 4096 Feb 11 11:24 pg_vectors
drwx------ 3 999 systemd-journal 4096 Feb 11 17:27 pg_wal
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_xact
-rw------- 1 999 systemd-journal 88 Feb 11 11:24 postgresql.auto.conf
-rw------- 1 999 systemd-journal 28835 Feb 11 11:24 postgresql.conf
-rw------- 1 999 systemd-journal 229 Feb 11 17:17 postmaster.opts
root@docker-immich:/immich-app/postgres# ls -la
total 144
drwx------ 21 999 root 4096 Feb 11 17:27 .
drwxr-xr-x 4 root root 4096 Feb 11 17:36 ..
-rw------- 1 999 systemd-journal 3 Feb 11 11:24 PG_VERSION
drwx------ 7 999 systemd-journal 4096 Feb 11 11:24 base
-rw------- 1 999 systemd-journal 44 Feb 11 17:17 current_logfiles
drwx------ 2 999 systemd-journal 4096 Feb 11 17:18 global
drwx------ 2 999 systemd-journal 4096 Feb 11 17:17 log
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_commit_ts
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_dynshmem
-rw------- 1 999 systemd-journal 4821 Feb 11 11:24 pg_hba.conf
-rw------- 1 999 systemd-journal 1636 Feb 11 11:24 pg_ident.conf
drwx------ 4 999 systemd-journal 4096 Feb 11 17:27 pg_logical
drwx------ 4 999 systemd-journal 4096 Feb 11 11:24 pg_multixact
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_notify
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_replslot
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_serial
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_snapshots
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_stat
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_stat_tmp
drwx------ 2 999 systemd-journal 4096 Feb 11 17:27 pg_subtrans
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_tblspc
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_twophase
drwx------ 4 999 systemd-journal 4096 Feb 11 11:24 pg_vectors
drwx------ 3 999 systemd-journal 4096 Feb 11 17:27 pg_wal
drwx------ 2 999 systemd-journal 4096 Feb 11 11:24 pg_xact
-rw------- 1 999 systemd-journal 88 Feb 11 11:24 postgresql.auto.conf
-rw------- 1 999 systemd-journal 28835 Feb 11 11:24 postgresql.conf
-rw------- 1 999 systemd-journal 229 Feb 11 17:17 postmaster.opts
Mraedis
Mraedis•3mo ago
Anything inside of the log directory there?
elco
elcoOP•3mo ago
there is , so i typed that message at 17:26 most latest log is 17:17 ? 171754.log
2025-02-11 17:17:54.390 UTC [1] LOG: starting PostgreSQL 14.10 (Debian 14.10-1>
2025-02-11 17:17:54.390 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port>
2025-02-11 17:17:54.390 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-02-11 17:17:54.392 UTC [1] LOG: listening on Unix socket "/var/run/postgr>
2025-02-11 17:17:54.394 UTC [27] LOG: database system was shut down at 2025-02>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
2025-02-11 17:17:54.398 UTC [1] LOG: database system is ready to accept connec>
2025-02-11 17:27:10.300 UTC [1] LOG: received fast shutdown request
2025-02-11 17:27:10.301 UTC [1] LOG: aborting any active transactions
2025-02-11 17:27:10.303 UTC [1] LOG: background worker "logical replication la>
2025-02-11 17:27:10.319 UTC [33] LOG: shutting down
2025-02-11 17:27:10.377 UTC [1] LOG: database system is shut down
2025-02-11 17:17:54.390 UTC [1] LOG: starting PostgreSQL 14.10 (Debian 14.10-1>
2025-02-11 17:17:54.390 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port>
2025-02-11 17:17:54.390 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-02-11 17:17:54.392 UTC [1] LOG: listening on Unix socket "/var/run/postgr>
2025-02-11 17:17:54.394 UTC [27] LOG: database system was shut down at 2025-02>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
[2025-02-11T17:17:54Z INFO service::utils::clean] Find directory "pg_vectors/i>
2025-02-11 17:17:54.398 UTC [1] LOG: database system is ready to accept connec>
2025-02-11 17:27:10.300 UTC [1] LOG: received fast shutdown request
2025-02-11 17:27:10.301 UTC [1] LOG: aborting any active transactions
2025-02-11 17:27:10.303 UTC [1] LOG: background worker "logical replication la>
2025-02-11 17:27:10.319 UTC [33] LOG: shutting down
2025-02-11 17:27:10.377 UTC [1] LOG: database system is shut down
Mraedis
Mraedis•3mo ago
Alright so that was the DB shutdown you did there It doesn't seem to have started again after that 🤔 Which would mean your DB_DATA_LOCATION is not mounted I'd try simply doing a compose down + compose up again
elco
elcoOP•3mo ago
ok, would it be overwitten with me logging in as new admin now ? ooooo it fixed interesting thank you
Mraedis
Mraedis•3mo ago
If a volume doesn't mount it will create these folders inside the container Works just as well, but if you update then all your data is gone... 🙃 This is also why there are .immich file checks for your library And why you should never ignore mount checks at startup unless you know what you are doing
elco
elcoOP•3mo ago
got it, glad i didnt do a full update! now just to sort out this pesky duplciate bug, seems it only happens to keep pictuers, if i actually send one to the trash it does infact go and then delete and not show but thats for the team to look at ill keep eye on that issue thread
Mraedis
Mraedis•3mo ago
To be clear it only deletes your data if you do it wrong from the start
elco
elcoOP•3mo ago
sorry me again, does the storage space not increase when you use external libraries ? seems to be stuck on 15mib despite importing 1000s of pics/videos
No description
elco
elcoOP•3mo ago
i assume this only shows uploaded storage and not external libraries ?
Mraedis
Mraedis•3mo ago
I think this is a consequence of you mounting the main libarary/upload on the network share thumbs and encoded video are local and yes, external libraries are not counted here This is also not "immich space" it's the amount of free space on the volume your UPLOAD_LOCATION is
elco
elcoOP•3mo ago
gotcha, thanks again

Did you find this page helpful?