Upgrade gone wrong
I've been using HexOS since Dec 2024. I just did the update from Immich app version 1.127 to 1.137. I saw the note after the fact that it needs to be updated to 1.132 before going to 1.137. I'm a noob at TrueNAS but familiar/comfortable with Linux CLI and docker containers since I use both at my day job. Since iit's TrueNAS it's my understand there is no
docker-compose.yml
file used to launch the app.
I installed using HexOS in Dec 2024. I updated using the TrueNAS interface; this shouldn't be the root of my problem. After updating in TrueNAS, Immich failed to launch (as expected from the release notes). This is when I had the "oh crap" moment when you realize you might loose some data. Anyways, I tried a few things and eventually found the data in my /mnt/HDDs/Applications/immich
dir. I copied this onto my desktop as a crude backup.
Since, I've uninstalled Immich in the TrueNAS interface and reinstalled. This caused the application to create a new config; I wasn't thinking about the configuration HexOS would've implemented for me. This cause some issues; HexOS does not use ix-volumes, it defined Host paths in the config. I just reinstalled Immich through HexOS, which installed 1.137 and used the existing host defined paths to the data. The issue now is, my database password is not correct in the configuration. HexOS seems to generate random ones, so I have no clue what my initial installation used for the password for Postgres or Redis.
Is there a way to change the password? What is being stored in the database? Could I delete the postgres_data
folder and recreate the database from scratch while keeping the other data? I really only care about getting the photos/videos back into Immich, I haven't had much time to play with the other features so there isn't much there in terms of data.30 Replies
:wave: Hey @TheDoctor33,
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.https://immich.app/docs/guides/database-queries/#postgres-internal
If that doesn’t work please reach out to HexOS for support as we are not familiar with that system
This seems to have worked, now it seems the upgrade issue still persists:
Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade
. Will probably try downgrading to TrueNas 1.7 for the app, then update correct; I believe Immich 1.137 is 1.9 in the TrueNAS interface.
Is there an easy way to downgrad immich on TrueNAS?This all seems so complicated. I have no idea how other 3rd party deployments work. I myself use TrueNas, but I just run Immich via docker compose and it has worked pretty flawlessly. I think the extra overhead of these systems that are supposed to make it "easier" seem to be making it more complicated. Maybe you should consider using docker compose directly on TrueNas?
Personally, I have a git repository cloned on the server and a Cron job that runs git pull and docker compose up automatically every ten minutes. Renovate tells me when a release/update is available and I simply merge the PR when I'm ready to update. It'll do the update within ten minutes.
HexOS is in beta, it's a cool idea for people who don't want to "play" with their setup, but I get where you're coming from.
I did download all the assets from the immich application directory (with
uploads
, encoded_videos
, etc). I would just "restart" and reupload everything, but I'll loose all date data since these photo's were all created the day I downloaded them technically. I do have a backup of my original postgres data base. I'm guessing I could load that into a new install?Hexos does make initial deployment a little easier
Unfortunately it makes debugging/fixing issues much harder
Yes, if you have the database backup plus all the mount folders, you can restore
Another note, I did try
imich-cli
, but it kept returning all the files were already uploaded
Is the easiest to delete immich folder in TrueNAS, reinstall, upload backup folders, load postgres backup?
I suppose this won't work unless I find a way to load an older version for the database upgrade
Since I was on v1.122, now I'm on v1.137
So if I'm thinking correctly, I would need to load v1.131 or less, load the backup data, then update to v1.132, then finalize the update to v1.137A database restore will recreate the schema and completely replace any existing database so that doesn't matter as much.
But you still have the problem that you need to update to 132 first.
I don't know if you can even pick the version with hexos
@jrasm91 I was poking around the TrueNAS interface (which HexOS makes available, it's just not the default). I can't even choose to install the older version, so I'd have to install Immich using the docker compose method, then update from there. I wasn't able to find the docker run commands TrueNAS uses, other wise I would just run the docker run commands with the 1.122 version, then "upgrade" to the 1.132 version, then the final upgrade to 1.137.
A bit annoying.
Yeah, I'm pretty annoyed they don't let you go backwards. I can see there being arguments, but other than "we don't have that version anymore" I'm probably rejecting them as valid
Couldn’t you create a custom immich app that points to all your different volumes and using the v1.122 image then upgrade to v1.132 and afterwards reinstall the immich catalog app pointing to the volumes?
I don’t know how hexOs creates the volumes and if there is a way to modify them, but you can do that inside TrueNAS
HexOS created defined volumes, I'm not sure what the correct term is. But it didn't use ix-volumes; this was also v1.122 of Immich, so it's been a while. I'm guessing I could load manually with v1.132, then 1.133, then 1.137. I think that would cover all the breaking changes
There's also the issue of the change for directory names, so the mounted volumes should get moved into the */immich/data folder at some point. There's been some mention of getting app updates working for Q3 on the HexOS forums, but I'm to impatient and masochistic for that 🙃
Yeah there is that problem
The migration guide is in preview I shared the link a lot of time, don’t have it now sorry
With the custom app, this is not an issue
But I don’t know how this would work with hexOs if you want to reuse the app from them again
Honestly, it probably doesn't matter if HexOS can't. I'm guessing that as apart of the upgrade app feature, HexOS would check what the existing configuration is. Not sure how they'd manage all those different configurations though
Not sure if anyone here will know how to in the TrueNAS interface, but I can't find the downgrade button. And the last time I installed immich through TrueNAS apps, it only let me select the most recent version (1.9.2 at the time) from the verison dropdown.
There is that
https://apps.truenas.com/managing-apps/managing-installed-apps/
but as hexOs created dataset (and so host path) if you don’t have snapshots of them, you won’t be able to roll them back
(Since your immich has been broken with the update, I suppose that the only dataset that has changed and need to rollback is the database one)
TrueNAS Apps Market
Managing Installed Apps
Provides information on managing apps in TrueNAS including updating, deleting, stopping and starting, and managing container images.
Would I be crazy to pull the older database docker image and retag it as what TrueNAS is running?
That would assume its using the tag name to launch it
It might work? It pulls the image based on the version (https://github.com/truenas/apps/blob/master/ix-dev/community/immich/ix_values.yaml)
But it’s at your own risk
Sigh, I think I just really hosed myself not updating so long. Worst case, a few photos loose the date metadata, most photos I can just reupload
This is what I get for saying, "I'll just update real quick and go to bed" lol
[Nest] 13275 - 08/07/2025, 5:58:35 PM LOG [Api:EventRepository] Initialized websocket server
[Nest] 13275 - 08/07/2025, 5:58:35 PM WARN [Api:DatabaseRepository] Migration "1744910873969-InitialMigration" failed
[Nest] 13275 - 08/07/2025, 5:58:35 PM ERROR [Api:DatabaseRepository] Migrations failed: Error: Invalid upgrade path. For more information, see https://immich.app/errors#typeorm-upgrade
Unraid
It's more TrueNAS/HexOS related here
From which version did you try to upgrade from?
I''m not sure how to check that
Do I need to downgrade?
Maybe ask in #unraid
As well your logs
I think it is related to that (as suggested by your logs): https://immich.app/errors#typeorm-upgrade
You probably were on an older version of Immich <132 and so the migration can't be made
I don't know in unraid if you can downgrade and the upgrade to an in between version
Can you?
If yes, I think you could
then, if possible, upgrade to 1.132 of Immich
And afterwards to 1.137.3
Working now, thanks
IDK why my reverse proxy isn't though
That's weird, nothing changed in the network as far as I know
Maybe on the Unraid side?
Nothing should have changed
You have the ability to choose the version? I don't know how things works on Unraid
Yeah with docker
So you're not using the app from the catalog? Or you can choose which docker image it uses anyway?
Just tweak the repo line