x-arcane:
icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/immich.svg
urls:
- https://immich.app/
- https://github.com/immich-app/immich
name: immich
services:
immich-server:
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
restart: always
ports:
- "${APP_PORT:-2283}:2283"
env_file:
- .env
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
depends_on:
- redis
- database
healthcheck:
disable: false
labels:
com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/immich.svg
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
restart: always
env_file:
- .env
volumes:
- model-cache:/cache
healthcheck:
disable: false
labels:
com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/immich.svg
redis:
image: docker.io/valkey/valkey:9
restart: always
healthcheck:
test: ["CMD", "redis-cli", "ping"]
labels:
com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/valkey.svg
database:
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
restart: always
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: "--data-checksums"
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
shm_size: 128mb
healthcheck:
disable: false
labels:
com.getarcaneapp.arcane.icon: https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/postgresql.svg
volumes:
model-cache:
APP_PORT=2283
UPLOAD_LOCATION=/data/compose/immich/library
DB_DATA_LOCATION=/data/compose/immich/postgres
TZ=Etc/UTC
IMMICH_VERSION=release
DB_PASSWORD=change-this-immich-password
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
README
This template follows the upstream Docker Compose layout for Immich and keeps media files and database files in separate host paths.
Keep DB_DATA_LOCATION on local SSD-backed storage. Immich upstream does not recommend network shares for PostgreSQL data. Hardware acceleration requires extra Compose sections from the Immich documentation and is intentionally not enabled by default here.