Immich
High performance self-hosted photo and video management solution
Alternative to: google photos, apple photos, amazon photos
Immich is a high performance, self-hosted photo and video backup solution with automatic mobile app backup, facial recognition and clustering, and advanced search by metadata, objects, and CLIP-powered semantic search. It supports public sharing, partner and shared albums, multi-user administration, and offline access from its mobile and web interfaces.
Immich Docker Compose example
Self-host Immich on your own server, homelab, or VPS starting from this Docker Compose example.
It runs Immich in Docker containers using the official ghcr.io/immich-app/immich-server:release, ghcr.io/immich-app/immich-machine-learning:release, valkey/valkey:9, ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
immich-server:
image: ghcr.io/immich-app/immich-server:release
volumes:
- upload:/data
environment:
# Hostname of the Postgres service on the compose network
DB_HOSTNAME: "database"
# Postgres username (must match the database service)
DB_USERNAME: "postgres"
# Postgres password (must match the database service)
DB_PASSWORD: "postgres"
# Postgres database name (must match the database service)
DB_DATABASE_NAME: "immich"
# Hostname of the Redis/Valkey service on the compose network
REDIS_HOSTNAME: "redis"
# Timezone as a TZ identifier, e.g. Europe/Berlin
TZ: "UTC"
depends_on:
- redis
- database
restart: unless-stopped
healthcheck:
disable: false
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:release
volumes:
- model-cache:/cache
environment:
# Timezone as a TZ identifier, e.g. Europe/Berlin
TZ: "UTC"
restart: unless-stopped
healthcheck:
disable: false
redis:
image: valkey/valkey:9
healthcheck:
test: redis-cli ping || exit 1
restart: unless-stopped
database:
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
environment:
# Postgres password (must match immich-server DB_PASSWORD)
POSTGRES_PASSWORD: "postgres"
# Postgres username (must match immich-server DB_USERNAME)
POSTGRES_USER: "postgres"
# Postgres database name (must match immich-server DB_DATABASE_NAME)
POSTGRES_DB: "immich"
# Enables data checksums when the data directory is first initialized
POSTGRES_INITDB_ARGS: "--data-checksums"
volumes:
- db_data:/var/lib/postgresql/data
shm_size: 128mb
restart: unless-stopped
healthcheck:
disable: false
volumes:
upload:
model-cache:
db_data: Prefer a managed setup? WinterFlow installs, configures, and updates Immich for you using this same Docker Compose configuration.