Google Photos Alternative: Setting Up Immich Step-by-Step

Replace Google Photos with Immich on your own server: 4-container architecture, annotated Docker Compose & .env setup, SSD vs HDD layout and safe updates.

Taking Back Your Memories

Immich is arguably the single most used application on my server. I am meticulous about keeping my images and videos organized, and Immich’s album system, map view, and mobile timeline are top-tier. It looks and feels remarkably like Google Photos, except every single file lives on my own 1 TB hard drive instead of a subscription cloud.

If you are still deciding whether Immich fits your household, read our honest Immich vs. Google Photos comparison first. When you are ready to deploy it cleanly, here is how Immich is put together and how to run it safely.

Understanding Immich’s 4-Container Architecture

Unlike a single-container app like Jellyfin, Immich coordinates four services inside one docker-compose.yml stack:

Container Role Typical RAM Usage
immich-server Web UI, mobile API, timeline, thumbnail & video jobs ~400–800 MB
immich-machine-learning Local facial recognition & smart object/CLIP search ~800 MB – 2.5 GB
redis Background job queue and cache ~20–50 MB
database (postgres) Metadata, albums, user accounts, and vector embeddings ~150–400 MB

Because all four containers talk over a private Docker network, you only expose one port to your LAN: 2283.

Step 1: Download the Official Compose & .env Files

Warning

Always start from the official docker-compose.yml and example.env published by the Immich team rather than copying random third-party snippets — database extensions (like VectorChord / pgvecto-rs) must match the exact Immich version.

Create /opt/docker/immich and pull the official files:

Terminal window
mkdir -p /opt/docker/immich
cd /opt/docker/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: Configure .env (SSD for Database, HDD for Photos)

Open .env with nano .env and adjust the four key variables:

# Store uploaded photos and videos on your dedicated large HDD
UPLOAD_LOCATION=/mnt/1TB_photos/immich-library
# Keep PostgreSQL database on your fast SSD (NEVER on an external USB flash drive or network share)
DB_DATA_LOCATION=./postgres
# Set your timezone and pin the Immich release version
TZ=Europe/Madrid
IMMICH_VERSION=release
# Generate a strong random password (alphanumeric only — avoid special characters that break URLs)
DB_PASSWORD=ChangeMeToALongAlphanumericPassword123

Generate a strong alphanumeric password using our password generator (uncheck symbols for DB_PASSWORD so PostgreSQL connection strings don’t need URL-encoding) and lock down .env with chmod 600 .env.

Make sure /mnt/1TB_photos/immich-library exists on a CMR hard drive mounted in /etc/fstab (check our CMR vs. SMR storage guide and estimate drive size first with the media storage calculator).

Step 3: Start Immich and Create Your Account

Terminal window
docker compose up -d

Watch the containers come online:

Terminal window
docker compose logs -f immich-server

Once it reports listening on port 2283, open http://YOUR-SERVER-IP:2283 in your browser, register the first admin user, and sign in.

Hardware Acceleration & Storage Sizing Tips

If you shoot lots of 4K smartphone videos, enabling hardware transcoding keeps phone playback instant without pegging your CPU at 100%:

  • Download Immich’s hwaccel.transcoding.yml alongside docker-compose.yml from the same release page (it passes /dev/dri:/dev/dri for Intel Quick Sync / AMD VAAPI).
  • In Administration → Settings → Video Transcoding, choose VAAPI or QSV and set preset to medium.
  • Leave original photos untouched while generating lightweight WebP thumbnails (~5–15% extra disk space) so scrolling 30,000 photos over Wi-Fi or 5G feels instant.

Before picking a drive size, estimate your exact photo and video growth in our media storage calculator — 50,000 photos plus family videos easily pass 350–500 GB once thumbnails and backups are included.

Step 4: Set Up Mobile Auto-Backup & Remote Access

  1. Install the Immich app on iOS or Android.
  2. Enter your server URL:
    • On home Wi-Fi: http://192.168.1.50:2283
    • From anywhere over Tailscale: http://100.x.y.z:2283 (or https://immich.home.yourdomain.com behind Nginx Proxy Manager)
  3. Open the cloud icon in the app, select your phone’s Camera / DCIM folders, and enable Background Backup.
  4. Android tip: disable battery optimization for the Immich app in Android Settings so background uploads don’t stall overnight.

Safe Update Routine (Don’t Skip Release Notes)

Immich evolves quickly and occasionally renames .env keys or updates PostgreSQL extensions. Never blind-update Immich with Watchtower or unattended scripts. Instead:

Terminal window
cd /opt/docker/immich
# 1. Dump the PostgreSQL database before pulling anything
docker exec immich_postgres pg_dumpall -U postgres > /var/backups/immich-db-$(date +%F).sql
# 2. Check https://github.com/immich-app/immich/releases for breaking changes
# 3. Pull and recreate
docker compose pull
docker compose up -d

Protect your photos before migrating

Family photos are irreplaceable. Set up a tested 3-2-1 backup strategy (or an automated rsync external-drive script) before deleting photos off your phone or canceling Google One.

Troubleshooting Common Immich Issues

  • immich-machine-learning crashes with Out-Of-Memory (OOM) on 4 GB RAM servers: smart search and facial recognition spike RAM during the first import of 20,000+ photos. Either lower Machine Learning → Concurrency to 1 in Immich’s Administration Settings, add a 4 GB swap file on your SSD, or temporarily run the ML container on a stronger desktop PC.
  • Photos fail to upload or thumbnail jobs fail with EACCES: permission denied: your UPLOAD_LOCATION folder on /mnt/1TB_photos is owned by root or lacks write permissions. Confirm ownership or check the folder permissions before starting the stack.
  • database container fails to start after restoring or moving folders: PostgreSQL requires DB_DATA_LOCATION to live on a local Linux filesystem (ext4), never on an SMB/NFS share or NTFS/exFAT drive.
  • Uploads freeze over cellular 5G behind Nginx Proxy Manager: Nginx’s default upload limit rejects large 4K phone videos with HTTP 413. Add client_max_body_size 0; in Nginx Proxy Manager’s Advanced tab for that host.

Frequently Asked Questions

How much RAM and disk space does Immich need?

Plan for at least 6–8 GB of RAM (4 GB works only if you disable machine learning or expect tight memory during imports). For storage, add 15–20% overhead on top of your raw photo/video size for thumbnails and transcoded mobile previews.

Can I keep Immich's database on an SSD and photos on a large HDD?

Yes, and that is the ideal setup. Set UPLOAD_LOCATION to your large 1 TB+ HDD and DB_DATA_LOCATION to a folder on your fast OS SSD so timeline scrolling stays instantaneous.

Why should I not just put image: latest on Immich?

Immich ships rapid releases and occasionally includes breaking changes or database migration steps. Pinning a release tag (like v1.132.x or release) and reading the release notes before running docker compose pull prevents nasty surprises.

How do I back up Immich safely?

Back up both your UPLOAD_LOCATION photo folder and a pg_dumpall SQL export of the immich_postgres container using a 3-2-1 strategy before canceling Google One.

Portrait of Guillermo

Written by Guillermo

IT Student & Home Server Enthusiast

Building private clouds to break free from Big Tech. I document everything I learn about home servers and self-hosting on MyHomeServerGuide.

More about the author