Self-Hosting Immich on Raspberry Pi: A Private Google Photos Alternative
This site already covers a long list of self-hosted services worth running on a spare Raspberry Pi — Pi-hole, Gitea, Syncthing, a Time Machine backup target, a VPN endpoint. Immich belongs on that list for a different reason than most of them: it's the closest open-source equivalent to Google Photos, with automatic mobile backup, timeline browsing, face recognition, and AI-powered search ("photos of dogs at the beach" actually works), all running entirely on hardware you own. Getting real value out of it on a Raspberry Pi means understanding upfront where the Pi's limits are — this isn't a drop-in replacement for a beefy home server, but for a personal or small-family photo library, it's genuinely usable with the right configuration choices.
What Immich Actually Does
The mobile apps (iOS and Android) run in the background and automatically upload new photos and videos to your server over your home network or, with proper remote access set up, from anywhere. The server ingests them, generates thumbnails, extracts EXIF and location data, and — this is the resource-intensive part — runs machine learning models for facial recognition (grouping photos by the people in them) and CLIP-based smart search (natural-language search across image content, not just filenames or tags). It's a genuinely full-featured photo management platform, not a bare file sync tool, which is exactly why it's heavier than something like Syncthing.
Hardware Reality Check
ComponentRecommendationWhy Raspberry Pi modelPi 5 (8GB) strongly preferred over Pi 4Immich's ML features and database are genuinely CPU and RAM hungry; a Pi 4 will work for basic upload/browse but struggles noticeably once face recognition and smart search are enabled on a growing library StorageExternal SSD over USB 3, not the SD cardThe SD card will handle the OS fine but is the wrong place for a growing photo library — both for capacity and for write-endurance reasons under a database workload RAM8GB minimum, more helpsPostgreSQL (Immich's database) and the ML inference containers both want headroom; 4GB Pi models will swap heavily under load CoolingActive cooling (fan, not just a heatsink)ML inference and video thumbnail generation are sustained CPU loads, not brief spikes — see this site's Pi cooling guide for safe thermal limitsIf you're starting from scratch and photo management is the primary reason you're buying a Pi, an 8GB Pi 5 with a good active cooler and an external NVMe or SSD (see this site's NVMe boot guide) is the realistic minimum for a smooth experience once your library grows past a few thousand photos.
Installation via Docker Compose
Immich is distributed and officially supported as a set of Docker containers — the server, a PostgreSQL database with the pgvector extension for similarity search, Redis for job queuing, and a separate machine-learning inference container — orchestrated together with Docker Compose. Install Docker and Docker Compose on Raspberry Pi OS (64-bit is required; Immich's ML dependencies don't build on 32-bit ARM), pull Immich's official docker-compose.yml and .env template, and point the volume mounts at your external SSD rather than the default path on the SD card before your first launch — moving a populated library after the fact is more disruptive than setting the path correctly from day one.
docker compose pull docker compose up -dFirst startup takes noticeably longer than a typical container stack — the ML inference container pulls down model weights on first run, and the database initializes its schema. Once running, the web UI and mobile app both point at your Pi's IP address and port (2283 by default); set up a reverse proxy through Nginx or Caddy (covered in this site's Nginx reverse proxy guide) if you want a clean hostname instead of an IP-and-port URL, and pair it with Tailscale or WireGuard (both covered elsewhere on this site) for secure remote upload from your phone when you're away from home rather than opening ports directly to the internet.
Taming the ML Workload
This is the part that actually determines whether Immich feels usable on a Pi. A few settings make a real difference:
- Limit ML concurrency. Immich's job settings let you cap how many machine-learning jobs (face detection, smart search indexing) run concurrently — leaving this at a desktop-appropriate default on a Pi will pin all CPU cores and make the web UI sluggish during a large initial library import. Drop concurrent jobs to 1-2 and let indexing run in the background over a longer period rather than trying to rush it.
- Use CPU inference, and expect it to be slow. The Pi has no GPU acceleration path Immich's ML container can use, so every face-detection and CLIP embedding pass runs on the ARM CPU cores. For a library in the tens of thousands of photos, initial indexing can genuinely take days of background processing rather than hours — this is normal, not a misconfiguration, and subsequent uploads of new photos index far faster since it's incremental after the initial backlog.
- Consider disabling facial recognition entirely on a 4GB Pi 4. Smart search (CLIP) and timeline/backup functionality alone are genuinely pleasant on modest hardware; facial recognition is the single heaviest optional feature, and turning it off is a reasonable tradeoff if your Pi is struggling rather than upgrading hardware.
- Schedule heavy reindexing for overnight. If you bulk-import an existing photo library from a computer rather than relying on gradual mobile uploads, kick off the import at night — a multi-thousand-photo bulk import competing with daytime browsing will make both miserable.
Backup Strategy — Immich Is Not Itself a Backup
It's worth being direct about this: Immich running on a single Pi with a single external SSD is a photo management system, not a backup system. If that SSD fails, your photo library — including the copies your phone already deleted locally after a successful upload, if you enable that option — is gone. Pair Immich with the Restic/Borg backup guide already on this site to push regular encrypted backups of the Immich upload directory and PostgreSQL database dump to a second location, ideally off-site or at minimum on separate physical media. The "3-2-1" habit (three copies, two different media, one off-site) applies to a self-hosted photo library exactly as much as it does to any other irreplaceable data.
Where a Pi Genuinely Isn't Enough
Be honest with yourself about scale before committing. A single household's phone photos over a few years — tens of thousands of images, a few hundred GB — is comfortably within what a well-cooled Pi 5 with adequate external storage handles. Multiple family members' full libraries, tens of thousands of RAW photos from a dedicated camera, or an expectation of near-instant ML indexing on every upload are all places where a small-form-factor x86 mini PC or a proper NAS with a real CPU will give you a meaningfully better experience — the Pi's ARM cores are the actual bottleneck for Immich's ML workload, not something a software tweak fully solves. Start on the Pi if that's the hardware you have; recognize the point where you've outgrown it rather than fighting the hardware indefinitely.
Immich on a Raspberry Pi won't feel as instant as Google Photos' cloud-scale infrastructure, and it demands more patience during initial setup and indexing than most of the other self-hosted services on this site. But for the actual goal — owning your photo library, keeping it off someone else's servers, and still getting real search and face-grouping — it's a genuinely capable option once you set expectations and hardware correctly from the start.
Related Guides
- Self-Host Your Photos with Immich: A Local Google Photos Alternative
- Build a Raspberry Pi Kubernetes Cluster with K3s: A Hands-On Way to Learn Distributed Systems
- Self-Hosted CI/CD Runner on a Raspberry Pi: GitHub Actions and Gitea Actions
- Raspberry Pi AI Camera Module (IMX500): On-Sensor Machine Learning Without an Accelerator HAT
- Running Your Own Recursive DNS Resolver on Raspberry Pi with Unbound: Full DNS Privacy Beyond Pi-hole
- Self-Hosting a Git Server on Raspberry Pi with Gitea
- Building a Redundant Raspberry Pi NAS: ZFS, mergerfs, and Snapshots Beyond Simple Samba Sharing
- balenaCloud for Raspberry Pi Fleets: Containerized Deployment and Remote Device Management