Skip to main content

Self-Host Immich on Docker: Your Private Google Photos Alternative (2026)

· 7 min read
Yassine El Haddad
Software Developer & Automation Specialist

I build production AI agents, web scrapers, and automation pipelines. Most of what I publish here comes from the actual problems they run into: proxies that get banned, anti-bot stacks that fingerprint your client, RAG that drifts when the underlying data moves. Stack: Python, TypeScript, Go, FastAPI, LangChain, Crawlee, Playwright, deployed on AWS, GCP, and Cloudflare.

Immich is an open-source photo and video backup platform that runs on your server. It offers automatic uploads from mobile apps, face recognition, CLIP-based semantic search, and timeline views — all without sending data to Google. Deploy it with Docker on a Liquid Web VPS for full control and privacy.

What Is Immich?

Immich is a self-hosted alternative to Google Photos. It provides:

  • Automatic backup from iOS and Android apps
  • Face recognition — groups people across photos
  • CLIP search — find photos by describing them ("beach at sunset")
  • Timeline and albums — browse by date, location, or custom collections
  • Video support — upload and transcode video (optional)

All processing happens on your server. No cloud lock-in, no subscription fees beyond your VPS.

Server Requirements

ResourceMinimumRecommended
CPU2 cores4 cores
RAM4 GB8 GB
StorageSSD, scale with mediaSSD, 500 GB+ for families
OSUbuntu 22.04Ubuntu 24.04

The machine-learning container needs extra RAM for face recognition and CLIP. Plan for 4 GB minimum, 8 GB if you have large libraries.

Docker Compose Setup

The recommended approach is to use the official compose files from the Immich releases:

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

The official stack includes:

  • immich-server — Main API and web UI (port 2283)
  • immich-microservices — Background jobs (thumbnails, metadata, encoding)
  • immich-machine-learning — Face recognition and CLIP search
  • postgres (pgvector) — Database
  • redis — Caching and queues

Configuration

Edit .env (from the copied example.env):

# Required - use only A-Za-z0-9 for DB_PASSWORD
DB_PASSWORD=your_secure_password
UPLOAD_LOCATION=/path/to/immich/upload

# Generate a secret
IMMICH_SECRET_KEY=$(openssl rand -base64 64)

Add the secret:

echo "IMMICH_SECRET_KEY=$(openssl rand -base64 64)" >> .env

Create the upload directory:

mkdir -p /path/to/immich/upload
chmod 700 /path/to/immich/upload

Start and Access

docker compose up -d

Wait 30–60 seconds for PostgreSQL to initialize. Then open http://YOUR_SERVER_IP:2283.

  1. Create the admin account (first user is admin).
  2. Install the Immich mobile app (iOS/Android).
  3. In the app, set server URL to http://YOUR_IP:2283 (or https://photos.yourdomain.com if using reverse proxy).
  4. Enable automatic backup.

Enabling Machine Learning

The immich-machine-learning container handles:

  • Face recognition — groups faces, suggests names
  • CLIP search — semantic search by description

It runs in the background. After you upload photos, Immich will scan and index them. Face recognition may take hours for large libraries. Check status in Settings → Jobs.

Hardware Acceleration (Optional)

For faster transcoding and ML, add GPU support. Download hwaccel.transcoding.yml and hwaccel.ml.yml from the Immich releases and merge them into your compose. With an NVIDIA GPU, set NVIDIA_VISIBLE_DEVICES=all and the nvidia runtime. This speeds up video thumbnails and face embedding extraction significantly on large libraries. For CPU-only setups, omit these — Immich works fine, just slower.

Storage and Retention

Immich stores originals and generates thumbnails. You can configure storage templates to move originals to cheaper storage (e.g. S3) after upload, keeping only thumbnails on fast SSD. Use Settings → Storage to define rules. For families with years of photos, plan 1–2 TB or more. Liquid Web VPS offers scalable storage add-ons.

Reverse Proxy (Nginx or Traefik)

For HTTPS, put Immich behind a reverse proxy. Example Traefik labels on immich-server:

labels:
- "traefik.enable=true"
- "traefik.http.routers.immich.rule=Host(`photos.yourdomain.com`)"
- "traefik.http.routers.immich.entrypoints=websecure"
- "traefik.http.routers.immich.tls.certresolver=letsencrypt"
- "traefik.http.services.immich.loadbalancer.server.port=3000"

For Nginx, proxy / and /api to http://127.0.0.1:2283 and enable WebSocket support for real-time updates.

See our Traefik v3 guide for full setup. Deploy Immich and other apps together with Coolify.

Backup Strategy

Immich stores:

  • Database — PostgreSQL (metadata, face embeddings, album structure)
  • Uploads — photos and videos in UPLOAD_LOCATION

Backup both:

# Database dump
docker exec immich-postgres pg_dump -U immich immich > immich_backup_$(date +%Y%m%d).sql

# Upload volume to S3/Backblaze
rclone sync /path/to/immich/upload remote:immich-backups/

Schedule weekly database dumps and daily upload sync. See Coolify for one-click database backup scheduling. For container orchestration patterns, see our Docker Compose production guide for production-ready stacks.

Immich vs Photoprism vs Nextcloud Photos

FeatureImmichPhotoprismNextcloud Photos
Mobile appNative iOS/AndroidWeb PWANextcloud app
Face recognitionYesYesVia Memories app
CLIP/semantic searchYesYesNo
Video transcodingOptionalYesLimited
Primary usePhoto backupPhoto libraryGeneral file storage
Resource useMediumHigherHeavy (full NC stack)
Ease of setupDocker ComposeDocker, manual configFull Nextcloud

Immich excels at automatic mobile backup and semantic search. Use Liquid Web VPS for reliable storage and bandwidth.

Sharing and Permissions

Immich supports albums and sharing. Create an album, add photos, and share the link with expiry. You can invite other users (family members) and control who sees what. For multi-user households, create accounts under AdminUser Management. Each user gets their own library; shared albums span users. Perfect for families who want a private Google Photos replacement without per-user subscriptions.

Apify Affiliate Banner 728x90Apify Affiliate Banner 728x90Apify Affiliate Banner 300x50Apify Affiliate Banner 300x50
Start with ML disabled

If you have limited RAM, omit immich-machine-learning initially. You can add it later; Immich will still backup and organize photos, just without face recognition and CLIP search.

Frequently Asked Questions

Immich is an open-source, self-hosted photo and video backup platform. It offers mobile apps, face recognition, CLIP-based search, and timeline views — a private alternative to Google Photos.

Depends on your library. Budget ~5–10 MB per photo, ~50–200 MB per minute of video. Start with 100–500 GB and scale. Use SSD for database and frequently accessed media.

Yes. Native apps are available. Configure the server URL (HTTP or HTTPS). Enable automatic backup to upload photos and videos when on Wi-Fi or cellular.

Run the immich-machine-learning container. Immich will scan uploaded photos. Add names in the People view. The ML container needs ~2 GB RAM.

Yes. Use Traefik, Nginx, or Caddy. Proxy / and /api to the Immich server. Enable WebSockets for real-time updates. Use HTTPS for the mobile app.

Common mistakes and fixes

Immich containers fail to start

Ensure 4GB+ RAM. Check that PostgreSQL and Redis are healthy before Immich server. Verify UPLOAD_LOCATION path exists and is writable.

Face recognition or CLIP search not working

Ensure immich-machine-learning container is running. It needs 2GB+ RAM. Check logs: docker compose logs immich-machine-learning.

Mobile app can't connect

Use your server's public IP or domain, not localhost. Ensure reverse proxy forwards /api and / with WebSocket support. Add HTTPS for iOS app.