Immich with Docker Compose
High performance self-hosted photo and video management solution. In the project's words: Immich README checked 2026-09-23
Runs on: amd64, arm64 from each image's registry manifest, checked 2026-09-25; a CPU counts only if every image has a build for it. Image by image
Add Immich to the builder to use your own domain, get its passwords generated in your browser, and combine it with other apps in one file.
What Immich needs
Only figures Immich's own documentation publishes, each linked to the page it is on. Where the project gives no number, this page does not invent one.
| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 6 GB | 8 GB |
| With 4 GB, Immich can run only with machine learning (face and smart search) disabled. If you set Docker resource limits, the Postgres container needs at least 2 GB of its own. Source: Immich docs: Requirements checked 2026-09-23 | ||
| CPU | 2 cores | 4 cores |
| amd64 or arm64 only. Since v3 the machine-learning container on amd64 needs the x86-64-v2 level, which most CPUs released since about 2012 have. Source: Immich docs: Requirements checked 2026-09-23 | ||
| Disk | The project publishes no figure | |
| No size is published. Thumbnails and transcoded video add 10-20% to the size of the library on average; the Postgres files are typically 1-3 GB and should be on local SSD, never a network share. Source: Immich docs: Requirements checked 2026-09-23 | ||
Which hardware Immich has images for
Read from each image's manifest list in its registry (anonymous, read-only) when this page was built. An app counts for a CPU only if every one of its images lists it.
- x86-64 PC or NAS (
linux/amd64): every image has a build. - Raspberry Pi 4/5, 64-bit OS (
linux/arm64): every image has a build. - Raspberry Pi 3 or Zero 2 W, 32-bit OS (
linux/arm/v7): no image forimmich-server,immich-machine-learning,database. No image for this hardware; the builder leaves the app out.
| Service | Image | Platforms in the manifest | Digest | Registry | Checked |
|---|---|---|---|---|---|
immich-server | ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} | amd64, arm64 | sha256:79cc1623323d5894922686d8743b4780181428f98eecbfb58ce12c41ef02d1ea | ghcr.io | 2026-09-25 |
immich-machine-learning | ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} | arm64, amd64 | sha256:60dfcf266a9ef3b7376f5678e8c980d4fb61db5fc48c078fe8a326ab1535d60d | ghcr.io | 2026-09-25 |
redis | docker.io/valkey/valkey:9 (pinned) | amd64, arm64, arm/v7, ppc64le | sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf | registry-1.docker.io | 2026-09-25 |
database | ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 (pinned) | amd64, arm64 | sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 | ghcr.io | 2026-09-25 |
Your hardware
Immich transcodes videos for playback in the browser and its apps; without a GPU that work runs on the processor. Immich's own setup keeps each GPU backend in a second file, hwaccel.transcoding.yml, which immich-server pulls in with an extends: block you uncomment. This page flattens that: it copies the backend's lines into immich-server, so you keep one compose file and need no second file, the way Immich's docs describe under "Single Compose File". Every choice is one backend of that file, at Immich v3.3.1, quoted.
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
docker-compose.yml
None (CPU)
This is exactly what the builder writes for Immich alone on example.org: the official definition with its published ports removed and Caddy added in front. Every ${VARIABLE} is defined in the .env below.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
With Intel / AMD (VAAPI)
Intel, AMD or NVIDIA graphics through VAAPI, Immich's vaapi backend. For VAAPI: the vaapi backend of hwaccel.transcoding.yml (devices: /dev/dri:/dev/dri) copied into immich-server in place of the commented extends: block. Everything else is the None file, as the builder writes it for Immich alone on example.org.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://docs.immich.app/features/hardware-transcoding (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.transcoding.yml (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For VAAPI: the vaapi backend of hwaccel.transcoding.yml (devices: /dev/dri:/dev/dri) copied into immich-server in place of the commented extends: block. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" devices: - "/dev/dri:/dev/dri" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}: Immich docs: Hardware Transcoding checked 2026-10-09image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # Note the lack of an `extends` section/dev/dri:/dev/dri: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09vaapi: devices: - /dev/dri:/dev/dri- Immich's list of supported APIs has this line for VAAPI: “VAAPI (AMD / NVIDIA / Intel)” Immich docs: Hardware Transcoding checked 2026-10-09
- Only encoding uses the GPU until you also turn on hardware decoding: “By default, only encoding is currently hardware accelerated. This means the CPU is still used for software decoding and tone-mapping.” Immich docs: Hardware Transcoding checked 2026-10-09
With Intel Quick Sync
An Intel CPU or Arc card through Quick Sync, Immich's quicksync backend. Its compose lines are the same as vaapi's; the difference is the setting you pick in Immich. For Quick Sync: the quicksync backend of hwaccel.transcoding.yml (devices: /dev/dri:/dev/dri) copied into immich-server in place of the commented extends: block. Everything else is the None file, as the builder writes it for Immich alone on example.org.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://docs.immich.app/features/hardware-transcoding (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.transcoding.yml (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For Quick Sync: the quicksync backend of hwaccel.transcoding.yml (devices: /dev/dri:/dev/dri) copied into immich-server in place of the commented extends: block. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" devices: - "/dev/dri:/dev/dri" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}: Immich docs: Hardware Transcoding checked 2026-10-09image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # Note the lack of an `extends` section/dev/dri:/dev/dri: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09quicksync: devices: - /dev/dri:/dev/dri- Not under Windows: “WSL2 does not support Quick Sync.” Immich docs: Hardware Transcoding checked 2026-10-09
- If you configure Immich with a file instead of the Admin page: “If you use a configuration file, use the accel option to select the hardware (e.g. qsv for Intel or nvenc for Nvidia).” Immich docs: Hardware Transcoding checked 2026-10-09
With NVIDIA (NVENC)
An NVIDIA card through NVENC, Immich's nvenc backend. For NVENC: the nvenc backend of hwaccel.transcoding.yml (a deploy: reservation of one NVIDIA GPU with capabilities gpu, compute and video) copied into immich-server in place of the commented extends: block. Everything else is the None file, as the builder writes it for Immich alone on example.org.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://docs.immich.app/features/hardware-transcoding (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.transcoding.yml (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For NVENC: the nvenc backend of hwaccel.transcoding.yml (a deploy: reservation of one NVIDIA GPU with capabilities gpu, compute and video) copied into immich-server in place of the commented extends: block. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false deploy: resources: reservations: devices: - driver: "nvidia" count: 1 capabilities: - "gpu" - "compute" - "video" networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}: Immich docs: Hardware Transcoding checked 2026-10-09image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # Note the lack of an `extends` sectionnvenc:: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09nvenc: deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu - compute - videodriver: nvidia,count: 1: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09- driver: nvidia count: 1 capabilities: - gpu - compute - video- Install on the host first: “On Linux (except for WSL2), you also need to have NVIDIA Container Toolkit installed.” Immich docs: Hardware Transcoding checked 2026-10-09
- Two-pass encoding works only here: “Two-pass mode is only supported for NVENC. Other APIs will ignore this setting.” Immich docs: Hardware Transcoding checked 2026-10-09
With Rockchip (RKMPP)
A Rockchip ARM board (RK3588 and others) through RKMPP, Immich's rkmpp backend. For RKMPP: the rkmpp backend of hwaccel.transcoding.yml (security_opt systempaths=unconfined and apparmor=unconfined, group_add video, and the devices /dev/rga, /dev/dri, /dev/dma_heap and /dev/mpp_service) copied into immich-server in place of the commented extends: block. Its three commented lines for OpenCL tone-mapping stay out. Everything else is the None file, as the builder writes it for Immich alone on example.org.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://docs.immich.app/features/hardware-transcoding (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.transcoding.yml (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For RKMPP: the rkmpp backend of hwaccel.transcoding.yml (security_opt systempaths=unconfined and apparmor=unconfined, group_add video, and the devices /dev/rga, /dev/dri, /dev/dma_heap and /dev/mpp_service) copied into immich-server in place of the commented extends: block. Its three commented lines for OpenCL tone-mapping stay out. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" security_opt: - "systempaths=unconfined" - "apparmor=unconfined" group_add: - "video" devices: - "/dev/rga:/dev/rga" - "/dev/dri:/dev/dri" - "/dev/dma_heap:/dev/dma_heap" - "/dev/mpp_service:/dev/mpp_service" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}: Immich docs: Hardware Transcoding checked 2026-10-09image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # Note the lack of an `extends` sectionrkmpp:: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09rkmpp: security_opt: # enables full access to /sys and /proc, still far better than privileged: true - systempaths=unconfined - apparmor=unconfined group_add: - video devices: - /dev/rga:/dev/rga - /dev/dri:/dev/dri - /dev/dma_heap:/dev/dma_heap - /dev/mpp_service:/dev/mpp_servicesystempaths=unconfined,apparmor=unconfined: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09- systempaths=unconfined - apparmor=unconfined
video: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09group_add: - video
/dev/rga:/dev/rga,/dev/dri:/dev/dri,/dev/dma_heap:/dev/dma_heap,/dev/mpp_service:/dev/mpp_service: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09devices: - /dev/rga:/dev/rga - /dev/dri:/dev/dri - /dev/dma_heap:/dev/dma_heap - /dev/mpp_service:/dev/mpp_service
- What the two security options do, in the file's own comment: “security_opt: # enables full access to /sys and /proc, still far better than privileged: true” Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09
- Hardware tone-mapping is RK3588 only: “Only RK3588 supports hardware tonemapping, other SoCs use slower software tonemapping while still using hardware encoding.” Immich docs: Hardware Transcoding checked 2026-10-09
- For tone-mapping on RK3588, add /dev/mali0:/dev/mali0 to devices and the two OpenCL volumes the docs list (with libmali installed on the host): “under rkmpp uncomment the 3 lines required for OpenCL tonemapping by removing the # symbol at the beginning of each line” Immich docs: Hardware Transcoding checked 2026-10-09
With VAAPI on WSL2
Immich on Windows under WSL2, transcoding through VAAPI with Immich's vaapi-wsl backend. For VAAPI on WSL2: the vaapi-wsl backend of hwaccel.transcoding.yml (devices /dev/dri and /dev/dxg, the volume /usr/lib/wsl and LIBVA_DRIVER_NAME=d3d12) copied into immich-server in place of the commented extends: block. Everything else is the None file, as the builder writes it for Immich alone on example.org.
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://docs.immich.app/features/hardware-transcoding (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.transcoding.yml (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For VAAPI on WSL2: the vaapi-wsl backend of hwaccel.transcoding.yml (devices /dev/dri and /dev/dxg, the volume /usr/lib/wsl and LIBVA_DRIVER_NAME=d3d12) copied into immich-server in place of the commented extends: block. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" devices: - "/dev/dri:/dev/dri" - "/dev/dxg:/dev/dxg" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" - "/usr/lib/wsl:/usr/lib/wsl" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" LIBVA_DRIVER_NAME: "d3d12" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}: Immich docs: Hardware Transcoding checked 2026-10-09image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # Note the lack of an `extends` sectionvaapi-wsl:: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09vaapi-wsl: # use this for VAAPI if you're running Immich in WSL2 devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg volumes: - /usr/lib/wsl:/usr/lib/wsl environment: - LIBVA_DRIVER_NAME=d3d12/dev/dri:/dev/dri,/dev/dxg:/dev/dxg: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg
/usr/lib/wsl:/usr/lib/wsl: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09volumes: - /usr/lib/wsl:/usr/lib/wsl
LIBVA_DRIVER_NAME=d3d12: Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09environment: - LIBVA_DRIVER_NAME=d3d12
- Immich's docs on picking it: “Note: For VAAPI on WSL2, be sure to use vaapi-wsl rather than vaapi” Immich docs: Hardware Transcoding checked 2026-10-09
Machine learning hardware
Immich's machine-learning container runs Smart Search and facial recognition. In the file above it runs on the processor (Immich's cpu backend). Immich keeps each GPU or NPU backend for it in a second file, hwaccel.ml.yml, and gives each one an image tag suffix. Pick yours: the file below has that backend's lines copied into immich-machine-learning and the suffix added to its image, each quoted from Immich v3.3.1, with what the host needs first.
- The backends, in Immich's compose file: Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09
# file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
- Immich's docs on the feature: “As this is a new feature, it is still experimental and may not work on all systems.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- After switching: “You do not need to redo any machine learning jobs after enabling hardware acceleration.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- To see that the GPU is used, Immich's docs say to watch the immich-machine-learning log when a Smart Search or face detection job starts: “you should either see a log for Available ORT providers containing the relevant provider (e.g. CUDAExecutionProvider in the case of CUDA), or a Loaded ANN model log entry without errors in the case of ARM NN.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
CPU
Immich's cpu backend adds nothing, so the docker-compose.yml above already runs machine learning on the processor; there is no other file to copy.
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09cpu: {}: “ cpu: {}” Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09
With NVIDIA (CUDA)
An NVIDIA card with compute capability 5.2 or higher, through CUDA, Immich's cuda backend. For CUDA: the cuda backend of hwaccel.ml.yml (a deploy: reservation of one NVIDIA GPU with capabilities gpu) copied into immich-machine-learning, and -cuda added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “On Linux (except for WSL2), you also need to have NVIDIA Container Toolkit installed.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For CUDA: the cuda backend of hwaccel.ml.yml (a deploy: reservation of one NVIDIA GPU with capabilities gpu) copied into immich-machine-learning, and -cuda added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda" container_name: "immich-machine-learning" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false deploy: resources: reservations: devices: - driver: "nvidia" count: 1 capabilities: - "gpu" networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09cuda: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09cuda:: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09cuda: deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpunvidia,1,gpu: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09- driver: nvidia count: 1 capabilities: - gpu- The driver: “The installed driver must be >= 545 (it must support CUDA 12.3).” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- The card: “The GPU must have compute capability 5.2 or greater.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- Immich's docs write the whole image line for CUDA the same way: “image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
With AMD (ROCm)
An AMD card that ROCm supports, through Immich's rocm backend. For ROCm: the rocm backend of hwaccel.ml.yml (group_add video and the devices /dev/dri and /dev/kfd) copied into immich-machine-learning, and -rocm added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “On Linux, The AMDGPU driver module needs to be installed on the server and, if secure boot is used, the signing key of DKMS needs to be enrolled in UEFI BIOS” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For ROCm: the rocm backend of hwaccel.ml.yml (group_add video and the devices /dev/dri and /dev/kfd) copied into immich-machine-learning, and -rocm added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-rocm" container_name: "immich-machine-learning" group_add: - "video" devices: - "/dev/dri:/dev/dri" - "/dev/kfd:/dev/kfd" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09rocm: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09rocm:: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09rocm: group_add: - video devices: - /dev/dri:/dev/dri - /dev/kfd:/dev/kfdvideo: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09rocm: group_add: - video/dev/dri:/dev/dri,/dev/kfd:/dev/kfd: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09devices: - /dev/dri:/dev/dri - /dev/kfd:/dev/kfd
- Disk space for the image: “The ROCm image is quite large and requires at least 35GiB of free disk space.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- For a card ROCm does not list: “If it isn't officially supported, you can attempt to use the HSA_OVERRIDE_GFX_VERSION environmental variable: HSA_OVERRIDE_GFX_VERSION=<a supported version, e.g. 10.3.0>. If this doesn't work, you might need to also set HSA_USE_SVM=0.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
With Intel (OpenVINO)
Intel graphics such as Iris Xe and Arc, through OpenVINO, Immich's openvino backend. For OpenVINO: the openvino backend of hwaccel.ml.yml (the device /dev/dri) copied into immich-machine-learning, and -openvino added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “Ensure the server's kernel version is new enough to use the device for hardware acceleration.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For OpenVINO: the openvino backend of hwaccel.ml.yml (the device /dev/dri) copied into immich-machine-learning, and -openvino added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino" container_name: "immich-machine-learning" devices: - "/dev/dri:/dev/dri" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09openvino: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09openvino:,/dev/dri:/dev/dri: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09openvino: devices: - /dev/dri:/dev/dri- Which Intel graphics: “OpenVINO (Intel GPUs such as Iris Xe and Arc)” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- Memory: “Expect higher RAM usage when using OpenVINO compared to CPU processing.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- Integrated graphics: “Integrated GPUs are more likely to experience issues than discrete GPUs, especially for older processors or servers with low RAM.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
With Intel on WSL2 (OpenVINO)
Immich on Windows under WSL2 with Intel graphics, through Immich's openvino-wsl backend. It uses the same -openvino image. For OpenVINO on WSL2: the openvino-wsl backend of hwaccel.ml.yml (the device /dev/dxg and the volume /usr/lib/wsl) copied into immich-machine-learning, and -openvino added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “Ensure your container can access the /dev/dri directory, you can verify this by doing docker exec -t immich_machine_learning ls -la /dev/dri.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For OpenVINO on WSL2: the openvino-wsl backend of hwaccel.ml.yml (the device /dev/dxg and the volume /usr/lib/wsl) copied into immich-machine-learning, and -openvino added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino" container_name: "immich-machine-learning" devices: - "/dev/dxg:/dev/dxg" volumes: - "immich-model-cache:/cache" - "/usr/lib/wsl:/usr/lib/wsl" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09openvino: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09openvino-wsl:: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09openvino-wsl: devices: - /dev/dxg:/dev/dxg volumes: - /usr/lib/wsl:/usr/lib/wsl/dev/dxg:/dev/dxg: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09openvino-wsl: devices: - /dev/dxg:/dev/dxg/usr/lib/wsl:/usr/lib/wsl: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09volumes: - /usr/lib/wsl:/usr/lib/wsl
- In this file the container is immich-machine-learning, not immich_machine_learning. If it cannot see /dev/dri, Immich's docs say: “If this is not the case execute getent group render and getent group video on the WSL host, then add those groups to hwaccel.ml.yaml” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- The docs page prints a longer openvino-wsl block than the v3.3.1 file this page copies, with /dev/dri, /dev/bus/usb and the two group ids added. If the check above fails, these are the lines to add under immich-machine-learning, with your own group ids: Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
openvino-wsl: devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg volumes: - /dev/bus/usb:/dev/bus/usb - /usr/lib/wsl:/usr/lib/wsl group_add: - 44 # Replace this number with the number you found with getent group video - 992 # Replace this number with the number you found with getent group render
With Arm Mali GPU (ARM NN)
An Arm board with a Mali GPU, through ARM NN, Immich's armnn backend. For ARM NN: the armnn backend of hwaccel.ml.yml (the device /dev/mali0 and two read-only host files, the Mali firmware and libmali.so) copied into immich-machine-learning, and -armnn added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “/dev/mali0 must be available in the host server” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
On the host first: “You must have the closed-source libmali.so firmware (possibly with an additional firmware file)” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For ARM NN: the armnn backend of hwaccel.ml.yml (the device /dev/mali0 and two read-only host files, the Mali firmware and libmali.so) copied into immich-machine-learning, and -armnn added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-armnn" container_name: "immich-machine-learning" devices: - "/dev/mali0:/dev/mali0" volumes: - "immich-model-cache:/cache" - "/lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro" - "/usr/lib/libmali.so:/usr/lib/libmali.so:ro" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09armnn: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09armnn:: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09armnn: devices: - /dev/mali0:/dev/mali0 volumes: - /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro # Mali firmware for your chipset (not always required depending on the driver) - /usr/lib/libmali.so:/usr/lib/libmali.so:ro # Mali driver for your chipset (always required)/dev/mali0:/dev/mali0: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09devices: - /dev/mali0:/dev/mali0
/lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro: “ - /lib/firmware/mali_csffw.bin:/lib/firmware/mali_csffw.bin:ro # Mali firmware for your chipset (not always required depending on the driver)” Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09/usr/lib/libmali.so:/usr/lib/libmali.so:ro: “ - /usr/lib/libmali.so:/usr/lib/libmali.so:ro # Mali driver for your chipset (always required)” Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09- Only Mali: “ARM NN is only supported on devices with Mali GPUs. Other Arm devices are not supported.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- If your libmali.so is elsewhere: “The hwaccel.ml.yml file assumes the path to it is /usr/lib/libmali.so, so update accordingly if it is elsewhere” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
- The firmware file: “The hwaccel.ml.yml file assumes an additional file /lib/firmware/mali_csffw.bin, so update accordingly if your device's driver does not require this file” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
With Rockchip NPU (RKNN)
A Rockchip board's NPU (RK3566, RK3568, RK3576 or RK3588), through RKNN, Immich's rknn backend. For RKNN: the rknn backend of hwaccel.ml.yml (security_opt systempaths=unconfined and apparmor=unconfined, and the device /dev/dri) copied into immich-machine-learning, and -rknn added to its image tag. Everything else is the None file above, as the builder writes it for Immich alone on example.org.
On the host first: “You must have a supported Rockchip SoC: only RK3566, RK3568, RK3576 and RK3588 are supported at this moment.” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
On the host first: “RKNPU driver V0.9.8 or later must be available in the host server” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
# docker-compose.yml built at dankhost.com for: Immich # Each app block is its official compose definition. Only the names were prefixed with # the app slug (services, containers, volumes, bind folders, .env variables) so any set of # apps can share one file; other differences are listed under "Changed:" in each block. # Only Caddy publishes ports. Secrets live in .env next to this file. services: # ---- Caddy: the one reverse proxy, HTTPS certificates from Let's Encrypt ---- # Source: https://caddyserver.com/docs/running (checked 2026-09-23) # Source: https://github.com/dani-garcia/vaultwarden/wiki/Using-Docker-Compose (checked 2026-09-23) # Caddyfile goes in ./caddy/Caddyfile. Fixed address 172.30.0.2 so apps can trust it exactly. caddy: image: "caddy:2" container_name: "caddy" restart: "unless-stopped" ports: - "80:80" - "443:443" - "443:443/udp" volumes: - "./caddy:/etc/caddy" - "caddy-data:/data" - "caddy-config:/config" networks: proxy: ipv4_address: "172.30.0.2" # ---- Immich (photos.example.org) ---- # Source: https://docs.immich.app/install/docker-compose/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml (checked 2026-09-23) # Source: https://github.com/immich-app/immich/releases/latest/download/example.env (checked 2026-09-23) # Source: https://docs.immich.app/install/environment-variables/ (checked 2026-09-23) # Source: https://docs.immich.app/administration/reverse-proxy/ (checked 2026-09-23) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/docker-compose.yml (checked 2026-10-09) # Source: https://github.com/immich-app/immich/blob/v3.3.1/docker/hwaccel.ml.yml (checked 2026-10-09) # Source: https://docs.immich.app/features/ml-hardware-acceleration (checked 2026-10-09) # Changed: Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network. # The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes. # The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only). # Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address. # The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use. # For RKNN: the rknn backend of hwaccel.ml.yml (security_opt systempaths=unconfined and apparmor=unconfined, and the device /dev/dri) copied into immich-machine-learning, and -rknn added to its image tag. immich-server: image: "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" container_name: "immich-server" volumes: - "${IMMICH_UPLOAD_LOCATION}:/data" - "/etc/localtime:/etc/localtime:ro" environment: DB_PASSWORD: "${IMMICH_DB_PASSWORD}" DB_USERNAME: "${IMMICH_DB_USERNAME}" DB_DATABASE_NAME: "${IMMICH_DB_DATABASE_NAME}" IMMICH_TRUSTED_PROXIES: "172.30.0.2" depends_on: - "immich-redis" - "immich-database" restart: "always" healthcheck: disable: false networks: proxy: {} immich-backend: {} immich-machine-learning: image: "ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-rknn" container_name: "immich-machine-learning" security_opt: - "systempaths=unconfined" - "apparmor=unconfined" devices: - "/dev/dri:/dev/dri" volumes: - "immich-model-cache:/cache" restart: "always" healthcheck: disable: false networks: immich-backend: {} immich-redis: image: "docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf" container_name: "immich-redis" healthcheck: test: "redis-cli ping | grep -q PONG || exit 1" restart: "always" networks: immich-backend: aliases: - "redis" immich-database: image: "ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23" container_name: "immich-database" environment: POSTGRES_PASSWORD: "${IMMICH_DB_PASSWORD}" POSTGRES_USER: "${IMMICH_DB_USERNAME}" POSTGRES_DB: "${IMMICH_DB_DATABASE_NAME}" POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - "${IMMICH_DB_DATA_LOCATION}:/var/lib/postgresql/data" shm_size: "128mb" restart: "always" healthcheck: disable: false networks: immich-backend: aliases: - "database" networks: # Pinned so the trusted-proxy address given to each app (172.30.0.2) is exact. # If "docker compose up" reports "Pool overlaps", change 172.30.0 here, in Caddy's # ipv4_address and in every trusted-proxy value to a free 172.x.0 range. proxy: ipam: config: - subnet: "172.30.0.0/24" ip_range: "172.30.0.128/25" gateway: "172.30.0.1" immich-backend: {} volumes: caddy-data: caddy-config: immich-model-cache:
ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}: “ image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09rknn: “ # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09${IMMICH_VERSION:-release}-cuda: “ # Example tag: ${IMMICH_VERSION:-release}-cuda” Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09rknn:: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09rknn: security_opt: - systempaths=unconfined - apparmor=unconfined devices: - /dev/dri:/dev/drisystempaths=unconfined,apparmor=unconfined: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09rknn: security_opt: - systempaths=unconfined - apparmor=unconfined/dev/dri:/dev/dri: Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09- apparmor=unconfined devices: - /dev/dri:/dev/dri
- To check the driver version on the host: “You may confirm this by running cat /sys/kernel/debug/rknpu/version to check the version” Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09
Caddyfile save as caddy/Caddyfile
Caddy gets and renews the HTTPS certificate for photos.example.org by itself once the DNS record points at your server and ports 80 and 443 reach it.
# Caddyfile built at dankhost.com. Save it as ./caddy/Caddyfile next to docker-compose.yml.
# Caddy gets and renews a Let's Encrypt certificate for each name below by itself,
# once the DNS records point at this server and ports 80 and 443 reach it.
# Immich
photos.example.org {
reverse_proxy immich-server:2283
}
.env
The secret is left blank here on purpose: a password printed on a public page is the same for everyone who copies it. The builder fills it with random letters and digits made in your browser.
# .env for Immich, from dankhost.com/app/immich/. Fill the blank secret before starting. # Keep this file private (chmod 600). # Immich IMMICH_VERSION=v3 IMMICH_UPLOAD_LOCATION=./immich/library IMMICH_DB_DATA_LOCATION=./immich/postgres # 32 random letters and digits: the builder fills this in your browser IMMICH_DB_PASSWORD= IMMICH_DB_USERNAME=postgres IMMICH_DB_DATABASE_NAME=immich
Changes from the official file
Besides prefixing every service, container, volume, folder and variable with immich (so any set of apps can share one file), these are all the differences from what the project documents:
- Removed the documented '2283:2283' port; Caddy reaches immich-server on the proxy network.
- The documented 'env_file: .env' is replaced by explicit environment entries for the same variables, so one .env can serve several apps without name clashes.
- The documented example DB_PASSWORD 'postgres' is replaced by a generated letters-and-digits secret (Immich asks for A-Za-z0-9 only).
- Added IMMICH_TRUSTED_PROXIES (from Immich's environment-variable list) set to Caddy's fixed address.
- The internal network is not marked internal: the machine-learning container downloads its models from the internet on first use.
Notes for Immich behind the proxy
- Open the photos address straight after 'docker compose up -d': the first account created becomes the admin.
- Photos land in ./immich/library and the database in ./immich/postgres (the .env locations). Immich says network shares are not supported for the database folder.
- Video transcoding runs on the processor in this file (None, Immich's cpu backend, under Your hardware above). Pick your GPU there for the backend's lines, copied into immich-server.
- Hardware transcoding with Intel / AMD (VAAPI): the file under Your hardware adds the vaapi backend's device /dev/dri:/dev/dri in immich-server. Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
- Hardware transcoding with Intel Quick Sync: the file under Your hardware adds the quicksync backend's device /dev/dri:/dev/dri in immich-server. Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
- Hardware transcoding with NVIDIA (NVENC): the file under Your hardware adds the nvenc backend's deploy: reservation of one NVIDIA GPU (gpu, compute, video) in immich-server. Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
- Hardware transcoding with Rockchip (RKMPP): the file under Your hardware adds the rkmpp backend's two security options, the video group and four devices in immich-server. Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
- Hardware transcoding with VAAPI on WSL2: the file under Your hardware adds the vaapi-wsl backend's two devices, the /usr/lib/wsl volume and LIBVA_DRIVER_NAME=d3d12 in immich-server. Then, in Immich: “In the Admin page under Video transcoding settings, change the hardware acceleration setting to the appropriate option and save.” Immich docs: Hardware Transcoding checked 2026-10-09
How to run it
- At your DNS provider, add an A record named
photoson your domain pointing at the server's public IP address, and forward TCP 80, TCP 443 and UDP 443 to it. - Save the three files in one folder:
docker-compose.ymland.envside by side, the Caddyfile at./caddy/Caddyfile. Replaceexample.orgwith your domain in the Caddyfile, the compose file and the .env, or let the builder do it. - Fill the blank
IMMICH_DB_PASSWORDin.env. The builder generates it; on the server,tr -dc A-Za-z0-9 </dev/urandom | head -c 32prints 32 random letters and digits. Thenchmod 600 .env. - Start it:
docker compose up -d docker compose logs -f caddy # watch the certificate arrive
- Open the new address (
photos.plus your domain) in a browser and follow the notes above.
Back it up
Immich publishes a backup procedure: a database dump plus a copy of UPLOAD_LOCATION, best taken with immich-server stopped so the two stay in sync.
Below is the BACKUP.md the builder writes next to the compose file above: which of its folders and volumes hold data, the dump command the project documents, rewritten for this file's service names, what to copy with which container stopped, and a restore check. Pick more apps in the builder and it covers them all in one file.
# BACKUP.md built at dankhost.com for: Immich
What to copy from the docker-compose.yml built with this file, the database dump each project documents (rewritten for the service names in that file), what to copy with which container stopped, and how to check the result. Run every command in the folder that holds docker-compose.yml.
The folders are owned by the containers' users: put sudo in front of tar if it says "Permission denied". Named volumes live under /var/lib/docker/volumes, not next to the compose file, so they are copied through a throwaway ubuntu container (Docker's documented --volumes-from method). tar makes a full copy each run; for large folders an incremental tool (restic, borg, rsync) saves time and space.
Never run "docker compose down -v" on this file: it deletes the named volumes of every app in it.
## Before you start
BACKUP=/mnt/backup/selfhost # change this: a disk or machine other than this server's system disk
mkdir -p "$BACKUP"
## Every time: the three stack files
tar czf "$BACKUP/stack-files.tar.gz" docker-compose.yml .env caddy
.env holds the database passwords and secret keys the apps were set up with; keep this archive as private as the data.
## Caddy (the reverse proxy)
Caddy's docs: 'The data directory must not be treated as a cache.' It holds the TLS certificates and their private keys; without it Caddy has to ask Let's Encrypt for every certificate again.
- caddy-data (named volume, /data in caddy)
BACK UP: TLS certificates, private keys, OCSP staples.
- caddy-config (named volume, /config in caddy)
SKIP: the last active configuration, kept for 'caddy run --resume', which this setup does not use: it starts from the Caddyfile.
- ./caddy (/etc/caddy in caddy)
IN stack-files.tar.gz: the Caddyfile, copied with the stack files above.
Copy (Caddy keeps serving while you copy):
docker run --rm --volumes-from caddy -v "$BACKUP":/backup ubuntu tar cvf /backup/caddy-data.tar /data
Restore check:
tar tf "$BACKUP/caddy-data.tar" > /dev/null && echo OK
docker run --rm --volumes-from caddy -v "$BACKUP":/backup ubuntu bash -c "cd /data && tar xvf /backup/caddy-data.tar --strip 1"
Sources:
- Caddy docs: Conventions, Data directory: https://caddyserver.com/docs/conventions#data-directory (checked 2026-09-24)
- Docker docs: Volumes, Back up, restore, or migrate data volumes: https://docs.docker.com/engine/storage/volumes/#back-up-restore-or-migrate-data-volumes (checked 2026-09-24)
## Immich
Immich publishes a backup procedure: a database dump plus a copy of UPLOAD_LOCATION, best taken with immich-server stopped so the two stay in sync.
What this compose mounts:
- ./immich/library (${IMMICH_UPLOAD_LOCATION} in .env, /data in immich-server)
BACK UP: everything Immich stores as files: upload/ and library/ (your originals), profile/ (avatars), thumbs/ and encoded-video/ (Immich can regenerate these), and backups/ (Immich's own nightly database dumps, 14 kept by default).
- immich-model-cache (named volume, /cache in immich-machine-learning)
SKIP: downloaded machine-learning models; Immich's backup page does not list it.
- ./immich/postgres (${IMMICH_DB_DATA_LOCATION} in .env, /var/lib/postgresql/data in immich-database)
COVERED BY THE COMMAND BELOW: Postgres data files; copy them only with the database stopped.
1. Stop immich-server. Immich's backup page: stopping immich-server while you back up means nothing changes, so the database and the files always match. The database keeps running for the dump.
docker compose stop immich-server
2. Database dump for immich-database:
docker compose exec -T immich-database pg_dump --clean --if-exists --dbname=immich --username=postgres | gzip > "$BACKUP/immich-database.sql.gz"
This is the current command on Immich's Backup and Restore page, with immich_postgres replaced by this file's service name and the database name and user from this .env. Immich's pages for v2.5.0 and older used pg_dumpall --clean --if-exists --username=<DB_USERNAME> instead (every database on the server); a dump made that way is restored with --dbname=postgres.
3. Copy while immich-server is stopped:
tar czf "$BACKUP/immich-library.tar.gz" ./immich/library
4. Start it again:
docker compose start immich-server
Restore check:
zcat "$BACKUP/immich-database.sql.gz" | grep -c 'PostgreSQL database dump complete' # 1 means pg_dump finished
tar tzf "$BACKUP/immich-library.tar.gz" > /dev/null && echo OK
Put a copy back (with immich-server stopped):
tar xzf "$BACKUP/immich-library.tar.gz" # recreates ./immich/library; move the old folder aside first
Immich recommends restoring from its web app: Administration > Maintenance > Restore database backup, or 'Restore from backup' on the welcome screen of a fresh install whose upload folder already holds the restored files. Its command-line restore, with this file's names, into a database that immich-server has never started against:
docker compose create
docker compose start immich-database
sleep 10
gunzip --stdout "$BACKUP/immich-database.sql.gz" | sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" | docker compose exec -T immich-database psql --dbname=immich --username=postgres --single-transaction --set ON_ERROR_STOP=on
docker compose up -d
Immich's own restore starts with 'docker compose down -v'. Do not run that on this combined file: it deletes the named volumes of every app in it. If the database has already run, stop the Immich services and empty ./immich/postgres instead, as Immich's note on resetting DB_DATA_LOCATION says.
Sources:
- Immich docs: Backup and Restore: https://docs.immich.app/administration/backup-and-restore/ (checked 2026-09-24)
- Immich docs as of v2.5.0: Backup and Restore (the older pg_dumpall command): https://github.com/immich-app/immich/blob/v2.5.0/docs/docs/administration/backup-and-restore.md (checked 2026-09-24)
Update it
What docker compose pull does depends only on how each image line in the compose file above is tagged. For Immich as this page writes it:
| Service | Image | How it is pinned | What docker compose pull does |
|---|---|---|---|
caddy | caddy:2 | Major version only (tag 2) | Takes the newest image tagged 2: minor and patch releases of 2, never 3. A new major version needs a tag edit. |
immich-server | ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} | Major version only (tag v3) (.env sets IMMICH_VERSION=v3) | Takes the newest image tagged v3: minor and patch releases of 3, never 4. A new major version needs a tag edit. |
immich-machine-learning | ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} | Major version only (tag v3) (.env sets IMMICH_VERSION=v3) | Takes the newest image tagged v3: minor and patch releases of 3, never 4. A new major version needs a tag edit. |
immich-redis | docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf | Pinned by sha256 digest (the tag 9 is only a label) | Does not move: the digest names exactly one image. To update, change the tag and the digest. |
immich-database database | ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 | Pinned by sha256 digest (the tag 14-vectorchord0.4.3-pgvectors0.2.0 is only a label) | Does not move: the digest names exactly one image. To update, change the tag and the digest. |
Do not raise the major version of immich-database by editing its tag. Keep its tag, 14-vectorchord0.4.3-pgvectors0.2.0, as it is when you update Immich.
PostgreSQL's docs: a new major version may change how data is stored on disk, so a data folder written by an older major version will not start under a newer one (the server refuses it). Moving needs a dump and restore (pg_dumpall, then load the dump into the new version) or pg_upgrade. Minor releases of the same major version never change the storage format. Source: PostgreSQL docs: Upgrading a PostgreSQL Cluster checked 2026-09-30
What Immich's docs say about updating
Immich's upgrade page: when a new version is released, read the release notes and account for any breaking changes, then run docker compose pull && docker compose up -d in the folder with the compose file; docker image prune removes the old images.
- In this file both Immich images take their tag from IMMICH_VERSION in .env, which is v3: a pull brings every v3 release and never v4. Immich intends breaking changes only for major versions; to move to v4, read its release notes first, then change IMMICH_VERSION.
- The server works only with mobile apps of the matching major version (the apps usually also support the one before), so Immich recommends updating the phone apps before the server.
- Downgrading, even within the same minor version, is not supported: the backup is the only way back.
- The database image is Immich's own ghcr.io/immich-app/postgres with VectorChord, pinned by digest. The only database image change the upgrade page describes is the move to VectorChord, which this file already has.
The steps
- Back up first, as in Back it up above. An update can migrate Immich's data on its first start and its database with it; the copy is the way back.
- Download the new images. Running containers are not touched yet:
docker compose pull
- Recreate the containers whose image changed. Volumes and bind-mounted folders stay as they are:
docker compose up -d
- Watch Immich start (Ctrl+C stops following the log, not the app):
docker compose logs -f immich-server
- Optional: remove the old images the pull left without a tag. This covers every stack on the machine, not only this one:
docker image prune
Locked out? Reset the admin password
Sets a new password for Immich's admin account. The command shows the admin it found, asks for the new password and asks whether to invalidate the existing sessions.
Run Immich's administrative CLI, immich-admin, in the server container. Source: Immich docs: Server Commands read 2026-10-03
docker compose exec immich-server immich-admin reset-admin-password
Sources
Every page below was fetched on the date shown.
- Immich README checked 2026-09-23 (what it does)
- Immich docs: Requirements checked 2026-09-23 (hardware requirements)
- Immich docs: Docker Compose install checked 2026-09-23 (compose definition and proxy settings)
- Immich release docker-compose.yml checked 2026-09-23 (compose definition and proxy settings)
- Immich release example.env checked 2026-09-23 (compose definition and proxy settings)
- Immich docs: environment variables (DB_HOSTNAME, REDIS_HOSTNAME, IMMICH_TRUSTED_PROXIES) checked 2026-09-23 (compose definition and proxy settings)
- Immich docs: reverse proxy (Caddy example) checked 2026-09-23 (compose definition and proxy settings)
- Caddy docs: Keep Caddy running (Docker Compose section) checked 2026-09-23 (Caddy)
- Vaultwarden wiki: Caddy with HTTP challenge (uses the caddy:2 image) checked 2026-09-23 (Caddy)
- Immich docs: Backup and Restore checked 2026-09-24 (backup plan)
- Immich docs as of v2.5.0: Backup and Restore (the older pg_dumpall command) checked 2026-09-24 (backup plan)
- Caddy docs: Conventions, Data directory checked 2026-09-24 (backup plan)
- Docker docs: Volumes, Back up, restore, or migrate data volumes checked 2026-09-24 (backup plan)
- Immich docs: Upgrading (breaking changes, versioning policy) checked 2026-09-30 (update notes)
- PostgreSQL docs: Upgrading a PostgreSQL Cluster checked 2026-09-30 (database upgrade)
- Docker docs: docker compose pull checked 2026-09-30 (update steps)
- Docker docs: docker compose up (recreates changed containers, keeps volumes) checked 2026-09-30 (update steps)
- Docker docs: docker image prune checked 2026-09-30 (update steps)
- Immich docs: Hardware Transcoding checked 2026-10-09 (Your hardware)
- Immich v3.3.1: docker/hwaccel.transcoding.yml checked 2026-10-09 (Your hardware)
- Immich v3.3.1: docker/docker-compose.yml checked 2026-10-09 (Your hardware)
- Immich docs: Hardware-Accelerated Machine Learning checked 2026-10-09 (Your hardware)
- Immich v3.3.1: docker/hwaccel.ml.yml checked 2026-10-09 (Your hardware)