brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Guide: Immich on Unraid, back up the photos on your iPhone automatically

Immich on Unraid, back up the photos on your iPhone automatically

Guide unraid

7 steps 6 min read

I run Immich on my Unraid server, and it is the one app I would tell every iPhone owner with a NAS to look at first. You get your own photo library, with automatic upload from the phone, and nothing leaves your house unless you want it to. I own an iPhone and live in Leiden, so this is the setup I would build here: Immich in Docker Compose, the iPhone app, Tailscale for the road, and a proper backup. I checked everything below against the official docs; Immich’s current example.env sets IMMICH_VERSION=v3, which is what I followed.

Time
6 min
Steps
7
Updated
19 Nov 2026

You will learn

  • Download the compose file and .env
  • Edit the .env
  • Start it
  • The iPhone app
  • Reach it away from home with Tailscale
Immich web timeline and mobile app

What you need

An Unraid server with Docker running and the Compose Manager plugin (the original one is deprecated; Compose Manager Plus is its continuation). Immich runs as four containers: immich-server, immich-machine-learning, a Valkey container (the Redis-compatible one) and PostgreSQL with the vector extensions. The official compose file brings all four, so you do not install them one by one. Do not use the old Community Apps route from Immich’s Unraid page: that template is community-made and wants a separate PostgreSQL 14 container. I would follow the Docker Compose route from the main install docs.

One catch: the Immich Unraid page was written on Unraid 6.12.10, whose Docker Engine had no start_interval support. If your Docker is older than v25 and you get an error about it, comment that line out in the database section. I could not confirm which Docker Engine your Unraid release ships, so check yours.

Step 1 of 7: Download the compose file and .env

In a new Compose Manager stack, or in a folder on the server, fetch the two files from the latest release:

mkdir ./immich-app
cd ./immich-app
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env

Always take the compose file of the current release. The one on the main branch may not match it.

Step 2 of 7: Edit the .env

These are the lines I would change:

UPLOAD_LOCATION=/mnt/user/photos/immich
DB_DATA_LOCATION=/mnt/user/appdata/immich/postgres
TZ=Europe/Amsterdam
DB_PASSWORD=<random letters and digits only>

The paths are examples, use your own. Put UPLOAD_LOCATION on a real share on the array (an absolute path under /mnt/user/), never inside the Docker image or directory, and make sure the share has room, because this is your whole photo library. The database goes in appdata, ideally on a cache pool. The docs say network shares are not supported for the database, so no NFS or SMB mount there. Immich’s Unraid page also warns that leaving the default database path can make the container restart in a loop. DB_PASSWORD may only use A-Za-z0-9, or Docker can choke on it. Pin IMMICH_VERSION to a release if you do not want surprises when you update.

Step 3 of 7: Start it

docker compose up -d

In Compose Manager you press Compose Up instead. Open http://<server-ip>:2283, create the admin user and you are in. Use docker compose with a space, not the old docker-compose.

Step 4 of 7: The iPhone app

Install Immich from the App Store, enter the server URL (the :2283 address from above) and log in. Tap the cloud icon at the top right, choose the albums to back up, scroll down and tap Enable Backup. I would pick the albums on purpose and skip the rest.

On iOS, Apple decides when background tasks run, and the app cannot force it. Immich’s docs say the more often you open the app, the more often background backup runs, and Background App Refresh has to be on (Settings, General, Background App Refresh). New photos are also uploaded when you open or resume the app, so after a day of shooting I would just open Immich on Wi-Fi and let it finish. By default it uploads only on Wi-Fi, and iCloud originals are pulled through the app’s cache first, which costs extra data off Wi-Fi.

Immich app backup screen with the Select button for backup albums

Step 5 of 7: Reach it away from home with Tailscale

I run Immich with Unraid’s per-container Tailscale integration: in the Docker tab you edit the container, switch on Use Tailscale, give it a unique hostname and approve it with the link in the logs. Two limits from the Unraid docs: containers in host network mode do not support it, and some containers do not work with it, so test first. The steps are written for Unraid 7 and later. Install Tailscale on the iPhone too, sign in to the same tailnet and use the Tailscale address as the server URL in the Immich app. The full explanation is in the Unraid Tailscale docs. I like this much more than opening a port on the router.

Step 6 of 7: Back up the database and the photos

Immich dumps its database every day at 02:00 by default and keeps the last 14, in UPLOAD_LOCATION/backups. You can change that under Administration, Settings, Database Dump Settings. The dumps hold metadata only, no photos. So both pieces need a copy: the whole UPLOAD_LOCATION (that includes the dumps) and, ideally, the database. Immich recommends the 3-2-1 rule: three copies, two kinds of media, one off-site. Immich does not make those copies, you still need a backup tool for that. If you cannot stop immich-server during a backup, copy the database first and the files second, because files without records are safer than records without files.

Step 7 of 7: Where it breaks

Most trouble comes from a database on a network mount or in the default path (Postgres will not start), a DB_PASSWORD with odd characters, an old Docker Engine choking on start_interval, or a backup that only copied the photos, so you cannot restore the albums. On the phone, a background backup that seems lazy is iOS, so open the app. After every update, read the release notes before you pull.

Further reading

Link