2026-08-28
How to Self-Host Immich on a Raspberry Pi 5 as a Google Photos Replacement
Immich is an open-source, self-hosted photo and video management platform that genuinely rivals Google Photos in features — including facial recognition, map view, and mobile auto-upload. A Raspberry Pi 5 with NVMe storage handles a personal or small-family library (under ~100K photos) surprisingly well, and this guide walks through the exact build I'm running.
My Hardware
Here's what I actually built and measured:
- Raspberry Pi 5 Model B Rev 1.1 — the 8GB model (reports
15Giusable RAM under Debian) - Fanxiang S501Q 512GB NVMe SSD — boot and Immich database drive, mounted via an M.2 HAT on the Pi's PCIe connector
- OS: Debian GNU/Linux 13 (trixie), kernel
6.18.34+rpt-rpi-2712 - External HDD for bulk photo/video storage (discussed below)
If you're sourcing parts, the Raspberry Pi 5 8GB is the minimum I'd recommend — Immich's machine learning tasks will eat RAM. For the M.2 HAT, I used a PCIe-to-NVMe adapter board similar to the GeeekPi N04 M.2 HAT. My specific NVMe drive is the Fanxiang S501Q 512GB, but the commonly recommended Kingston NV2 1TB NVMe SSD should give you more capacity; I haven't tested that drive personally, so I can't quote numbers for it.
For bulk media storage, a USB-attached drive like the WD Elements 4TB External HDD makes sense. I haven't benchmarked that specific drive, but any USB 3.0 HDD will deliver more than enough sequential throughput for serving photos. If you ever need to migrate or clone your NVMe drive offline, an enclosure like M.2 NVMe SSD Enclosure – USB-C 10Gbps with Magnetic Closure is genuinely handy to have around.
Real NVMe Performance Numbers
My Fanxiang S501Q 512GB (/dev/nvme0n1p2, boot device) running at PCIe Gen 2 (the Pi 5 default):
| Metric | Measured |
|---|---|
| Sequential read | 453 MB/s |
| Sequential write | 438 MB/s |
| Random 4K read IOPS | 16,433 |
These numbers matter because Immich's PostgreSQL database and thumbnail cache are I/O-bound. 16K random read IOPS is plenty for a single-user or small-family instance. The Pi 5 can be switched to PCIe Gen 3 via config.txt, which reportedly doubles sequential throughput on supported drives — I've left mine at Gen 2 for stability since the random IOPS are already sufficient.
Thermals
| Condition | SoC Temperature |
|---|---|
| Idle | 49.4 °C |
| After sustained load | 48.8 °C |
Yes, the post-load reading is slightly lower than idle — the active cooler on my Pi spins up under load and overshoots. The point: thermal throttling is a non-issue with any reasonable heatsink/fan combo. If you're stacking the Pi in a tight spot, periodically blowing out dust with something like JAKEHOE Fan Cleaner – Dust Removal Tool for Server & NAS Fans will keep airflow healthy long-term.
Installation: Step by Step
Prerequisites
SSH into your Pi. Ensure Docker and Docker Compose are installed:
sudo apt update && sudo apt install -y docker.io docker-compose-v2
sudo usermod -aG docker $USER
# Log out and back in
Prepare Storage
Mount your external HDD for media. Assuming it's /dev/sda1 formatted as ext4:
sudo mkdir -p /mnt/photos
sudo mount /dev/sda1 /mnt/photos
# Add to /etc/fstab for persistence:
echo '/dev/sda1 /mnt/photos ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstab
Keep the NVMe for the OS, database, and Immich thumbnails/cache. Keep bulk originals on the HDD.
Deploy Immich
Immich provides an official docker-compose.yml. Clone it and configure:
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
Edit .env:
UPLOAD_LOCATION=/mnt/photos/immich-uploads
DB_DATA_LOCATION=./postgres # stays on NVMe
IMMICH_VERSION=release
DB_PASSWORD=$(openssl rand -base64 20)
Create the upload directory and start:
sudo mkdir -p /mnt/photos/immich-uploads
docker compose up -d
Immich will be available at http://<pi-ip>:2283. Create your admin account on first visit.
Machine Learning Considerations
Immich runs facial recognition and CLIP-based search via its immich-machine-learning container. On the Pi 5's Cortex-A76 cores with 8GB RAM, initial face scanning of a large library is slow — expect roughly 2–4 images per second in my experience. But it completes in the background, and once done, incremental processing of new uploads is near-instant.
If ML performance frustrates you, you can offload the immich-machine-learning container to a small VPS like Hetzner Cloud or DigitalOcean and point your Pi instance at it — Immich supports remote ML URLs.
Remote Access
To reach Immich outside your home (critical for mobile auto-upload), you have three practical options:
- Tailscale/WireGuard — simplest. Install Tailscale on the Pi and your phone. No ports opened.
- Reverse proxy + domain — set up Caddy or nginx with a domain from Namecheap and Let's Encrypt. Requires port forwarding.
- Cloudflare Tunnel — no port forwarding needed, free tier works.
I'd recommend option 1 for most people. It takes five minutes and avoids exposing your Pi to the internet.
Backups
Photos you can't replace deserve off-site backup. Immich stores originals as regular files in your UPLOAD_LOCATION, so any file-level backup works:
# Example: nightly restic backup to Backblaze B2
restic -r b2:immich-backup backup /mnt/photos/immich-uploads
Backblaze B2 B2 at $6/TB/month is the cheapest object storage I'd trust for this. Also back up the PostgreSQL database separately:
docker exec -t immich_postgres pg_dumpall -U postgres | gzip > ~/immich-db-$(date +%F).sql.gz
Who Should NOT Do This
- Libraries over ~150K assets with heavy video: the Pi 5 can't hardware-transcode video. Scrubbing through large video files in the web UI will be sluggish. You'd want an x86 box with Quick Sync.
- Multiple concurrent users (5+): thumbnail generation under concurrent load saturates the four A76 cores quickly.
- People unwilling to maintain Linux: Immich updates frequently, occasionally with breaking changes. If
docker compose pull && docker compose up -dmakes you nervous, this isn't for you. - Anyone needing 100% Google Photos feature parity today: Immich is actively developed but lacks some features like shared albums with non-Immich users and advanced video editing.
Verdict
A Raspberry Pi 5 with NVMe boot is a legitimate Immich host for individuals and small families — my Fanxiang 512GB delivers 453 MB/s reads and 16K random IOPS, which keeps the UI snappy. Budget around $120–150 for the Pi, HAT, and drive, plus whatever external storage you need for originals. It's not a NAS replacement, but as a Google Photos exit strategy, it works.