immich_server cannot connect with immich-machine-learning #7497

Closed
opened 2026-02-20 05:03:57 -05:00 by deekerman · 4 comments
Owner

Originally created by @timwtang-star on GitHub (Nov 30, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I found a lot of issues with connecting to machine-learning, but each resulted in slightly different errors. Here are my results:

I used Synology's Container Manager's UI to launch immich. This was back was pre v2.2.0. It was working fine. The face detection was working. Then, somewhere down the line, I upgraded to v2.2.1, then upgraded to v2.3.1. I don't remember if it was before or after upgrading to v2.3.1, but I started to notice that facial recognition was not working. I wasn't knowledgeable enough at the time to check the log file to see what was going on.

Because I was keen on changing all my Docker apps to run on Portainer, I decided to move the docker-compose.yml to Portainer and launch from Portainer on Synology's Container Manager. I tried to fix the facial-recognition issue by brute force - erase everything (the DB and libraries) and start from scratch (luckily, all my photos are on an external library). This is when I started to look at the log file and noticed that the immich_server was not recognizing http://immich-machine-learning:3003. (See log for exact error message).

I tried adding port #3003 to immich-machine-learning in the docker-compose.yml file, but Docker complained that I cannot have a 'port' definition for immich-machine-learning. So, I took it out.

I then went into the immich_server container's console mode to see if I could reach http://immich-machine-learning using the curl command, and it could not find http://immich-maching-learning. Somehow, immich_server is not able to reach immich-machine-learning. Many of the solutions I found online were to put both on the same Docker, which I am.

I'm hoping this is not a bug, but a usage issue. I'm using the bug reporting page to provide the details of my issue.

Thanks in advance for any suggestions on fixing this.
Tim

The OS that Immich Server is running on

Synology DMS 7.2.2-72806

Version of Immich Server

v2.3.1

Version of Immich Mobile App

na

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

#
# WARNING: To install Immich, follow our guide: https://docs.immich.app/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: cpu # 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}:/data
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_LIBRARY}:${EXTERNAL_LIBRARY}
    env_file:
      - stack.env
    ports:
      - '${IMMICH_PORT}:${IMMICH_PORT}'
    depends_on:
      - redis
      - database
      - immich-machine-learning
    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}
    # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration
    #   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
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8@sha256:81db6d39e1bba3b3ff32bd3a1b19a6d69690f94a3954ec131277b9a26b95b3aa
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      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: 'HDD'
    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
    shm_size: 128mb
    restart: always

volumes:
  model-cache:

Your .env content

# Immich Environment Variables for Synology
#
# You can find documentation for all the supported env variables at 
# https://immich.app/docs/install/environment-variables
CONTAINER_PATH=/volume1/docker/Containers
EXTERNAL_LIBRARY=/volume1/photo

# The location where your uploaded files are stored
UPLOAD_LOCATION=${CONTAINER_PATH}/immich-app/library

# The location where your database files are stored. 
# Network shares are not supported for the database
DB_DATA_LOCATION=${CONTAINER_PATH}/immich-app/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=America/Los_Angeles

# Define the HTTP port number
IMMICH_PORT=2283

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=v2.3.1

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

  1. Create the Stack with the above docker-compose.yml and env data in Portainer
  2. Find one photo, and click on "Refresh faces"
  3. Or go to Admin screen and start "Face Detection" job.
    ...

Relevant log output

[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, PATCH} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id/assets, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id/assets, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] StackController {/api/stacks}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/stacks/:id/assets/:assetId, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] SyncController {/api/sync}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/full-sync, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/delta-sync, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/stream, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/ack, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/ack, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/sync/ack, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] SystemConfigController {/api/system-config}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-config, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-config/defaults, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-config, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-config/storage-template-options, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] SystemMetadataController {/api/system-metadata}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-metadata/admin-onboarding, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-metadata/admin-onboarding, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-metadata/reverse-geocoding-state, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/system-metadata/version-check-state, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] TagController {/api/tags}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/assets, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/:id, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/:id, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/:id/assets, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/tags/:id/assets, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] TimelineController {/api/timeline}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/timeline/buckets, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/timeline/bucket, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] TrashController {/api/trash}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/trash/empty, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/trash/restore, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/trash/restore/assets, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] UserAdminController {/api/admin/users}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/sessions, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/statistics, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/preferences, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/preferences, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/restore, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] UserController {/api/users}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/preferences, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/preferences, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/license, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/license, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/license, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] ViewController {/api/view}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RoutesResolver] WorkflowController {/api/workflows}:
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows, POST} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, GET} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, PUT} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, DELETE} route
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:NestApplication] Nest application successfully started
[Nest] 23  - 11/30/2025, 10:52:42 AM     LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v2.3.1] [production] 
[Nest] 23  - 11/30/2025, 10:52:43 AM     LOG [Api:WebsocketRepository] Websocket Connect:    IqHeLz4ds28Wz_PWAAAB
[Nest] 23  - 11/30/2025, 10:52:45 AM     LOG [Api:WebsocketRepository] Websocket Connect:    VNx20-aN0yyU4B99AAAD
[Nest] 23  - 11/30/2025, 10:53:02 AM     LOG [Api:WebsocketRepository] Websocket Disconnect: VNx20-aN0yyU4B99AAAD
[Nest] 23  - 11/30/2025, 10:53:02 AM     LOG [Api:WebsocketRepository] Websocket Connect:    35W6APHeJREBo2fOAAAF
[Nest] 7  - 11/30/2025, 10:53:36 AM    WARN [Microservices:MachineLearningRepository] Machine learning request to "http://immich-machine-learning:3003" failed: fetch failed
[Nest] 7  - 11/30/2025, 10:53:36 AM   ERROR [Microservices:{"id":"b952cfae-9450-4cfd-8de0-8581485dc01d"}] Unable to run job handler (AssetDetectFaces): Error: Machine learning request '{"facial-recognition":{"detection":{"modelName":"buffalo_l","options":{"minScore":0.7}},"recognition":{"modelName":"buffalo_l"}}}' failed for all URLs
Error: Machine learning request '{"facial-recognition":{"detection":{"modelName":"buffalo_l","options":{"minScore":0.7}},"recognition":{"modelName":"buffalo_l"}}}' failed for all URLs
    at MachineLearningRepository.predict (/usr/src/app/server/dist/repositories/machine-learning.repository.js:117:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async MachineLearningRepository.detectFaces (/usr/src/app/server/dist/repositories/machine-learning.repository.js:126:26)
    at async PersonService.handleDetectFaces (/usr/src/app/server/dist/services/person.service.js:243:52)
    at async JobService.onJobRun (/usr/src/app/server/dist/services/job.service.js:51:30)
    at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:91:13)
    at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.62.1/node_modules/bullmq/dist/cjs/classes/worker.js:512:32

Additional information

Here's the log file from the immich-machine-learning container: (There are no error messages)

[11/30/25 10:52:34] INFO Starting gunicorn 23.0.0
[11/30/25 10:52:34] INFO Listening at: http://[::]:2283 (11)
[11/30/25 10:52:34] INFO Using worker: immich_ml.config.CustomUvicornWorker
[11/30/25 10:52:34] INFO Booting worker with pid: 15
[11/30/25 10:52:38] INFO generated new fontManager
[11/30/25 10:52:39] INFO Started server process [15]
[11/30/25 10:52:39] INFO Waiting for application startup.
[11/30/25 10:52:39] INFO Created in-memory cache with unloading after 300s
of inactivity.
[11/30/25 10:52:39] INFO Initialized request thread pool with 4 threads.
[11/30/25 10:52:39] INFO Application startup complete.

Originally created by @timwtang-star on GitHub (Nov 30, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I found a lot of issues with connecting to machine-learning, but each resulted in slightly different errors. Here are my results: I used Synology's Container Manager's UI to launch immich. This was back was pre v2.2.0. It was working fine. The face detection was working. Then, somewhere down the line, I upgraded to v2.2.1, then upgraded to v2.3.1. I don't remember if it was before or after upgrading to v2.3.1, but I started to notice that facial recognition was not working. I wasn't knowledgeable enough at the time to check the log file to see what was going on. Because I was keen on changing all my Docker apps to run on Portainer, I decided to move the docker-compose.yml to Portainer and launch from Portainer on Synology's Container Manager. I tried to fix the facial-recognition issue by brute force - erase everything (the DB and libraries) and start from scratch (luckily, all my photos are on an external library). This is when I started to look at the log file and noticed that the immich_server was not recognizing http://immich-machine-learning:3003. (See log for exact error message). I tried adding port #3003 to immich-machine-learning in the docker-compose.yml file, but Docker complained that I cannot have a 'port' definition for immich-machine-learning. So, I took it out. I then went into the immich_server container's console mode to see if I could reach http://immich-machine-learning using the curl command, and it could not find http://immich-maching-learning. Somehow, immich_server is not able to reach immich-machine-learning. Many of the solutions I found online were to put both on the same Docker, which I am. I'm hoping this is not a bug, but a usage issue. I'm using the bug reporting page to provide the details of my issue. Thanks in advance for any suggestions on fixing this. Tim ### The OS that Immich Server is running on Synology DMS 7.2.2-72806 ### Version of Immich Server v2.3.1 ### Version of Immich Mobile App na ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML # # WARNING: To install Immich, follow our guide: https://docs.immich.app/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: cpu # 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}:/data - /etc/localtime:/etc/localtime:ro - ${EXTERNAL_LIBRARY}:${EXTERNAL_LIBRARY} env_file: - stack.env ports: - '${IMMICH_PORT}:${IMMICH_PORT}' depends_on: - redis - database - immich-machine-learning 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} # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/features/ml-hardware-acceleration # 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 volumes: - model-cache:/cache env_file: - stack.env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8@sha256:81db6d39e1bba3b3ff32bd3a1b19a6d69690f94a3954ec131277b9a26b95b3aa healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} 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: 'HDD' 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 shm_size: 128mb restart: always volumes: model-cache: ``` ### Your .env content ```Shell # Immich Environment Variables for Synology # # You can find documentation for all the supported env variables at # https://immich.app/docs/install/environment-variables CONTAINER_PATH=/volume1/docker/Containers EXTERNAL_LIBRARY=/volume1/photo # The location where your uploaded files are stored UPLOAD_LOCATION=${CONTAINER_PATH}/immich-app/library # The location where your database files are stored. # Network shares are not supported for the database DB_DATA_LOCATION=${CONTAINER_PATH}/immich-app/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=America/Los_Angeles # Define the HTTP port number IMMICH_PORT=2283 # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=v2.3.1 # Connection secret for postgres. You should change it to a random password # Please use only the characters `A-Za-z0-9`, without special characters or spaces DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Create the Stack with the above docker-compose.yml and env data in Portainer 2. Find one photo, and click on "Refresh faces" 3. Or go to Admin screen and start "Face Detection" job. ... ### Relevant log output ```shell [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, PATCH} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id/assets, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/shared-links/:id/assets, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] StackController {/api/stacks}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks/:id, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/stacks/:id/assets/:assetId, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] SyncController {/api/sync}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/full-sync, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/delta-sync, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/stream, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/ack, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/ack, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/sync/ack, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] SystemConfigController {/api/system-config}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-config, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-config/defaults, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-config, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-config/storage-template-options, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] SystemMetadataController {/api/system-metadata}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-metadata/admin-onboarding, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-metadata/admin-onboarding, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-metadata/reverse-geocoding-state, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/system-metadata/version-check-state, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] TagController {/api/tags}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/assets, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/:id, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/:id, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/:id/assets, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/tags/:id/assets, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] TimelineController {/api/timeline}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/timeline/buckets, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/timeline/bucket, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] TrashController {/api/trash}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/trash/empty, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/trash/restore, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/trash/restore/assets, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] UserAdminController {/api/admin/users}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/sessions, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/statistics, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/preferences, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/preferences, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/admin/users/:id/restore, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] UserController {/api/users}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/preferences, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/preferences, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/license, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/license, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/license, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/me/onboarding, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] ViewController {/api/view}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder/unique-paths, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/view/folder, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RoutesResolver] WorkflowController {/api/workflows}: [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/workflows, POST} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/workflows, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, GET} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, PUT} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:RouterExplorer] Mapped {/api/workflows/:id, DELETE} route [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:NestApplication] Nest application successfully started [Nest] 23 - 11/30/2025, 10:52:42 AM LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:2283 [v2.3.1] [production] [Nest] 23 - 11/30/2025, 10:52:43 AM LOG [Api:WebsocketRepository] Websocket Connect: IqHeLz4ds28Wz_PWAAAB [Nest] 23 - 11/30/2025, 10:52:45 AM LOG [Api:WebsocketRepository] Websocket Connect: VNx20-aN0yyU4B99AAAD [Nest] 23 - 11/30/2025, 10:53:02 AM LOG [Api:WebsocketRepository] Websocket Disconnect: VNx20-aN0yyU4B99AAAD [Nest] 23 - 11/30/2025, 10:53:02 AM LOG [Api:WebsocketRepository] Websocket Connect: 35W6APHeJREBo2fOAAAF [Nest] 7 - 11/30/2025, 10:53:36 AM WARN [Microservices:MachineLearningRepository] Machine learning request to "http://immich-machine-learning:3003" failed: fetch failed [Nest] 7 - 11/30/2025, 10:53:36 AM ERROR [Microservices:{"id":"b952cfae-9450-4cfd-8de0-8581485dc01d"}] Unable to run job handler (AssetDetectFaces): Error: Machine learning request '{"facial-recognition":{"detection":{"modelName":"buffalo_l","options":{"minScore":0.7}},"recognition":{"modelName":"buffalo_l"}}}' failed for all URLs Error: Machine learning request '{"facial-recognition":{"detection":{"modelName":"buffalo_l","options":{"minScore":0.7}},"recognition":{"modelName":"buffalo_l"}}}' failed for all URLs at MachineLearningRepository.predict (/usr/src/app/server/dist/repositories/machine-learning.repository.js:117:15) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async MachineLearningRepository.detectFaces (/usr/src/app/server/dist/repositories/machine-learning.repository.js:126:26) at async PersonService.handleDetectFaces (/usr/src/app/server/dist/services/person.service.js:243:52) at async JobService.onJobRun (/usr/src/app/server/dist/services/job.service.js:51:30) at async EventRepository.onEvent (/usr/src/app/server/dist/repositories/event.repository.js:91:13) at async /usr/src/app/server/node_modules/.pnpm/bullmq@5.62.1/node_modules/bullmq/dist/cjs/classes/worker.js:512:32 ``` ### Additional information Here's the log file from the immich-machine-learning container: (There are no error messages) [11/30/25 10:52:34] INFO Starting gunicorn 23.0.0 [11/30/25 10:52:34] INFO Listening at: http://[::]:2283 (11) [11/30/25 10:52:34] INFO Using worker: immich_ml.config.CustomUvicornWorker [11/30/25 10:52:34] INFO Booting worker with pid: 15 [11/30/25 10:52:38] INFO generated new fontManager [11/30/25 10:52:39] INFO Started server process [15] [11/30/25 10:52:39] INFO Waiting for application startup. [11/30/25 10:52:39] INFO Created in-memory cache with unloading after 300s of inactivity. [11/30/25 10:52:39] INFO Initialized request thread pool with 4 threads. [11/30/25 10:52:39] INFO Application startup complete.
Author
Owner

@bo0tzz commented on GitHub (Nov 30, 2025):

The problem is that you've set IMMICH_PORT=2283 in the .env, which also applies to the ML container.

@bo0tzz commented on GitHub (Nov 30, 2025): The problem is that you've set `IMMICH_PORT=2283` in the .env, which also applies to the ML container.
Author
Owner

@timwtang-star commented on GitHub (Nov 30, 2025):

Thank you for the quick response.

The original docker-compose.yml (https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml) from the immich install instruction had port 2283:2283 defined. I simply put that into an environment variable. If not 2283, then what should it be?

The original .env file did not have IMMICH_PORT, I added that so that it can be changed to different port number if needs to, but I keep the port number the same as originally defined.

Regards,
Tim

@timwtang-star commented on GitHub (Nov 30, 2025): Thank you for the quick response. The original docker-compose.yml (https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml) from the immich install instruction had port 2283:2283 defined. I simply put that into an environment variable. If not 2283, then what should it be? The original .env file did not have IMMICH_PORT, I added that so that it can be changed to different port number if needs to, but I keep the port number the same as originally defined. Regards, Tim
Author
Owner

@timwtang-star commented on GitHub (Nov 30, 2025):

OOF...

I get it. I cannot use IMMICH_PORT environment variable name as it is reserved for ML. I changed the variable name to IMMICH_SERVER_PORT, and now it seems to work... at least no error messages.

Thanks!
Tim

@timwtang-star commented on GitHub (Nov 30, 2025): OOF... I get it. I cannot use IMMICH_PORT environment variable name as it is reserved for ML. I changed the variable name to IMMICH_SERVER_PORT, and now it seems to work... at least no error messages. Thanks! Tim
Author
Owner

@JustACasual commented on GitHub (Jan 22, 2026):

@timwtang-star Thanks my dude, same issue here, also named my env var IMMICH_PORT :D
Thank you so much for documenting it here

@JustACasual commented on GitHub (Jan 22, 2026): @timwtang-star Thanks my dude, same issue here, also named my env var IMMICH_PORT :D Thank you so much for documenting it here
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#7497
No description provided.