Migrating from (old) TrueNAS -> docker compose
Hello,
I was very stupid a while ago and initially set up my immich server using ixvolumes rather than host path. Had quite busy life events so server maintenance kinda fell away from that. I'm now trying to move over to having it within a docker compose (currently using dockge in truenas) rather than relying on truenas community apps.
So far:
- I was running truenas cobia (23.10) with immich server v119.
Made a new directory and rsync all data from ix-systems location to my new /tank/configs/immich/ using the advised folder structure (/data {library, encoded-video etc} and /pgData).
- On that setup confirmed new directory working by editing host path volumes & reconnecting to dB. All data existed and accessible. Password of database noted to be correct. Did notice weirdly that database username was "immich"?? At this point there was no "redis" password
- I then upgraded from cobia -> dragonfish -> electric eel -> fangtooth (25.04) incrementally as per truenas docs. I was outside of the time window for apps migration so planned to just start fresh with docker
- installed immich v141 via compose and then reading logs realised about breaking changes etc. tried to start by going to v132.3 but keep running into database issues
- now trying to install immich via truenas community apps to confirm working prior to migrating to docker compose
I noticed when I was running cobia, the database username was immich (rather than online/docs suggest should be postgres). The database password is correct and confirmed when previously working on cobia.
Any immich version past v119 running into trouble in getting the database to connect.
Anyone know if I've done something else stupid? Is truenas apps version of immich's database username normally "immich" rather than postgres? Is there a way to just do this all in docker compose, rather than through truenas apps, or should I upgrade through breaking changes through truenas first? What should I be putting as redis password?
80 Replies
:wave: Hey @ozboz7,
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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: 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.Thanks in advance for any help.
Also mandatory ping of @Xiticks because he seems to be the truenas guy / girl ππΌ
Guy π
Can you share the logs the app trows?
Immich uses immich
and not postgres
compose is possible, but I do immich app that I convert to custom yaml, so the settings are set correctly
I had seen this written in a few other truenas specific immich help forums, so not sure what's going on there. Thanks for confirming though.
The main issue I'm currently having is actually getting v132.3 on truenas. Within the community apps there's no version option. When I tried to install via custom apps there's obviously no prefill for the data/pgData folder structures and I'm unsure which type to use (new Vs old etc) for this specific version
Install latest through catalog
then click on three dots (next to tthe edit button) menu and convert to custom app
Well correction on that upon reading Immich docs, they use this in their .env file
DB_USERNAME=postgres DB_DATABASE_NAME=immichBut I know that for trueNAS the username is "immich"
Yeah I saw that again today. Thanks for confirming though
Did you finished the migration? It's just to know if I can "leave" this thread or not π
Not yet. Ran into ?permissions issue but was trying to sort it out without bothering you!
When I pull v1.132.3 I get system integrity folder checks errors
It's looking for /upload/encoded-video, however mine has always been stored in /data/encoded-video/
I rather fix it with you than having to understand what you did that might have fcked up the thing even more π
Oh yeah
as you "downgraded" from a more recent version
Was there a change to file structure etc with newer versions?
you also have to change, around line 438
/data into /usr/src/app/upload
fs change inside Immich
was not necessary on TrueNAS side, but the dev made it (and I think it's better anyway)
Immich-Server bind volumes are /configs/immich/data/ , with target /data
change target
to /usr/src/app/upload
So just change the target to what you said
Thanks will try now ππΌ
Just to check do I need it to be β/upload/" ?
Or can I drop the last forwardslash
??
Put THAT extaclty
/usr/src/app/upload
Do I need a "/" on the end
it will be changed to /data after
Thanks. Never understood when you do / don't need to include
with the / it maps the content of the folder, not the folder itsefl (well depends on stuff), but that's what I understoo
Now failing to read /upload/backups
I think that's because version I was previously on didn't have this. Do I just mkdir /backups and touch .immich ?
I think that's because version I was previously on didn't have this. Do I just mkdir /backups and touch .immich ?
It's in ix-Volumes
but well, it's fine to recreate it inside
this way you keep the old backups somewhere just in case
I don't think I ever had a backups folder even in ix-volumes when I rsync across
Was on v119
Only all the other folders
Oh yup, you're right
So I can just mkdir and it shouldn't cause issue
I've still got my rsync backup anyway
It lives!!!
Now just need to migrate over to dockge π
You want that?
Thanks so much for that. Can't believe the convert to custom app was hidden in plain sight
Well it's just been added in 25.04, so that would make sense you missed it
I would update to latest first (using TrueNAS app catalog)
I mean I've been very happy with it in truenas but previously it lags behind with updates etc and from the (limited) reading I've had it seems better to keep critical apps in some kind of docker wrapper rather than relying on ix systems?
Not sure if that's changed with switch from kubernetes to docker backend
Or custom compose and go thorugh every breaking changes
But the app catalog method is the fastest
(LIke you delete the custom app, then you install the app again and point it to your 2 datasets)
Well now it's docker under the hood
And as long as you use hostpath dataset it's easy to switch between the 2
Yeah never again using ixvolumes
π
For important data
Yes
At some point they might make it a visible dataset
or something like that (but not before 2026 or 2027)
So ridiculous that I change that for everything else and for this one app I left it as is when testing... Then never went back and changed
I've always used hostpath dataset for all my apps
Saw that already multiple times
laziness is most of the time a bad thing xD
BUt so, do that to at least be on latest and I know it works
Then you can break it however you like, you'll have to open a new ticket π
So to get to latest version just go through each breaking change version (133 -> 136 -> 137 -> latest)?
Do I need to dive into release notes for each and check what is breaking and what requires changing, or do you happen to know if it'll just sort it for me?
Do it from catalog app
Will be way faster
Then you can convert to custom app of use dockge
As in catalog and just change the version number incrementally?
Nah
so you delete the custom immich app
then you install immich again from the catalog
the small breaking changes are handled by Immich as the TrueNAS catalog uses the correct settings
Great so I don't need to go and individually change manually
No
you could manually change in the yaml, but doing with catalog ensure (me) that you don't srew up a thing
Out of interest do you run immich via truenas catalog or in another instance
I run it via the catalog (that's why I'm the guy helping for that)
Makes sense
:p
It's just out of laziness, because I know that, as long as I do that at least once a month, I can click on "update" and the app will update without issues
(Unless there is this big migration thing, but I readabout it and had already done that months ago)
And I read Immich breaking changes, it's just that I know with TrueNAS they're 99% of the time handled
That is nice TBF.
What are the benefits of running custom rather than truenas in your eyes?
Also... Didn't write down my redis password. Obvs have my dB password. Do I need the redis password?
customability/ability to use apps outside the catalogue
but for that I've another system where I've portainer
And I also have dockge on TrueNAS for 3-4 apps
Nope, redis is a db that lives in ram, and the way Immich uses it, it doesn't need a password so it's reset each time you reboot the app/the machine
Yeah I was looking at arcane. Looks like a hybrid of dockge & portainer
Even though you can already customize a lot with the catalog options
So just enter random string for redis
Yeah, saw that I might try it one day too
Well I guess you can run completely custom apps anyway now right? Just dockge/portainer allows you to view more and mess with them a bit easier
You can yes, just that the auto update features might not be available
Ahh yeah
So you'll have to check when you update your apps
If you have time for that, that is fine
But as you were stuck on 1.119, I'm not sure that's your case
Well, at some point Immich will reach stable, so updates might not required to be that frequent
Hahah definitely. Trying to get more streamlined. Life really gets in the way sometimes
AS for TrueNAS update, the next one should replace the way it's updated (will relies on train, so you will also be able to just click "update" to change in between major versions)
Amazing. It's pulled and no errors. All running smoothly. Thanks so much.
You don't happen to know if memories are a feature on android app now?
Pleasure to have helped!
I get them on web but previously didn't on the app
They always have been?
Well for some times at least
I know I've them on IOS
but they should also be on Android
I assumed my server was too outdated for mobile, but had web or something
Ignore me it's just appeared at the top. Needed a moment to populate I guess
Can I buy you a coffee or anything for your help?
Probably need to be regenerated as they've been modified at some point
PayPal.Me
Pay Xantin PrΓ©ser using PayPal.Me
Go to paypal.me/Xiticks and type in the amount. Since itβs PayPal, it's easy and secure. Donβt have a PayPal account? No worries.
Which option gives you more money / who takes less commission π
I think the paypal one if you do it in euro?
Because on ko-fi it's set to euro soo you pay the difference, but then paypal take a fee
You could try paypal, as I never used it before
My wife will stop hounding me about uptime now xD
Just need to immich-go the 1tb backlog of old pics and vids and she'll be content
I have 0 commission fee on euro so can do either
Will do PayPal if you want me to try that?
That will be great, I should do that also (well for me as I'm single xD)
For now I'm still relying on externnal libraries
I'll let you know if it took a fee or not haha
Added my euro card so should've come without fee hopefully
I just have the takeout file so think immich-go would be easier to use now than set up an external library
Oh, yes, if from google photos, that's definitely the way to go
I though you already have a structured archive
Nope mostly gphotos got some old VHS family tapes that I am trying to rip and tag but hopefully will be able to do that directly into immich
Yes, this is the bestway to have everything inside Immich
Might be useful also if you want to have a folder structure at some point (in case you move away from Immich or idk what other reason
Which preset do you use? I'm using yyyy/yyyymm/yyyymmdd/image
{{y}}/{{MM}}/{{filename}}
But this is clearly up to you an can be changed later on
As written in the Notes in this section, you have to run the "Storage Template Migration Job"
And if you edit your users, you can also set a Storage Label, so the main folder has a name that makes sense
As in set a label for each user?
Last question (maybe) - do you use any additional authentication other than user+pass for logins? Eg oauth?
I'm using a tunnel ATM to access. Have problems with reverse proxy because my IP is CGNAT. Hopefully that will change soon but can't do anything about it currently
yes
I'm using authentik (also set on TrueNAS) because I know it's still possible to disable it in Immich if it fails
And wdym Ip is CGNAT? LIke it changes? Or reverse-proxy won't work at all
Its like IP where it's shared across multiple users & locations so unable to reverse proxy
Without significant issue
Got no fees! Thank you!!
That's sounds really fun!
I know that my ISP rolls IP so I have a script that checks to update it, never knew there was thing like yours
@Xiticks Hi man, thanks for your support. I'm pretty stuck now.
This thread has been closed. To re-open, use the button below.