Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[GUIDE] restore previous Immich CA to newer 1.133.0 docker-compose-method

Featured Replies

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!

sources

https://immich.app/docs/install/unraid#docker-compose-method-official

I'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.sql

I 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 down

Running 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 FILE

make sure these three lines are in there:

DB_DATABASE_NAME=postgres

DB_USERNAME=postgres

DB_PASSWORD=postgres

Now we're going to bring up ONLY the database with these environmental variables.

docker compose up -d database

Create some database stuff

docker exec -it immich_postgres psql -U postgres

Then 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;

\q

Ahh, 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=immichdb

DB_USERNAME=immichuser

DB_PASSWORD=immichpass

There might be some other stuff in there as well, I leave that alone.

Restore old database to new database

cat /tmp/immichdb_only.sql | docker exec -i immich_postgres psql -U immichuser -d immichdb

You 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 down

docker compose up -d

While I was watching that crap fly by, I noticed a few things about

Reindexing clip_index

Reindexing face_index

clustering: 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 added

volumes:

- /mnt/user/memories/immich:/photos

compose 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: true

Now to replace the old immich with the new hot-rod-immich

I 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

- proxynet

also slap this on the end of the file:

networks:

proxynet:

external: true

Finally make sure immich_server joined with a valid IP

docker network inspect proxynet

Get 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.

  • Author

placeholder

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.