How to Install Immich (Self-Hosted Google Photos with Face Recognition)

Immich: Google Photos, self-hosted — Auto backup, faces, search. 4 GB RAM minimum.

Immich is the closest thing to Google Photos you can run yourself: automatic phone backup, a timeline, albums, map view, search by what's in the picture ("beach", "dog"), and face recognition that groups people. It uses the official compose file from the project, which pulls in a database and a machine-learning container — so give it a server with at least 4 GB of RAM and plenty of disk.

Quick reference

TaskWhat
Folder~/docker/immich with the official docker-compose.yml and .env
Photos stored inUPLOAD_LOCATION in .env — put it on the big drive
Visithttp://server-ip:2283
Phone appImmich (iOS/Android) → server URL → enable backup
Updatedocker compose pull && docker compose up -d (read release notes first)

1. Get the official files

mkdir -p ~/docker/immich && cd ~/docker/immich
curl -O https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
curl -o .env https://github.com/immich-app/immich/releases/latest/download/example.env

Immich changes often; using the project's own compose file means the database and machine-learning containers always match the version.

2. Edit .env

nano .env

UPLOAD_LOCATION=/mnt/data/immich
DB_DATA_LOCATION=./postgres
TZ=Europe/London
IMMICH_VERSION=release
DB_PASSWORD=change-this-to-something-long

UPLOAD_LOCATION is where every photo will live. Put it on your largest drive (tutorial 22) and include it in backups.

3. Start it

docker compose up -d
sudo ufw allow 2283/tcp

Four containers start: the server, machine learning, PostgreSQL and Redis. First start takes a couple of minutes while models download.

4. First run

Open http://192.168.1.50:2283, create the admin account, and set the server's address under Administration → Settings → Server → External domain if you'll use a name or reverse proxy.

5. The phone app

Install Immich, enter the server URL and log in. Open Backup, choose the albums to back up (Camera Roll at least), and turn on Automatic backup. Leave the phone charging on Wi-Fi overnight; a big library takes a while. Once uploaded, the Free up space option can remove photos from the phone that are safely on the server.

6. Your existing photos

Don't upload them through the app. Either:

Face recognition and search

These run in the machine-learning container on the server's CPU (a GPU helps but isn't required). The first pass over thousands of photos takes hours; you'll see progress under Administration → Jobs. Afterwards, People groups faces — name them and search "Sarah at the beach 2019".

Reverse proxy

Proxy photos.example.com to 127.0.0.1:2283 (tutorial 28) with client_max_body_size 50000M; and the WebSocket lines, and add HTTPS. Point the app at the https address.

Troubleshooting

Containers restart constantly. Not enough RAM, or the PostgreSQL volume has the wrong permissions. docker compose logs immich_postgres.

Phone backup stuck at "uploading". Usually the upload limit in Nginx, or a sleepy phone. Keep the app open in the foreground for the first big batch.

Updates broke something. Immich occasionally needs manual steps between versions. Check the release notes on GitHub before docker compose pull, and back up the postgres folder first.

Duplicate photos. The app only uploads each photo once; duplicates usually come from WhatsApp or Downloads albums being selected. Deselect them in Backup settings.

Wrapping up

Official compose file, .env with the upload path on the big drive, up -d, phone app with automatic backup. Your photos stop living on a subscription, the search is as good as the big names, and the only person who can see them is you.

Call us