← Self-Hosting · Files & Photos · Replaces: Google Photos, iCloud Photos, Amazon Photos
What You'll Build
Immich is the closest thing to Google Photos you can run yourself: the phone app backs up every photo and video automatically, and the web app has a timeline, map, face recognition, memories ("on this day"), shared albums, and AI search that understands "sunset at the beach".
Port: 2283 · RAM: 6 GB+ recommended (4 GB minimum) · Time: 30 minutes + upload time · Difficulty: Medium
Keep your originals elsewhere too. Immich is developed quickly and occasionally has breaking changes between versions. Read the release notes before updating, and make sure your backups include the photo library.
What You Need
- Your home server from Foundations 1 (Docker installed,
~/stacksfolder). - Nginx Proxy Manager with your
*.home.example.comcertificate — required for this app. - A drive with room for your library, e.g.
/mnt/data/immich.
Step 1: Download the Official Files
Immich changes often, so always start from their current compose file rather than one copied from a blog:
mkdir -p ~/stacks/immich && cd ~/stacks/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
Step 2: Edit the Settings (.env)
nano .env
Change these lines:
# Where photos and videos are stored (lots of space needed)
UPLOAD_LOCATION=/mnt/data/immich/library
# Where the database lives — keep this on your fast SSD, NOT a network share
DB_DATA_LOCATION=./postgres
# Uncomment and set your time zone
TZ=America/New_York
# Change this! Letters and numbers only (no symbols)
DB_PASSWORD=MakeThisALongRandomString123
# Create the library folder and start Immich
sudo mkdir -p /mnt/data/immich/library
docker compose up -d
docker compose ps # all containers should be "running"/"healthy" after a minute
Step 3: First Login and Settings
- Open
http://192.168.1.50:2283→ Getting Started → create the admin account. - Administration → Users: create an account for each family member (each gets a private library).
- Administration → Settings → Backup Settings: confirm automatic database backups are on. They're written into your upload location.
- Add the proxy host
photos.home.example.com→ port2283(see the bottom of this page) — the phone app works best with HTTPS.
Step 4: Set Up Phone Backup
- Install Immich from the App Store / Google Play (or F-Droid).
- Server URL:
https://photos.home.example.com→ log in. - Tap the cloud icon → choose which albums to back up (e.g. Camera/Recents).
- Turn on foreground and background backup. Give the app permission to run in the background (Android: disable battery optimisation for Immich).
- The first backup can take hours for a big library. Leave the phone on Wi-Fi and charging overnight.
With Tailscale running on the phone, backups continue even when you're away from home.
Step 5: Import From Google Photos (Optional)
- Request your library at takeout.google.com → deselect all → select Google Photos → export as .zip files.
- Use the community tool immich-go (from GitHub) to upload the Takeout zips. It reads Google's separate JSON files so dates, albums, and locations are kept.
- In Immich, create an API key (Account Settings → API Keys) for immich-go to use.
Features to Try
- Smart search: type "red car" or "birthday cake" in the search bar.
- People: Explore → People. Name faces and Immich groups the rest.
- Map: every geotagged photo on a world map.
- Shared albums and links: share with other Immich users, or create a public link (only reachable by others if you've made Immich public).
- External library: already have photos organised in folders (e.g. from digiKam)? Add them read-only as an external library instead of uploading.
Add It to Your Proxy, Dashboard, and Backups
- Nginx Proxy Manager: new proxy host
photos.home.example.com→ schemehttp,192.168.1.50, port2283, Websockets on, your wildcard certificate, Force SSL. In the Advanced tab addclient_max_body_size 0;so large videos upload. - Homepage: add a tile in
services.yaml(how). - Uptime Kuma: add an HTTP monitor for the new address (how).
- Backups:
~/stacks/immichis already covered by the restic script. Also add/mnt/data/immich/libraryto theEXTRAlist, and un-comment theimmich_postgresdump line.
Updating Immich
cd ~/stacks/immich
# 1. Read the release notes on GitHub for breaking changes FIRST
# 2. Then:
docker compose pull && docker compose up -d
Troubleshooting
- Server is slow for hours after the first upload — normal. It's generating thumbnails, transcoding videos, and running face/AI detection. Watch progress in Administration → Jobs.
- Phone app can't connect — test the URL in the phone's browser first. Include
https://. Don't add/api. - Container keeps restarting after an update — you skipped a breaking change. Check the release notes and
docker compose logs. - Out of memory on a Pi or small box — disable Machine Learning in Administration → Settings, or run it on a more powerful computer.