Immich logoPhotos

Immich

A self-hosted photo and video backup app, suitable as a Google Photos alternative.

Review notes

Use the official Docker Compose setup and plan storage plus backups before importing a large photo library.

Deployment guide

Deploy with the official Docker Compose stack, preferably on SSD-backed storage with planned backups.

  1. Create an app directory, then download the official compose and `.env` files.
  2. Configure `UPLOAD_LOCATION`, `DB_PASSWORD`, and the public domain if using a reverse proxy.
  3. Run `docker compose up -d`, open the web UI, and create the first admin account.
  4. Put Caddy or Nginx in front with HTTPS before exposing it publicly.
  5. Import photos in batches and monitor storage growth.
Backup:Back up the upload directory and PostgreSQL database. Container images are not enough.

Copy and run on your server

Use each block separately: save the compose file, or copy the bash script to create it and start the container.

docker-compose.ymlyaml
name: immich
services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:release
    container_name: immich_server
    volumes:
      - ./library:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    environment:
      DB_HOSTNAME: database
      DB_USERNAME: postgres
      DB_PASSWORD: immich_password
      DB_DATABASE_NAME: immich
      REDIS_HOSTNAME: redis
    ports:
      - "2283:2283"
    depends_on:
      - redis
      - database
    restart: unless-stopped

  redis:
    image: docker.io/redis:7-alpine
    container_name: immich_redis
    restart: unless-stopped

  database:
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0
    container_name: immich_postgres
    environment:
      POSTGRES_PASSWORD: immich_password
      POSTGRES_USER: postgres
      POSTGRES_DB: immich
    volumes:
      - ./postgres:/var/lib/postgresql/data
    restart: unless-stopped
setup.shbash
#!/usr/bin/env bash
set -euo pipefail

sudo mkdir -p /opt/immich
sudo chown "$USER":"$USER" /opt/immich
cd /opt/immich

cat > docker-compose.yml <<'COMPOSE'
name: immich
services:
  immich-server:
    image: ghcr.io/immich-app/immich-server:release
    container_name: immich_server
    volumes:
      - ./library:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    environment:
      DB_HOSTNAME: database
      DB_USERNAME: postgres
      DB_PASSWORD: immich_password
      DB_DATABASE_NAME: immich
      REDIS_HOSTNAME: redis
    ports:
      - "2283:2283"
    depends_on:
      - redis
      - database
    restart: unless-stopped

  redis:
    image: docker.io/redis:7-alpine
    container_name: immich_redis
    restart: unless-stopped

  database:
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0
    container_name: immich_postgres
    environment:
      POSTGRES_PASSWORD: immich_password
      POSTGRES_USER: postgres
      POSTGRES_DB: immich
    volumes:
      - ./postgres:/var/lib/postgresql/data
    restart: unless-stopped
COMPOSE

docker compose up -d
echo "Immich is running on http://SERVER_IP:2283"

Stack

TypeScriptPostgreSQLRedisDocker