Immich: self-hosted photo backup with Docker Compose

Immich backs up photos and videos from your phone to your own server. What it needs and how to install it with Docker Compose.

Immich is a photo and video library you host yourself. The mobile 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
  • At least 6 GB of RAM and 2 CPU cores. With 4 GB Immich can run only with machine learning turned off.
  • Enough disk for the library
  • A local disk for the database. Network shares are not supported for PostgreSQL data.

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, no special characters.
DB_PASSWORD=change-me

The same file has IMMICH_VERSION. Leave it as downloaded, or pin an exact release if you want updates to happen only when you decide.

Start the stack:

docker compose up -d

It runs four containers: the server, machine learning, Valkey and PostgreSQL.

First run

Open http://<host>:2283. The first account you register becomes the administrator. Install the mobile app, enter the same address as the server URL and turn on backup.

Updating

docker compose pull && docker compose up -d

Read the release notes first. Some releases need a manual step.