I
Immichβ€’2mo ago
Evy

TrueNAS Immich migration

I had to reinstall the Immich app in Truenas after my upgrade to Electric Eel. Not sure if this matter, but I was not able to upgrade TN before the deadline. Therefore, the Immich app was removed after the upgrade. After following this guide completely: https://main.preview.immich.app/docs/install/truenas/ I was able to rsync the old folders over to a new dataset, but the app in TrueNas is stuck in a deploy loop and never eventually starts. I noticed this error in the logs: microservices worker error: PostgresError: password authentication failed for user "immich", stack: PostgresError: password authentication failed for user "immich" I am not sure where to go from here, I would appreciate any help and guidance. If you need more information or the full log lines, please let me know. Thanks.
TrueNAS [Community] | Immich
This is a community contribution and not officially supported by the Immich team, but included here for convenience.
62 Replies
Immich
Immichβ€’2mo ago
:wave: Hey @Evy, 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.
Evy
EvyOPβ€’2mo ago
TrueNAS: Recently upgraded to Electric Eel and then to Fangtooth = 25.04.2.3 Immich: v1.139.4 New Datasets: drwxrwx--- 8 apps apps 8 Aug 27 14:45 data drwx------ 27 netdata docker 33 Aug 27 16:17 pgData Commands I used: rsync -av /mnt/TheCommons/Backup/Photos/Immich\ Backups/Library/ /mnt/TheCommons/immich/data/library/ rsync -av /mnt/TheCommons/Backup/Photos/Immich\ Backups/Uploads/ /mnt/TheCommons/immich/data/upload/ rsync -av /mnt/TheCommons/Backup/Photos/Immich\ Backups/Thumbs/ /mnt/TheCommons/immich/data/thumbs/ rsync -av /mnt/TheCommons/Backup/Photos/Immich\ Backups/Profile/ /mnt/TheCommons/immich/data/profile/ rsync -av /mnt/TheCommons/Backup/Photos/Immich\ Backups/Video/ /mnt/TheCommons/immich/data/encoded-video/ rsync -av /mnt/Jarvis/ix-applications/releases/immich/volumes/ix_volumes/pgBackup/ /mnt/TheCommons/immich/data/backups/ rsync -av /mnt/.ix-apps/app_mounts/immich/postgres_data/ /mnt/TheCommons/immich/pgData/ Troubleshooting: * Tried to use old deprecated folders checkbox to point them to the old folders. * Followed the community guide to use existing datasets. * Reinstalled Immich, recreated the two datasets, stopped deployment, rsync complete, applied the permissions recursively.
No description
Immich
Immichβ€’2mo ago
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Xiticks
Xiticksβ€’2mo ago
Have you used the same db password you had whenre Immich was running on Electril Eel? Or you just set a new one when deploying the app + you will proably encouter a lot more issue as you upgraded from a probably really old version to the latest
Evy
EvyOPβ€’2mo ago
I don't recall what the password was prior to upgrading to Electric Eel and then to Fangtooth (it was working on Dragonfish). I created two new passwords for the DB and redis when reinstalling Immich. Is there a way to edit any files manually and check the DB password? If so, which file would that be and where is it located?
Xiticks
Xiticksβ€’2mo ago
no file needed, it's a command to run in truenas, let me find it
sudo docker exec -it ix-immich-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
sudo docker exec -it ix-immich-pgvecto-1 psql -U immich -d postgres -c "ALTER USER immich WITH PASSWORD 'new_secure_password';"
Replace new_secure_password with the one you set for the DB in Immich settings
Evy
EvyOPβ€’2mo ago
Thank you. I am now getting the following:
Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade
Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade
However, I'm not sure how to try the steps from the link. Is it the same as the `immich-admin change-media-location' command that I would run in the Immich Server shell? I found that somewhere in this discord.
Xiticks
Xiticksβ€’2mo ago
Not at all You have to upgrade immich to an older version You can do that by converting Immich to a custom app, upgrade correctly, and then reintall Immich from the catalogue the way you already did So to convert and update correctly 1) Next to the edit button of Immich, there is a three dot menu, click on it and convert to custom app 2) Once it is done, you edit Immich, now a looong file will appear In this file, you have to modify the image version used by Immich So around line 173, there is image: ghcr.io/immich-app/immich-machine-learning:v1.139.4 change v1.139.4to v1.133.0 Do the same at around line 419 for image: ghcr.io/immich-app/immich-server:v1.139.4 After these changes, you save the thing, and Immich should redeploy Once it is redeployed, verify that everything works, then you can edit the file back and set the v1.133.0 back to v1.139.4 Save again and it should redeploy Once all of this is done, you can delete the app (no worries, no data will be lost as you used host path) and you can reinstall it again pointing to your datasets your lines number will be different, I used a base config, so search around these lines to find where image is noted Is that clear enough @Evy @coburt ?
coburt
coburtβ€’2mo ago
Yes, I think that makes sense. Thank you!
Xiticks
Xiticksβ€’2mo ago
Edit @coburt and @Evy When on 139, before deleting check the app itself, if the images are blurry, check the server logs and if there is an erro with missing path upload/… you'll have to run the change-media-location thing inside the server https://discord.com/channels/979116623879368755/1401229113641009204/1401303535370506402
Evy
EvyOPβ€’2mo ago
It's very clear and I really appreciate it. However, you are right that I would run into other issues. Downgrading to 1.333.0 produces the same deploy loop with a new error.
Please change VectorChord to a compatible version in the Postgres instance., stack: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
2025-08-27 21:31:40.076572+00:00Please change VectorChord to a compatible version in the Postgres instance.
Please change VectorChord to a compatible version in the Postgres instance., stack: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
2025-08-27 21:31:40.076572+00:00Please change VectorChord to a compatible version in the Postgres instance.
microservices worker error: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
microservices worker error: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
2025-08-27 21:32:11.564261+00:00Please change VectorChord to a compatible version in the Postgres instance., stack: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
2025-08-27 21:32:11.564261+00:00Please change VectorChord to a compatible version in the Postgres instance., stack: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4.
Im not sure if rolling back further would help. I really don't remember the previous version of Immich I had when using Dragonfish. Im sorry for taking up your time with this.
Xiticks
Xiticksβ€’2mo ago
@coburt this might also be helpful, I forgot that part Around line 300 there is image: ghcr.io/immich-app/postgres:15-vectorchord0.4.3-pgvectors0.2.0 replace 0.4.3 with 0.3.0 when downgrading to 133 And then set it back to 0.4.3when you upgrade back to 139.4
Evy
EvyOPβ€’2mo ago
I got the same error after updating the line. It thinks it's still on 0.4.3.
Xiticks
Xiticksβ€’2mo ago
Stop the app Verify that the change has been correctly made, save and restart the app
Evy
EvyOPβ€’2mo ago
I stopped it again, double checked the line, saved then started the app.
No description
Xiticks
Xiticksβ€’2mo ago
And you still have the issue? Or is it fine now? (Otherwise you encoutered something weird, but not unfixable)
Evy
EvyOPβ€’2mo ago
Still the same issue. I did just try now to roll back further to 1.107.2 and got this instead
Error: EACCES: permission denied, mkdir 'upload/library'
Error: EACCES: permission denied, mkdir 'upload/library'
If it's unfixable I totally understand and appreciate your help.
Xiticks
Xiticksβ€’2mo ago
You knew you were on this specific version?
Evy
EvyOPβ€’2mo ago
Nope, just a guess. I was reading this https://github.com/immich-app/immich/discussions/18429
Immich
Immichβ€’2mo ago
[Discussion] v1.133.0 (immich-app/immich#18429)
Xiticks
Xiticksβ€’2mo ago
Well I don't think you need to go that far back 1.133 should be fine It's just that for some reason, the pgvecto container doesn't want to appply the changes Set back 1.133 with the 0.3.0 vectorchord again, shut down the app but then in apps -> configuration (upper right button) -> manage container image search for vectorchord And show the list It should at least show 2 of them like the 0.3.0 and the 0.4.3 If that is the case then there is another issue I would try to delete the content of pgData then populate it back with the rsync command rsync -av /mnt/.ix-apps/app_mounts/immich/postgres_data/ /mnt/TheCommons/immich/pgData
Evy
EvyOPβ€’2mo ago
Yes, there are two. Should I delete 0.4.3 or continue with deleting pgData and copying the data back? Or both?
Xiticks
Xiticksβ€’2mo ago
ok my bad, my comment was useless, but do both This way you start with the "old" non-migrated/non-modified database that will be upgraded correctly without trying to skip a version And you're also sure that it won't try anything with the 0.4.3
Evy
EvyOPβ€’2mo ago
Yes, I just tried it again. It tries to deploy, starts then back to deploying again. I will try and remove 0.4.3, delete the files within pgData, and re-run the command.
Xiticks
Xiticksβ€’2mo ago
And make sure that it uses 0.3.0 in the config file (even though it should already be the case)
Evy
EvyOPβ€’2mo ago
Alright, stopped the app, deleted 0.4.3, checked the config file and confirmed it's on 0.3.0. Deleted pgData contents without recreating the dataset. Used rsync. Unfortunately, it did not work. I might just have to start over and cut my losses. It's no longer starting up and fails at the TN level, so I don't have any more error logs from Immich.
Xiticks
Xiticksβ€’2mo ago
that is strange that nothing runs, like not even the container is created?
Evy
EvyOPβ€’2mo ago
Just this error and stuck at deploying
No description
Xiticks
Xiticksβ€’2mo ago
well do what it says in truenas terminal do tail /var/log/app_cycle.log so it will display the end of the logs which should contain the issue
Evy
EvyOPβ€’2mo ago
Yeah, I did download that debug file but it's not helpful. Here's the error: [2025/08/27 18:27:04] (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-pgvecto-1 Creating\n Container ix-immich-machine-learning-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-redis-1 Starting\n Container ix-immich-permissions-1 Exited\n Container ix-immich-machine-learning-1 Starting\n Container ix-immich-permissions-1 Exited\n Container ix-immich-pgvecto-1 Starting\n Container ix-immich-machine-learning-1 Started\n Container ix-immich-redis-1 Started\n Container ix-immich-pgvecto-1 Started\n Container ix-immich-pgvecto-1 Waiting\n Container ix-immich-redis-1 Waiting\n Container ix-immich-permissions-1 Waiting\n Container ix-immich-permissions-1 Exited\n Container ix-immich-pgvecto-1 Error\n Container ix-immich-redis-1 Healthy\ndependency failed to start: container ix-immich-pgvecto-1 is unhealthy\n
Xiticks
Xiticksβ€’2mo ago
oh yeah, might be expected so in your file, edit again around line 370 there is
server:
cap_drop:
- ALL
depends_on:
permissions:
condition: service_completed_successfully
pgvecto:
condition: service_healthy
server:
cap_drop:
- ALL
depends_on:
permissions:
condition: service_completed_successfully
pgvecto:
condition: service_healthy
Remove the lines
pgvecto:
condition: service_healthy
pgvecto:
condition: service_healthy
In normal install that should not be done, but I want the app to deploy to see what the issues are
coburt
coburtβ€’2mo ago
I am also having trouble with the vectorchord version, not sure if thats the same as evy: Error: The VectorChord extension version is 0.4.3, but Immich only supports >=0.3 <0.4. I did change it in the yaml before starting
Evy
EvyOPβ€’2mo ago
It now deploys with this error: 2025-08-27 22:50:16.370695+00:00Starting microservices worker 2025-08-27 22:50:19.565821+00:00[Nest] 19 - 08/27/2025, 6:50:19 PM  LOG [Microservices:EventRepository] Initialized websocket server 2025-08-27 22:50:19.612834+00:00microservices worker error: Error: getaddrinfo ENOTFOUND pgvecto, stack: Error: getaddrinfo ENOTFOUND pgvecto 2025-08-27 22:50:19.612921+00:00at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) 2025-08-27 22:50:19.623358+00:00microservices worker exited with code 1
Xiticks
Xiticksβ€’2mo ago
Could you bot try to change the image to 1.132.0 instead (so replace v1.133.0 with v1.132.0) And replace the whole image value of ghcr.io/immich-app/postgres:15-vectorchord0.4.3-pgvectors0.2.0 to docker.io/tensorchord/pgvecto-rs:pg15-v0.2.0 pg15 not 14 if you already saw my message (I modified it just now) I also don't think the sha is required This way there is no changes in the vector of the db between your "old" version and the one used in 132 then, we will see if that works
coburt
coburtβ€’2mo ago
gave that a try, the server is still crashing. here is the error im getting from the logs: 2025-08-27 23:07:57.650654+00:00[Nest] 16 - 08/27/2025, 4:07:57 PM  LOG [Api:StorageService] Verifying system mount folder checks, current state: {"mountFiles":true,"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}} 2025-08-27 23:07:57.651248+00:00[Nest] 16 - 08/27/2025, 4:07:57 PM  ERROR [Api:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich' 2025-08-27 23:07:57.663088+00:00api worker exited with code 1
Xiticks
Xiticksβ€’2mo ago
Alleluia That is normal fck tho, forgot about that part also SO (wait a second that I find and write what to do)
coburt
coburtβ€’2mo ago
thank you so much for all of your time on this i really appreciate it
Xiticks
Xiticksβ€’2mo ago
On line 439 (or around that) There is
volumes:
- bind:
create_host_path: False
propagation: rprivate
read_only: False
source: /mnt/.ix-apps/app_mounts/immich2/data
target: /data
volumes:
- bind:
create_host_path: False
propagation: rprivate
read_only: False
source: /mnt/.ix-apps/app_mounts/immich2/data
target: /data
you have to replace target: /data with target: /usr/src/app/upload Also around line 366 (there is also a target /data inside a volume like above, replace it with the value same target: /usr/src/app/upload And then it should hopefully start correctly
coburt
coburtβ€’2mo ago
i replaced both lines, still getting the same error unfortunatly 2025-08-27 23:19:34.164383+00:00[Nest] 16 - 08/27/2025, 4:19:34 PM  LOG [Api:StorageService] Verifying system mount folder checks, current state: {"mountFiles":true,"mountChecks":{"thumbs":true,"upload":true,"backups":true,"library":true,"profile":true,"encoded-video":true}} 2025-08-27 23:19:34.165707+00:00[Nest] 16 - 08/27/2025, 4:19:34 PM  ERROR [Api:StorageService] Failed to read upload/library/.immich: Error: ENOENT: no such file or directory, open 'upload/library/.immich' 2025-08-27 23:19:34.177040+00:00api worker exited with code 1
Xiticks
Xiticksβ€’2mo ago
this might be only for you Will go to your thread @Evy I'll tell you if that worked or you could check by yourself in https://discord.com/channels/979116623879368755/1402036009402634350 SO it worked! You can try the multiple changes made from there (and below)
Evy
EvyOPβ€’2mo ago
Sorry for the delay. I will try this now.
Xiticks
Xiticksβ€’2mo ago
NpNp I just keep you up to date, ask if anything isn't cllear
Evy
EvyOPβ€’2mo ago
I am still reading the other thread, but just to confirm. I am downgrading the version to 1.132.0 and changing the pgvecto image value to docker. oh and below, so editing line 439 as well.
Xiticks
Xiticksβ€’2mo ago
Yes Well, if you did not do that, you will have another error so that's ok
Evy
EvyOPβ€’2mo ago
This is after downgrading the version, changing the image value and editing the two lines to /usr/src/app/upload
No description
No description
No description
Xiticks
Xiticksβ€’2mo ago
Oh yeah Sorry will have to do more things but it should be ok add back the phvecto condition service healthy lines stop the app delete (again) the content of pgData and rsync it (again) from your original dataset I'll have to go to bed (it's 2AM for me) so let me know if you still have issues Don't give up as it is fixable, but I'll reply later (I saw you were writing so I'll stay 2 more minutes)
Evy
EvyOPβ€’2mo ago
Oh, yeah sorry. I made a mistake earlier but I just did what you said and I am currently starting the container. Please get some rest! I will share the log lines and await your response when you are next available. πŸ™‚
Evy
EvyOPβ€’2mo ago
No description
Xiticks
Xiticksβ€’2mo ago
Do that again you "restored" the old db without the password hange You might need to restart the app after, but I'm not sure
Evy
EvyOPβ€’2mo ago
I will give it a try and let you know. If it doesn't work, I will also try to delete everything, run the command and launch it again
Xiticks
Xiticksβ€’2mo ago
Delete eveything ?
Evy
EvyOPβ€’2mo ago
I mean the pgData folder
Xiticks
Xiticksβ€’2mo ago
didn't you already do that there? but it seems to be working so no need to delete it
Evy
EvyOPβ€’2mo ago
Got it.
Xiticks
Xiticksβ€’2mo ago
well it will depend on the next issue that arise, if there is one
Evy
EvyOPβ€’2mo ago
it worked!
Xiticks
Xiticksβ€’2mo ago
NICE! SO as I told coburt 1) Do a copy of your whole yaml file (the one you have edited 200 times at this point) 2) Once that is done, you can delete this custom app 3) Reinstall Immich from the catalogue (jumping from 132 to 139.4 should be fine, that's why I ask to keep a copy of the file, so we can rollback if tehre is an issue for some reason) 4) In theory eveything works, but when you access Immich your thumbnails should be all blurry 5) Check your server logs, if there is a line with missing path upload/… Go Step 6, otherwise step 7) 6) Follow the media location thing https://discord.com/channels/979116623879368755/1401229113641009204/1401303535370506402 7) Show me logs and I'll see what's wrong again After that let me know how that ends, If everything works, you should be able to clean your old volumes/datasets used (I can also help you with that if necessary) But I'll see your reply tomorrow So Good luck πŸ˜„
Evy
EvyOPβ€’2mo ago
Thank you so much!! Please get some rest and I will update you when I complete the steps. πŸ™‚ Everything works, thumbnails were not blurry and no upload/ errors in the server logs. Looks like I just need to clean old/volumes and datasets I should be able to do that tho. πŸ™‚ Thanks again.
Xiticks
Xiticksβ€’2mo ago
Nice! No problem it was an interesting issue to fix And yeah no blurry make sense, it was an issue with some TrueNAS app version that has been fixed so you skipped the issue! Well I can’t sleep, but if you have an SSD pool, you could also have a look in the other thread about it Otherwise make sure the value for db is set to HDD instead of SSD in you immich config (small performance optimisation)
Evy
EvyOPβ€’2mo ago
No ssd pool, it is set to HDD πŸ˜ƒ
Immich
Immichβ€’2mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?