Last year I compared running Nextcloud and Immich side by side, and the verdict was clear: for photos specifically, Immich wins. It's the closest thing to a self-hosted Google Photos — automatic phone backup, face recognition, map view, shared albums — but several people asked for the actual install walkthrough. Here it is.
This guide gets Immich running with Docker Compose, your phone auto-uploading, and the mistakes to avoid.
What you need
- A server with Docker and Docker Compose — 4 GB RAM recommended (the machine-learning container is the hungry one; it runs fine on less if you're patient)
- Storage sized for your library, plus headroom for generated thumbnails (roughly 5–10% extra)
- Optional but recommended: a domain and HTTPS via reverse proxy
Get the official files
Immich ships a ready-made Compose setup. Don't hand-roll it — the project moves fast and their files track the correct service wiring:
mkdir immich && cd immich
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
That gives you four containers: the server, machine learning (faces/objects/search), Redis, and PostgreSQL with the pgvecto.rs extension the ML search needs.
Configure .env
Open .env and set three things:
# Where your photos actually live — point at real storage, not the SD card
UPLOAD_LOCATION=/mnt/storage/immich
# A proper password, not the default
DB_PASSWORD=use-something-long-and-random
# Your timezone for correct timestamps
TZ=Asia/Kolkata
The UPLOAD_LOCATION choice matters more than it looks. Everything Immich ingests lands there, organized by user and date. Moving it later is possible but annoying — put it on the big disk now.
Start it
docker compose up -d
docker compose logs -f immich_server
Wait for the "Immich Server is listening" line, then open http://your-server-ip:2283. Create the admin account on first visit — this is your account, the family gets their own later from Administration → Users.
Phone backup: the part everyone actually wants
Install the Immich app (Play Store, F-Droid, or App Store), log in with your server URL, then:
- Tap your profile picture → Backup
- Select albums to include (Camera at minimum)
- Enable Background backup — on Android also disable battery optimization for Immich, or uploads silently stop overnight
- Leave "Upload on Wi-Fi only" on unless your data plan is heroic
The first sync of an existing library takes a while. Plug the phone in, let it chew overnight.
Make it survivable
HTTPS. If the app will ever connect outside your LAN, put Immich behind HTTPS — you're streaming your entire photo library. Any reverse proxy with Let's Encrypt works; just make sure WebSocket upgrades pass through (Upgrade/Connection headers in Nginx).
Backups. Immich is not a backup — it's your library. Protect two things: the UPLOAD_LOCATION folder (the actual photos) and a database dump:
docker exec immich_postgres pg_dumpall -c -U postgres | gzip > immich-db-$(date +%F).sql.gz
Fold both into your 3-2-1 backup routine.
Upgrades. This is the one rule Immich veterans repeat: read the release notes before pulling. Immich ships breaking changes and database migrations regularly. docker compose pull && docker compose up -d handles the mechanics, but never upgrade blind, and take a database dump first. Auto-updaters like Watchtower are a bad idea here.
Nice extras once it's stable
- External libraries (Administration → Libraries): point Immich at an existing photo folder without importing/copying it — perfect for the archive already on your NAS
-
Hardware acceleration: if the server has a GPU or Intel Quick Sync, enable it for thumbnail and transcoding jobs in the Compose file's
hwaccelvariants - Shared albums with partner accounts: each person backs up to their own account, then share albums — no more "send me that photo"
Where this leaves you
Photos flowing automatically from every phone in the house to storage you own, searchable by face and place, with no subscription and nobody training models on your kids' birthdays. Combined with Filux for sharing files and Vaultwarden for passwords, the biggest pieces of the Google stack now live on your hardware.
Top comments (0)