Photos and personal videos are among the most irreplaceable digital items you own. Commercial cloud photo backup services lock your family albums into proprietary ecosystems with escalating monthly subscriptions. Immich is a high-performance self-hosted photo and video backup solution designed to deliver an experience as polished and responsive as commercial alternatives.

Running Immich on a Raspberry Pi 4 or Raspberry Pi 5 allows your household to back up photos automatically from iPhones and Android devices straight to local storage attached to your Pi.

Hardware requirements and storage planning

Immich is feature-rich, providing background facial recognition, AI semantic search, EXIF geolocation mapping, and video transcoding. To run it smoothly on a Raspberry Pi: - Use a Raspberry Pi 5 or Raspberry Pi 4 with 4 GB or 8 GB of RAM. A 64-bit operating system is strictly required. - Do not store your media library on a microSD card. MicroSD cards have limited write cycles and cannot handle the continuous input/output operations of photo ingest and video thumbnail rendering. Connect a fast external USB 3.0 SSD or NVMe drive formatted with ext4. - Fast Ethernet connection to your home network router ensures rapid uploads from multiple devices.

Mount and prepare external storage

Connect your external storage drive and identify its UUID using lsblk and blkid. Create a permanent mount point so the drive automatically mounts on reboot:

BASH
sudo mkdir -p /mnt/photos
sudo blkid /dev/sda1

Add your drive to /etc/fstab using its unique UUID. Then test the mount without rebooting:

BASH
sudo mount -a
sudo mkdir -p /mnt/photos/immich-library
sudo chown -R "$USER:$USER" /mnt/photos/immich-library

Configure Immich with Docker Compose

Create an isolated directory for Immich. The Immich team publishes an official Docker Compose template and an environment variables file:

BASH
mkdir -p "$HOME/immich-app"
cd "$HOME/immich-app"
curl -fsSL -o docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
curl -fsSL -o .env https://github.com/immich-app/immich/releases/latest/download/example.env

Open .env in a text editor to set your upload directory and database passwords:

BASH
nano .env

Update the UPLOAD_LOCATION variable to point to your external storage directory:

INI
UPLOAD_LOCATION=/mnt/photos/immich-library
DB_PASSWORD=your_secure_postgres_password
IMMICH_VERSION=release

Inspect the docker-compose.yml file. Immich includes microservices for the web server, microservices queue, Redis cache, PostgreSQL with vector search, and a machine learning container:

YAML
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - "2283:2283"
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-alpine
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.1
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: postgres
      POSTGRES_DB: immich
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Start Immich and complete admin setup

Launch the stack in detached mode. The initial container image download will take a few minutes depending on your internet connection:

BASH
sudo docker compose pull
sudo docker compose up -d
sudo docker compose ps

Verify that all containers (immich_server, immich_machine_learning, immich_postgres, and immich_redis) are up.

Open your browser and navigate to http://PI_ADDRESS:2283. Follow the onboarding wizard to register your administrator account. Do not share admin credentials; each family member can receive their own individual user account from the Immich settings page.

Tune machine learning on Raspberry Pi

The Raspberry Pi CPU is capable of handling facial classification and object tagging, but running heavy machine learning models on a batch of ten thousand imported photos can cause high temperatures and CPU throttling.

In the Immich web interface under Administration → Settings → Machine Learning: 1. Choose smaller model architectures such as MobileNet or ViT-tiny. 2. Limit the concurrency to 1 or 2 threads so your Raspberry Pi remains responsive for other home server tasks. 3. Schedule background facial processing jobs during overnight hours when the household is asleep.

Set up automated mobile synchronization

Download the official Immich app from the Apple App Store or Google Play Store on your phone: 1. Enter your server endpoint URL http://PI_ADDRESS:2283 (or your encrypted HTTPS URL if using Tailscale or Nginx Proxy Manager). 2. Log in with your user credentials. 3. Grant photo library read permissions. 4. Select the albums you want to sync automatically. 5. Enable Background Backup and plug in your phone overnight for initial synchronization.

Immich hashes each asset before upload, ensuring that duplicate files are never uploaded twice and preserving original EXIF metadata, timestamps, and live photo animations.

Maintenance and backup strategy

Always maintain a 3-2-1 backup strategy for your memories. Your Raspberry Pi photo library should be backed up to a secondary USB drive or mirrored using our Raspberry Pi NAS guide.

To back up the Immich PostgreSQL database:

BASH
sudo docker compose exec -t database pg_dumpall -c -U postgres > "$HOME/immich-db-backup-$(date +%Y%m%d).sql"

Keep your media files and database dump synchronized so that your photo timeline can be fully recovered onto any machine in the future.

Sources and further reading

Open Pi logo
Monitor your Raspberry Pi from your phone

Check real-time CPU, RAM, temperature, and service health for your home server projects with Open Pi for iOS and Android. Local-first, private, and no cloud account required.

Explore Open Pi App StoreGoogle Play
About this guide

Researched and validated against official project documentation and community standards on September 11, 2026. Review your board model, storage, and current release notes before deploying.