© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•9mo ago•
5 replies
Quio

not restarting after reboot

Hello
I also posted this question on the discussion page as I'm not exactly sure where the correct place is (https://github.com/immich-app/immich/discussions/18533).
But basically my problem is this:
When I set any docker deploy setting (see below for my docker compose setup), the containers which have the deploy settings set won't restart after a system reboot or after a restart of the docker service. If I remove the deploy section but keep everything else, it works as expected. It seems like the deploy section does not consider my restart policy. The deploy setting itself works as I can see my graphics card inside the containers.
#
# WARNING: 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}
    deploy:
      resources:
        reservations:
          devices:
            - driver: cdi
              device_ids:
                - nvidia.com/gpu=all
              capabilities:
                - gpu
    volumes:
      - /hdd/non-critical/immich/data:/usr/src/app/upload
      - /hdd/critical/immich/data/library:/usr/src/app/upload/library
      - /hdd/critical/immich/data/upload:/usr/src/app/upload/upload
      - /hdd/critical/immich/data/profile:/usr/src/app/upload/profile
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /ssd/critical/immich/secrets.env
      - .env
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false
    networks:
      - immich-internal
      - immich-external
    labels:
      traefik.enable: true
      traefik.docker.network: immich
      traefik.http.routers.immich.rule: Host(`immich.dominik-schwaiger.ch`)
      traefik.http.routers.immich.tls: true
      traefik.http.routers.immich.tls.certresolver: letsencrypt

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: cdi
              device_ids:
                - nvidia.com/gpu=all
              capabilities:
                - gpu
    volumes:
      - model-cache:/cache
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /ssd/critical/immich/secrets.env
      - .env
    restart: always
    healthcheck:
      disable: false
    networks:
      - immich-internal

  redis:
    container_name: immich_redis
    image: redis
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
    networks:
      - immich-internal

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.3.0
    networks:
      - immich-internal
    env_file:
      - /ssd/critical/immich/secrets.env
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      DB_STORAGE_TYPE: 'SSD'
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /ssd/critical/immich/database:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:


networks:
  immich-internal:

  immich-external:
    name: immich
    external: true
#
# WARNING: 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}
    deploy:
      resources:
        reservations:
          devices:
            - driver: cdi
              device_ids:
                - nvidia.com/gpu=all
              capabilities:
                - gpu
    volumes:
      - /hdd/non-critical/immich/data:/usr/src/app/upload
      - /hdd/critical/immich/data/library:/usr/src/app/upload/library
      - /hdd/critical/immich/data/upload:/usr/src/app/upload/upload
      - /hdd/critical/immich/data/profile:/usr/src/app/upload/profile
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /ssd/critical/immich/secrets.env
      - .env
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false
    networks:
      - immich-internal
      - immich-external
    labels:
      traefik.enable: true
      traefik.docker.network: immich
      traefik.http.routers.immich.rule: Host(`immich.dominik-schwaiger.ch`)
      traefik.http.routers.immich.tls: true
      traefik.http.routers.immich.tls.certresolver: letsencrypt

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: cdi
              device_ids:
                - nvidia.com/gpu=all
              capabilities:
                - gpu
    volumes:
      - model-cache:/cache
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - /ssd/critical/immich/secrets.env
      - .env
    restart: always
    healthcheck:
      disable: false
    networks:
      - immich-internal

  redis:
    container_name: immich_redis
    image: redis
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro
    networks:
      - immich-internal

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.3.0
    networks:
      - immich-internal
    env_file:
      - /ssd/critical/immich/secrets.env
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      DB_STORAGE_TYPE: 'SSD'
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /ssd/critical/immich/database:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:


networks:
  immich-internal:

  immich-external:
    name: immich
    external: true
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Auto start after reboot?
ImmichIImmich / help-desk-support
3mo ago
Immich unreachable after reboot
ImmichIImmich / help-desk-support
4mo ago
Linux Read Only after reboot
ImmichIImmich / help-desk-support
3mo ago
No files/data after restarting
ImmichIImmich / help-desk-support
2mo ago