May 29, 20251 yr We recently had some of those ol' Breaking Changes to our immich installations (immich 1.133.0). Funny thing: they don't actually break it, but they also don't do the background upgrade (immich>postgres+extension) to reap the benefits of the faster/different postgres extension "vectorchord." They will eventually break it when the immich team drops support for the older postgres extension "pgvector."I waited for a while to do this upgrade. I wanted to see if anything easier came up. I finally decided to put on my big-boy pants and move over to the Docker-compose method that the immich team prefers. Unraid does have that capability, it's a little clunky, but it's there. Here are the general steps I took to make this all happen. I'll fill out more details as I can on this initial post with some screen shots so you can mirror this setup if you want. I've never relied so heavily on chatgpt for this stuff: it's a pretty decent tool for operating at a higher level than you're capable of, so that's fun. Enough rambling!sourceshttps://immich.app/docs/install/unraid#docker-compose-method-officialI'm not going to re-type the excellent guide for Unraid at immich.app, but I will pepper it with my own experience.Get Docker Compose Manager by dcflachs. It's in the Community Apps tab.I think you can unraid > Docker > (scroll to bottom) Immich > Compose Up. But we're going to nuke parts of it here anyhow. We need to slam that old database into it. This will make four generic dockers show up under unraid > Docker tab: immich_machine_learning, immich_postgres, immich_redis, and immich_server.Get the old database docker exec -t PostgreSQL_Immich pg_dump -U postgres immichdb > /tmp/immichdb_only.sqlI had followed Spaceinvaders youtube instructions, and was using his postgres immich docker from CA (Community Applications).Get into the CLI (command line interface) and head to /boot/config/plugins/compose.manager/projects/Immich/, or whatever you called this docker-compose-immich. Bring that thing back down with the CLI command:docker compose downRunning this command in this folder, unraid will know which docker you're talking about.Then wipe the old database (do not drink beer while issuing rm -rf commands)rm -rf /mnt/user/appdata/postgres-immich-compose/*That should remove everything that was in that folder that immich populated on it's own when it first started.Head over to your .env file. That's in unraid > Docker > (scroll to bottom) gear > edit stack > ENV FILEmake sure these three lines are in there:DB_DATABASE_NAME=postgresDB_USERNAME=postgresDB_PASSWORD=postgresNow we're going to bring up ONLY the database with these environmental variables.docker compose up -d databaseCreate some database stuffdocker exec -it immich_postgres psql -U postgresThen while in the psql promt, paste and run this stuff in there:CREATE USER immichuser WITH PASSWORD 'immichpass';CREATE ROLE immich;GRANT immich TO immichuser;ALTER USER immichuser WITH SUPERUSER;CREATE DATABASE immichdb OWNER immichuser;\qAhh, I should mention: you want to stick with the same stuff as you had on your previous installation. You can see what I was using, and am going to use for this new one as well.Now go back to .env file and change it to this:DB_DATABASE_NAME=immichdbDB_USERNAME=immichuserDB_PASSWORD=immichpassThere might be some other stuff in there as well, I leave that alone.Restore old database to new databasecat /tmp/immichdb_only.sql | docker exec -i immich_postgres psql -U immichuser -d immichdbYou shouldn't see any errors flying by, only successful looking things.Once that completes, bring stack down, then back up again. (running these from that /boot/config/plugins/compose.manager/projects/Immich/ folder again)docker compose downdocker compose up -dWhile I was watching that crap fly by, I noticed a few things aboutReindexing clip_indexReindexing face_indexclustering: iteration X.... Outstanding.At this point I'm able to get into the immich webgui, and login with my old credentials. Still busted thumbnails. Made sure my UPLOAD_LOCATION in the .env file was:UPLOAD_LOCATION=/mnt/user/memories/immich(not the best folder I'd say, but it's what I was using before, and moving entire immich libraries is a whole 'nuther can-o-worms)Edit /boot/config/plugins/compose.manager/projects/Immich/docker-compose.override.yml, and addedvolumes: - /mnt/user/memories/immich:/photoscompose down, compose up: booya, thumnails and images. Here's my whole override.yml file. Some of these things we'll add later in this post.services: immich-server: networks: - default - proxynet volumes: - /mnt/user/memories/immich:/photos environment: - TZ=${TZ} labels: net.unraid.docker.managed: 'composeman' net.unraid.docker.icon: '' net.unraid.docker.webui: '' net.unraid.docker.shell: '' immich-machine-learning: labels: net.unraid.docker.managed: 'composeman' net.unraid.docker.icon: '' net.unraid.docker.webui: '' net.unraid.docker.shell: '' redis: labels: net.unraid.docker.managed: 'composeman' net.unraid.docker.icon: '' net.unraid.docker.webui: '' net.unraid.docker.shell: '' database: labels: net.unraid.docker.managed: 'composeman' net.unraid.docker.icon: '' net.unraid.docker.webui: '' net.unraid.docker.shell: ''networks: proxynet: external: trueNow to replace the old immich with the new hot-rod-immichI use nginx proxy manager NPM. For my dockers to show up as available to NPM, they have to be on a custom network. Mine's called proxynet (old callout there to Spaceinvader and reverse proxy video).Shut down old immich and associated postgres docker. uncheck auto-start on them.Get back into /boot/config/plugins/compose.manager/projects/Immich/docker-compose.override.yml, add: immich-server: networks: - default - proxynetalso slap this on the end of the file:networks: proxynet: external: trueFinally make sure immich_server joined with a valid IPdocker network inspect proxynetGet into NPM, change the port to the port this new immich uses, for me that was/is 2283. You can get this from the yaml (unraid > dockers > gear on Immich > Edit Stack > Compose File.Bob's your uncle.I'll mention here on the importance of backups. While Immich does have some database dump stuff built in, I couldn't really verify if it was working. On one of my previous posts, scroll down to "Below is old stuff." and I have my latest backup script that is pretty slick IMO. It uses smtp2go, and curl to send myself emails for the backups.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.