Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Immich with Docker Compose Manager an external network not working

Featured Replies

Hi together

I currently try to install Immich on my Unraid as Docker Compose Stack using the Guide https://forums.unraid.net/topic/190532-guide-immich-docker-setup-docker-compose/ from @bmartino1 .

Using his compose file immich runs fine.

But I am using a custom macvlan to connect the container to my external network.

As soon as I add my network, immich does not work anymore. It loads up but does not generate thumbnails anymore or find the correct path to them. Also it does not apply storage templates anymore.

Using the CA method for installing immich works using my network but I prefer going the compose path because of the official immich support.

This is my compose file after adding my network:

#
# 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: cpu
    volumes:
      # Photo upload storage
      - immich-photos:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false
    networks:
      bond0.50:
        ipv4_address: 10.10.50.40
      immich-net:
        ipv4_address: 172.19.0.10
    dns:
      - 1.1.1.1
      - 8.8.8.8
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
      net.unraid.docker.webui: http://[IP]:[PORT:2283]
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false
    networks:
      immich-net:
        ipv4_address: 172.19.0.11
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884
    volumes:
      - redis-data:/data
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
    networks:
      immich-net:
        ipv4_address: 172.19.0.12
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/redis.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.3.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - postgres-data:/var/lib/postgresql/data
    restart: always
    networks:
      immich-net:
        ipv4_address: 172.19.0.13
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/db-backup.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

networks:
  bond0.50:
    external: true
  immich-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.19.0.0/16
          gateway: 172.19.0.1

volumes:
  model-cache:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/config
      o: bind

  immich-photos:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/photos
      o: bind

  postgres-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/database/postgres
      o: bind

  redis-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/database/redis
      o: bind

Does anyone hav an idea why this is not working?

I also tried giving all containers IPs from both networks or giving them only IP addresses from my external network. Same result, it dows not communicate correctly.

I would appreciate any advice.

  • Community Expert

your tying to associate 2 networks to teh immich server.

networks: bond0.50: ipv4_address: 10.10.50.40 immich-net: ipv4_address: 172.19.0.10

this will not work. while posbile to add mutiple networks the dockert netowrk is unable to comunciate to the otehr dcoekrs.

all dockers will need set to .

bond0.50: ipv4_address: 10.10.50.40

and have there own IP address for comunication.

Your better off editing the docekr bridge to assocaite to the bond0 interface on vlan 50

However you can convert immich-net into a macvlan driver network...

networks:
  immich-net:
    driver: macvlan
    driver_opts:
      parent: bond0.50
    ipam:
      config:
        - subnet: 10.10.50.0/24
          gateway: 10.10.50.1

and Then, for each container set a static IP... THis will make a macvlan docker network called imich net taht will use your bond0 vlan 50 fo IP and internet access...

Otherwise you need your docker network precreated...
and use

services:

immich-server:

networks:

immich-net:

ipv4_address: 10.10.50.40

to each docker option


networks:
  bond0.50:
    external: true

please review:
https://forums.unraid.net/topic/188695-docker-network-issue/#findComment-1541042

to learn more about docker networks...

and review:

Docker Documentation
No image preview

Networking

How Docker Compose sets up networking between containers

  • Community Expert

you may be better off running the unraid CA and not compse to set the mutiple docker networks.

https://forums.unraid.net/topic/190531-guide-immich-docker-setup-unraid-ca/

I've found setting immich to a custum macvlan and the database to host is the best way to maintain iner docker comunication and have immich set to a bond0.50 vlan static ip for access.

otherwsie you wil need to edit the dockers and there adational configruation for access.

Here are the goals...

Use bond0.50 external network for immich-server and immich-machine-learning, both with static IPs.

  1. Keep Redis and Postgres on internal bridge network (immich-net). (May not work better to use host) can't gurantee docker netowrk cross talk...

  2. Remove unnecessary IP from immich-server on the internal network, since it will communicate over bond0.50 using its VLAN IP.

Here is an Updated docker-compose.yml

Note the Networks under Immich-server and machine learning.
This assumes you have a custom docker network called bond0.50

This allows immich to be set and use the static ip shared above...

IF doen't exisit... Create the external network bond0.50

docker network create \

-d macvlan \

--subnet=10.10.50.0/24 \

--gateway=10.10.50.1 \

-o parent=bond0.50 \

bond0.50

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - immich-photos:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'   # Optional: only if you want access via Unraid's host IP
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false
    networks:
      bond0.50:
        ipv4_address: 10.10.50.40
    dns:
      - 1.1.1.1
      - 8.8.8.8
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
      net.unraid.docker.webui: http://[IP]:[PORT:2283]
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false
    networks:
      bond0.50:
        ipv4_address: 10.10.50.41
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884
    volumes:
      - redis-data:/data
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
    network_mode: host
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/redis.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.3.0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - postgres-data:/var/lib/postgresql/data
    restart: always
    network_mode: host
    labels:
      net.unraid.docker.icon: 'https://raw.githubusercontent.com/A75G/docker-templates/master/templates/icons/db-backup.png'
      folder.view: immich
      net.unraid.docker.managed: 'composeman'

networks:
  bond0.50:
    external: true   # This network must already exist via Unraid UI or docker CLI
#Not needed any more you will need to use networkmode host and your macvlan/ipvlan docker network...
#  immich-net:
#    driver: bridge
#    ipam:
#      config:
#        - subnet: 172.19.0.0/16
#          gateway: 172.19.0.1

volumes:
  model-cache:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/config
      o: bind

  immich-photos:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/photos
      o: bind

  postgres-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/database/postgres
      o: bind

  redis-data:
    driver: local
    driver_opts:
      type: none
      device: /mnt/user/appdata/immich/database/redis
      o: bind


Using network mode host will place redis and postgress at your unraid IP address and thus accessible via your bond0.50 network for immich to run...

you will need to fix and update the environment variables...

Changes You Need to Make:

  1. Remove the immich-net bridge references from these two services (they're now on network_mode: host).

  2. Update Immich .env file:

    • For Postgres:

      DB_HOST=127.0.0.1

      or use Unraid's LAN IP (e.g., 10.10.50.1). ??? what every your unraid IP is... using local host 127.0.0.1 as a place holder...

    • For Redis:

      REDIS_HOST=127.0.0.1

      This works because immich-server can reach Unraid’s IP and host mode exposes them to the host network.

  3. Keep immich-server and immich-machine-learning on bond0.50 so they have static VLAN IPs for external access.

Edited by bmartino1

  • Community Expert

if all else fails run the immich docker compose with no edits. as that appeared to have worked before.

--Immich requires adaitonal headers for a revers proxy.
https://immich.app/docs/administration/reverse-proxy/

and setup a nginx reverse proxy on the bond0.50

https://www.youtube.com/watch?v=TKeSP8nhwsY

https://www.youtube.com/watch?v=Y7Z-RnM77tA

this way the compose is untouched of edits and works out of the box while still giving you a secure and internet access via the revers proxy...

I'll gladly help where I can.

  • Author

Thanks for all your work here.

I missed to add some maybe relevant information.

  • bond0 is my host vlan

  • bond0.50 is my DMZ vlan where my reverse proxy and other external facing services are in. There I want to place immich in.

  • I use SWAG as my reverse proxy

  • I already tried giving all containers only an IP from the bon0.50 vlan... does not work. Immich runs without errors, but thumbnails get not created.

However, all your posts guided me into the right direction. Thank you very much!!

The final solution was to add the following to my ENV file:

DB_HOST=10.10.50.43
REDIS_HOST=10.10.50.42
IMMICH_HOST=10.10.50.40
# HOST for immich-machine-learning?? #

My compose file now only includes IPs from the external macvlan:

name: immich

services:
	
  immich-server:
    .......
    networks:
      bond0.50:
        ipv4_address: 10.10.50.40
    dns:
      - 1.1.1.1
      - 8.8.8.8
	.......
		
  immich-machine-learning:
    .......
    networks:
      bond0.50:
        ipv4_address: 10.10.50.41
	.......
  
  redis:
    ......
    networks:
      bond0.50:
        ipv4_address: 10.10.50.42
	......
  
  database:
    ......
    networks:
      bond0.50:
        ipv4_address: 10.10.50.43		
	......
			
networks:
  bond0.50:
    external: true

I did not find a Host variable for the immich-machine-learning container. Not sure if this is needed or how I can check if immich can communicate with the service.

But for now it seems to work this way.

Thanks again for all the time you spent on this!

Edited by UnKwicks

  • Author

I found this in the logs now:
WARN [Microservices:MachineLearningRepository] Machine learning request to "http://immich-machine-learning:3003" failed: fetch failed

Seems like I need to set the machine learning host as well.

But regarding the documentation MACHINE_LEARNING_HOST is not available anymore.

And immich_machine_learning service is throwing:

[08/05/25 21:55:45] ERROR    connection to ('10.10.50.40', 3003) failed: [Errno 
                             99] Cannot assign requested address                
[08/05/25 21:55:46] ERROR    Invalid address: ('10.10.50.40', 3003)             
[08/05/25 21:55:46] ERROR    connection to ('10.10.50.40', 3003) failed: [Errno 
                             99] Cannot assign requested address  

Any advice?

Edited by UnKwicks

  • Community Expert
45 minutes ago, UnKwicks said:

I found this in the logs now:
WARN [Microservices:MachineLearningRepository] Machine learning request to "http://immich-machine-learning:3003" failed: fetch failed

Seems like I need to set the machine learning host as well.

But regarding the documentation MACHINE_LEARNING_HOST is not available anymore.

And immich_machine_learning service is throwing:

[08/05/25 21:55:45] ERROR    connection to ('10.10.50.40', 3003) failed: [Errno 
                             99] Cannot assign requested address                
[08/05/25 21:55:46] ERROR    Invalid address: ('10.10.50.40', 3003)             
[08/05/25 21:55:46] ERROR    connection to ('10.10.50.40', 3003) failed: [Errno 
                             99] Cannot assign requested address  

Any advice?


without changing them to host I don't know. as I'm not sure where teh config nor the settign is for the machine leraning docker ... esetnail in your current running system you need to tell the immich server to conect to

immich-machine-learning: ....... networks: bond0.50: ipv4_address: 10.10.50.41

I know a option exist just not sure where it is now: https://github.com/immich-app/immich/discussions/6630

DMZ unless set to another router for port forwards and controls can only do 1 IP address...

https://immich.app/docs/install/environment-variables/

issues is now the DMX bon0.50 has cross talk but is unable to properly talk to the AI system for face recognition.

remote learing shoudl be unraid host, postgress should be host, and redis should be host as this will allow the dockers to cross talk between each other while having immich set to a bond0.50 address.

  • Community Expert

if you can login to immich you will need to login with teh administrator account.

go to settings and machien learnign:

image.png

here you can edit the URL and set that to http://10.10.50.41:3003

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.