Immich: self-hosted photo backup with Docker Compose

What Immich does, what it needs, and how to get it running with Docker Compose in about ten minutes.

Immich is a photo and video library you host yourself. The phone app backs up the camera roll in the background, and the web interface gives you a timeline, albums, shared links, a map, face recognition and search by what is in the picture.

What you need

  • A Linux host with Docker and the Compose plugin
  • Enough disk for the library, on local storage or a mounted share
  • A local disk for the database. The Immich documentation advises against keeping PostgreSQL on a network share.

Install

Create a folder and download the two files the project publishes with every 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

Edit .env before the first start. Three values matter:

# Where photos and videos are stored
UPLOAD_LOCATION=/srv/immich/library
# Where the database lives, on a local disk
DB_DATA_LOCATION=/srv/immich/postgres
# Change it. Letters and digits only.
DB_PASSWORD=change-me

Start the stack:

docker compose up -d

First run

Open http://<host>:2283. The first account you register becomes the administrator. Install the mobile app, point it at the same address and turn on backup.

Updating

docker compose pull && docker compose up -d

Read the release notes first. Immich moves fast, and some releases need a manual step.

Screenshots

Put interface screenshots here, several on consecutive lines to get a gallery:

![[immich-timeline.png|Timeline]]
![[immich-search.png|Search by content]]