Application site https://immich.app/
Files below should work for v1.132.3
First try
curl -o- https://raw.githubusercontent.com/immich-app/immich/main/install.sh | bash
If docker is not installed
For Ubuntu 24 and 25
Docker install https://docs.docker.com/engine/install/ubuntu/ for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove -y $pkg; done apt update apt install ca-certificates curl install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc chmod a+r /etc/apt/keyrings/docker.asc echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
.env file example
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables ML_CACHE_LOCATION=/storage/docker/immich/cache # The location where your uploaded files are stored UPLOAD_LOCATION=/storage/docker/immich/photo # The location where your database files are stored DB_DATA_LOCATION=/storage/docker/immich/postgres # To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List TZ=Ukraine/Kyiv # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=DatabasePassword # in case of IPv6 disabled need "IMMICH_HOST: 0.0.0.0" to be added for machine learning IMMICH_HOST=0.0.0.0 # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich
docker-compose.yml
Example with openvino HW acceleration for ML and quicksync (Intel Graphics) acceleration for video transcoding
# # WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose # # Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} extends: file: hwaccel.transcoding.yml service: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - .env ports: - 2283:2283 depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration file: hwaccel.ml.yml service: openvino # cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - ${ML_CACHE_LOCATION}:/cache env_file: - .env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1 healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: >- pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m command: >- postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on restart: always
hwaccel.ml.yml
services: armnn: 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) rknn: security_opt: - systempaths=unconfined - apparmor=unconfined devices: - /dev/dri:/dev/dri cpu: {} cuda: deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu rocm: group_add: - video devices: - /dev/dri:/dev/dri - /dev/kfd:/dev/kfd openvino: device_cgroup_rules: - 'c 189:* rmw' devices: - /dev/dri:/dev/dri volumes: - /dev/bus/usb:/dev/bus/usb openvino-wsl: devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg volumes: - /dev/bus/usb:/dev/bus/usb - /usr/lib/wsl:/usr/lib/wsl
hwaccel.transcoding.yml
# Configurations for hardware-accelerated transcoding # If using Unraid or another platform that doesn't allow multiple Compose files, # you can inline the config for a backend by copying its contents # into the immich-microservices service in the docker-compose.yml file. # See https://immich.app/docs/features/hardware-transcoding for more info on using hardware transcoding. services: cpu: {} nvenc: deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: - gpu - compute - video quicksync: devices: - /dev/dri:/dev/dri rkmpp: 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_service #- /dev/mali0:/dev/mali0 # only required to enable OpenCL-accelerated HDR -> SDR tonemapping volumes: #- /etc/OpenCL:/etc/OpenCL:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping #- /usr/lib/aarch64-linux-gnu/libmali.so.1:/usr/lib/aarch64-linux-gnu/libmali.so.1:ro # only required to enable OpenCL-accelerated HDR -> SDR tonemapping vaapi: devices: - /dev/dri:/dev/dri vaapi-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
update_immich.sh
docker pull ghcr.io/immich-app/immich-server:release docker pull ghcr.io/immich-app/immich-machine-learning:release docker pull redis:6.2-alpine docker pull tensorchord/pgvecto-rs:pg14-v0.2.0 docker compose down docker compose up -d
Nginx example config
server { listen 80; server_name immich.example.com; return 301 https://$server_name$request_uri; location / { } } server { listen 443 ssl; http2 on; server_name immich.example.com; # SSL Settings ssl_certificate /etc/ssl/private/wildcard.pem; ssl_certificate_key /etc/ssl/private/wildcard.pem; ssl_trusted_certificate "/etc/ssl/certs/wildcard.ca"; add_header Strict-Transport-Security 'max-age=15552000; includeSubDomains'; ssl_protocols TLSv1.3 TLSv1.2; ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"; ssl_session_cache shared:SSL:20m; ssl_session_timeout 1h; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; # Timeouts client_max_body_size 50G; client_body_timeout 600s; proxy_read_timeout 600s; proxy_send_timeout 600s; send_timeout 600s; # Set headers proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # enable websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_redirect off; # DNS resolver 1.1.1.1 8.8.4.4 valid=300s; resolver_timeout 5s; location / { proxy_pass http://192.168.0.1:2283; } }
(optional) to suppress redis warning
echo 'vm.overcommit_memory=1' > /etc/sysctl.d/20-redis.conf