Self-Host Your Photos with Immich: A Local Google Photos Alternative
Immich is a self-hosted photo and video backup platform — the closest genuine open-source alternative to Google Photos, including automatic mobile backup, AI-powered face recognition, and object/scene search, all running entirely on hardware you own. This build gets it running on a Raspberry Pi or home server via Docker, with your phone backing up to it automatically.
Why This Over Google Photos
- No storage limits beyond your own hardware — no "upgrade to keep backing up" prompts
- No cloud subscription — the ongoing cost is electricity, not a monthly bill
- Your photos stay on your network unless you explicitly configure remote access — genuinely private by default
- The AI features (face grouping, "search for dog photos") run locally — no photos get uploaded to a third party to enable those features, unlike most cloud photo services
Hardware Requirements
ComponentNotes Raspberry Pi 4/5 (8GB) or any small home serverImmich's AI features (face detection, smart search) are genuinely CPU-intensive — 8GB RAM is a meaningful step up from 4GB for a smooth experience, especially with a large photo library External SSD or large USB drivePhoto/video libraries grow fast — plan storage capacity for years of phone backups, not just what you have today Wired Ethernet connectionInitial backup of an existing phone photo library can mean transferring tens of gigabytes — WiFi works but wired is dramatically faster for that first syncInstalling Docker
curl -sSL https://get.docker.com | sh sudo usermod -aG docker $USER # log out and back in for the group change to take effectSetting Up Immich via Docker Compose
- Create a project directory: mkdir -p ~/immich && cd ~/immich
- Download the official docker-compose.yml and .env template from Immich's GitHub releases (or docs.immich.app has the exact current-version files to copy) — Immich updates frequently, always pull the current official compose file rather than an old cached copy
- Edit .env to set your storage path, database password, and the timezone
- Point UPLOAD_LOCATION in .env at your external drive's mount path — this is where actual photo/video files get stored, separate from the database
First launch pulls several container images (the main server, a Postgres database, Redis, and a machine-learning container for the AI features) — this takes a few minutes on first run.
Initial Setup
- Navigate to http://your-pi-ip:2283 in a browser
- Create your admin account on first launch
- Install the Immich mobile app (iOS/Android) and point it at your server's address
- Enable automatic backup in the app settings — it'll begin uploading your camera roll to your own server, in the background, going forward
The AI Features
Once photos are uploaded, Immich's machine-learning container automatically:
- Detects and groups faces — you name each cluster once, and future photos of that person get grouped automatically
- Enables smart search — searching "beach" or "dog" or "birthday cake" finds relevant photos based on actual image content, not just filenames or manually-added tags
- Extracts and indexes location data from photo EXIF metadata, letting you browse a map view of where photos were taken
All of this runs on your own hardware — genuinely slower than Google's data-center-scale infrastructure, but it's the tradeoff for the photos never leaving your network for AI processing.
Remote Access (Optional)
To back up your phone even when away from home WiFi, you need the server reachable from outside your network — options in order of complexity:
- WireGuard VPN (see our dedicated WireGuard build) — your phone connects to your home network as if it were local, works for Immich exactly like any other home service
- Reverse proxy + domain — more setup, but gives Immich a real HTTPS URL without needing a VPN connection active
- Tailscale — a managed WireGuard-based mesh network, genuinely simpler to set up than raw WireGuard if you don't mind a third-party coordination service (though traffic itself stays peer-to-peer/encrypted)
Whichever option, don't expose Immich's port directly to the open internet without protection — like any self-hosted service holding genuinely private data, it deserves the same access control you'd want on your home network generally.
Backup Strategy
Self-hosting your photos means YOU are now responsible for not losing them — this is the real tradeoff versus a cloud service's built-in redundancy:
- Back up the actual photo library (the UPLOAD_LOCATION directory) to a second physical location — an external drive you rotate offsite, or a cheap cloud backup target used purely as a disaster-recovery copy, not as the primary photo service
- Back up the Postgres database too, not just the files — the database holds all your face groupings, albums, and metadata; losing just the database while keeping the raw files means starting the organization from scratch
- Test your restore process at least once — a backup you've never verified you can actually restore from isn't a real backup
Ongoing Maintenance
TaskFrequency Update the Docker imagesEvery few weeks — Immich ships new features and fixes regularly; docker compose pull && docker compose up -d Check storage capacityMonthly — photo/video libraries only grow, plan ahead before the drive fills Verify backup job actually ranPeriodically — confirm your offsite/secondary backup of the library is actually current, not just configured once and forgottenThe payoff is real: your entire photo library, searchable by content, organized by face, backed up automatically from your phone — everything the big cloud photo services offer, minus the subscription and minus your photos ever leaving hardware you actually control.
Related Guides
- Self-Hosting Jellyfin Media Server on a Raspberry Pi: Hardware Transcoding and Remote Access
- Workshop: Creating a French Cleat Wall
- Making a Dust Shoe for the Wolfpawn 4040 Pro
- How to Use an OBD2 Scanner: Read and Clear Fault Codes Yourself
- 2011 Audi A5 2.0 TFSI (EA888 CAEB) Timing Chain Replacement: Complete DIY Guide
- Building a DIY Antenna for the ATS Mini V4 on a Budget
- Self-Hosted CI/CD Runner on a Raspberry Pi: GitHub Actions and Gitea Actions
- DIY Aluminum Anodizing at Home: Type II Anodizing, Dye Colors, and Safety