Immich Raspberry Pi 5 gives you a self-hosted photo and video backup platform with automatic mobile sync, face recognition, timeline browsing, and album sharing. The Immich mobile app for Android and iOS backs up your camera roll continuously to the Pi in the background. All photos stay on your hardware, there is no subscription fee, and nothing leaves your network unless you explicitly configure S3 off-site storage. This guide covers Docker Compose deployment, PostgreSQL setup, mobile app configuration, Caddy HTTPS access, optional S3 storage, and maintenance.
Last tested: Raspberry Pi OS Bookworm Lite 64-bit | May 3, 2026 | Raspberry Pi 5 (8GB) | Immich 1.108 | PostgreSQL 14 | Immich mobile app 1.108 (Android)
Key Takeaways
- Immich dropped SQLite support in v1.92. PostgreSQL is the only supported database. Do not follow guides that reference SQLite as an Immich database option. They are outdated and will produce a broken install.
- The machine learning container (face recognition and CLIP semantic search) is optional. On a Pi 4 with 4GB RAM, disabling it saves roughly 500MB RAM and significantly reduces idle CPU. Enable it only if you actively use face grouping or semantic search features.
- Immich releases frequently, sometimes weekly. Always take a backup before updating. The Immich team maintains a one-version rollback policy, meaning if you skip multiple versions, restoring a backup and upgrading incrementally is the only safe recovery path.
Immich Raspberry Pi 5: How It Works
Immich is a multi-container application. The server container handles the API and web interface. The microservices container handles thumbnail generation, metadata extraction, and video transcoding. The machine learning container handles face recognition and CLIP-based semantic search. PostgreSQL stores all metadata, albums, and user accounts. Redis handles caching and job queues. All of these run as Docker containers managed by a single Compose file.
The Immich mobile app connects to the server over HTTPS, authenticates with your account, and syncs selected folders from the device camera roll continuously in the background. Photos and videos upload in their original format with full EXIF metadata preserved. The web interface at port 2283 provides the same library browsing, album management, and sharing features as the mobile app.
Hardware Requirements
Pi 5 with 8GB RAM is the recommended configuration. With all containers running including machine learning, Immich uses 2 to 3GB RAM at idle and peaks higher during photo import jobs. The 4GB Pi 5 works well with machine learning disabled. The Pi 4 with 4GB is the practical minimum for single-user use without machine learning.
An SSD is required for the photo library. Immich writes thumbnails and transcoded video previews continuously. This workload accelerates SD card wear significantly. A USB 3.0 SSD or NVMe via PCIe HAT gives adequate throughput. See Booting Raspberry Pi from USB SSD for storage setup. Use the official 27W USB-C power supply. See Raspberry Pi Power Monitoring via USB for verification under load.
Installing Immich with Docker Compose
Flash Raspberry Pi OS Bookworm Lite 64-bit using Raspberry Pi Imager. After first boot:
sudo apt update && sudo apt full-upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo apt install docker-compose-plugin -y
Log out and back in. Mount and prepare the photo storage SSD:
blkid /dev/sda1
# Add to /etc/fstab:
# UUID=your-uuid /mnt/photos ext4 defaults,nofail,noatime 0 2
sudo mkdir -p /mnt/photos
sudo mount -a
Download the official Immich Compose file and environment template:
mkdir -p ~/immich && cd ~/immich
wget -O compose.yaml 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
chmod 600 .env
Edit .env and set the upload location to the SSD:
# In .env, set:
UPLOAD_LOCATION=/mnt/photos
DB_DATA_LOCATION=/mnt/photos/pgdata
IMMICH_VERSION=release
To disable the machine learning container on lower-RAM Pi models, comment out the immich-machine-learning service in compose.yaml and remove the immich-machine-learning entry from the depends_on section of the immich-server service.
docker compose up -d
docker compose logs -f immich-server
Expected result: After 2 to 3 minutes, docker compose logs immich-server shows Immich listening. Navigate to http://<pi-ip>:2283 and the Immich onboarding screen loads. Create the admin account immediately. Anyone who reaches port 2283 before the admin account is created can claim it.

Mobile App Setup
Install the Immich app on Android or iOS. On the login screen, enter your server URL. On a local network, use http://<pi-ip>:2283. For remote access over HTTPS, use your Caddy or Tailscale address (see Remote Access below). Enter your admin credentials and tap Login.
After login, go to Profile > Backup. Enable auto backup and select the folders to sync. Immich backs up all media in the selected folders unless you exclude specific albums. Set “Backup over Wi-Fi only” to avoid mobile data use. Enable background app refresh on iOS. Without it, backups only run when the app is open.
Expected result: The backup status shows uploads progressing and a count of assets backed up. First-time sync of a large library (10,000+ photos) takes several hours depending on network speed and Pi storage throughput. Subsequent syncs are incremental and complete quickly.
Multi-user setup
Create additional user accounts in the Immich web interface under Administration > Users. Each user has their own library, albums, and backup configuration. Users can share albums with each other. Photos are stored in separate subdirectories under UPLOAD_LOCATION per user UUID, so libraries do not intermingle on disk.
Remote Access
The Immich mobile app requires HTTPS for remote access. Two practical options:
Caddy reverse proxy
Install Caddy on the Pi host and create a Caddyfile entry:
photos.yourdomain.com {
reverse_proxy localhost:2283
}
Caddy obtains a Let’s Encrypt certificate automatically. Forward ports 80 and 443 from your router to the Pi. In the mobile app, update the server URL to https://photos.yourdomain.com. For the full Caddy setup, see Caddy Reverse Proxy Raspberry Pi.
Tailscale
Install Tailscale on both the Pi and your phone. The mobile app connects to Immich at the Pi’s tailnet IP over the encrypted WireGuard tunnel without any port forwarding or public domain. Set the server URL to http://<pi-tailnet-ip>:2283. See Tailscale Raspberry Pi for setup. Tailscale is the simpler option if you do not need public sharing links.
Optional S3 Storage
Immich can store the original photo and video files in an S3-compatible bucket instead of or in addition to local storage. This is useful for offloading large libraries to Backblaze B2, Wasabi, or a self-hosted MinIO instance. Configure it in the Immich web UI under Administration > Storage Template, or set the S3 environment variables in .env before first run:
# In .env, add:
S3_ENABLED=true
S3_BUCKET=your-bucket-name
S3_REGION=us-east-1
S3_ENDPOINT=https://s3.us-east-1.backblazeb2.com
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
With S3 configured, Immich stores originals in the bucket and keeps thumbnails and the database locally on the Pi. This keeps the Pi SSD requirements modest even with a library of hundreds of thousands of photos.
Backups and Maintenance
Backing up Immich
Two things require backing up: the PostgreSQL database (metadata, albums, face tags, user accounts) and the photo library (originals under UPLOAD_LOCATION). The photo originals are irreplaceable. Back them up first. The database can be recreated from scratch but you lose all album organisation, face tags, and shared links.
# Back up the PostgreSQL database
docker compose exec -T database pg_dumpall --clean --if-exists --username=postgres | gzip > ~/immich/backups/db-$(date +%Y%m%d).sql.gz
# Verify the backup is not empty
ls -lh ~/immich/backups/
Back up the entire UPLOAD_LOCATION directory to a separate drive or cloud storage using BorgBackup or rclone. See BorgBackup Raspberry Pi Prune Policies for the Borg setup. Run backups on a cron schedule:
# Add to crontab (crontab -e):
# 0 2 * * * cd ~/immich && docker compose exec -T database pg_dumpall --clean --username=postgres | gzip > ~/immich/backups/db-$(date +\%Y\%m\%d).sql.gz
Updating Immich
Take a database backup before every update. Pull new images and restart:
cd ~/immich
docker compose pull
docker compose up -d
docker image prune -f
Check the Immich release notes before each update. Some releases include database migration steps that must be run in sequence. Do not skip multiple versions. Update incrementally if you have fallen more than two versions behind.
Troubleshooting
Mobile app cannot connect
# Confirm Immich server is reachable from the Pi itself
curl -s http://localhost:2283/api/server-info/ping
# Check containers are running
docker ps | grep immich
A successful ping returns {"res":"pong"}. If the server responds on the Pi but not from the phone, the issue is network access. Check the firewall allows port 2283, or confirm that Tailscale is active on both devices.
Uploads stuck or failing
docker compose logs immich-server | grep -i "error\|failed\|timeout"
docker compose logs immich-microservices | grep -i "error"
df -h /mnt/photos
The most common upload failure causes are: full disk (check df -h), permission errors on UPLOAD_LOCATION (the container uses UID 1000; run sudo chown -R 1000:1000 /mnt/photos), or the microservices container restarting due to insufficient RAM. If machine learning is enabled and RAM is tight, disable it and restart.
Thumbnails not generating
docker compose logs immich-microservices | grep -i "thumb\|generate\|queue"
Thumbnail generation is handled by the microservices container. If it is stuck, check available disk space and RAM. Thumbnail jobs queue in Redis. If Redis is restarting, the queue empties and jobs do not process. A full restart of the stack resolves most queue stalls:
docker compose restart
High memory usage
Check per-container memory usage:
docker stats --no-stream | grep immich
The machine learning container is usually the largest consumer at 400 to 600MB. If you are not using face recognition or semantic search, disable it by commenting out the service in compose.yaml and running docker compose up -d. The server and microservices containers together use around 300 to 500MB.
FAQ
Does Immich replace Google Photos?
For personal photo backup and browsing, yes. Immich covers automatic mobile sync, timeline view, album sharing, face grouping, map view, and search. It does not have Google Photos’s AI-generated memories, automatic video creation, or integration with other Google services. For users whose primary goal is private local backup with a clean interface, Immich is a complete replacement.
How does Immich compare to PhotoPrism?
Immich has better mobile app support, more active development, and a cleaner UI for daily use. PhotoPrism has stronger RAW file handling and a more mature tagging system. For a mobile-first household where the primary use case is automatic phone backup, Immich is the better choice. For a photographer managing a large archive of RAW files from a desktop, PhotoPrism is worth considering. See PhotoPrism Raspberry Pi 5 for that setup.
What happens if I run out of storage?
Immich stops accepting new uploads when the disk where UPLOAD_LOCATION is mounted fills up. Existing photos are not affected. Add a second drive, update UPLOAD_LOCATION in .env, move the existing library to the new location, and restart the stack. Alternatively, configure S3 storage to offload originals to an object storage bucket before local storage fills.
Is Immich stable enough for production use?
Immich is under active development and releases frequently. The developers mark it as production-ready for personal use but recommend regular backups due to the pace of change. For a family photo archive, the practical risk is low as long as you back up the database and photo library before each update. Do not use it as your only copy of photos. Maintain a separate backup regardless of which platform you use.
Can I import my existing Google Photos library?
Yes. Use Google Takeout to export your library as a ZIP archive, then use the Immich CLI or the web interface bulk upload feature to import the files. The Immich CLI handles the Google Takeout JSON sidecar files that contain metadata for photos that did not embed EXIF data. Run the CLI import with the --recursive flag to process nested Takeout album folders automatically.
References
- https://immich.app/docs/overview/introduction
- https://github.com/immich-app/immich
- https://immich.app/docs/install/docker-compose
- https://immich.app/docs/guides/database-queries
About the Author
Chuck Wilson has been programming and building with computers since the Tandy 1000 era. His professional background includes CAD drafting, manufacturing line programming, and custom computer design. He runs PidiyLab in retirement, documenting Raspberry Pi and homelab projects that he actually deploys and maintains on real hardware. Every article on this site reflects hands-on testing on specific hardware and OS versions, not theoretical walkthroughs.
Last tested hardware: Raspberry Pi 5 (8GB), USB 3.0 SSD. Last tested OS: Raspberry Pi OS Bookworm Lite 64-bit. Immich 1.108, PostgreSQL 14.

