December 19, 2025Dec 19 I am an absolute idiot when it comes to compose files, this is my first try at one.I am trying to run Immich (which I have working via this guide), but I want to set it to run on a separate IP instead of the bridged IP with my unRAID server.My unRAID server is 192.168.10.40, and by default Immich runs at 192.168.10.40:2283. I want to edit the compose file to run the Immich server (or stack?) via br0 on a different network. All my dockers that I allow external access to are on a different VLAN, so I would like Immich do exist on that VLAN as well. How do I modify my compose file to do this?name: immichservices:immich-server:container_name: immich_serverimage: 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 transcodingvolumes:# 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- ${PHONE_PHOTOS}:/home/user/PhonePhotos:roenv_file:- .envports:- '2283:2283'depends_on:- redis- databaserestart: alwayshealthcheck:disable: falseimmich-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}-cudaimage: 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 applicablevolumes:- model-cache:/cacheenv_file:- .envrestart: alwayshealthcheck:disable: falseredis:container_name: immich_redisimage: docker.io/valkey/valkey:8@sha256:81db6d39e1bba3b3ff32bd3a1b19a6d69690f94a3954ec131277b9a26b95b3aahealthcheck:test: redis-cli ping || exit 1restart: alwaysdatabase:container_name: immich_postgresimage: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23environment: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/datashm_size: 128mbrestart: alwaysvolumes:model-cache: Edited December 19, 2025Dec 19 by ati
January 7Jan 7 you have to declare networks in your compose fileIn the example below i use 2 networks for the immich servereth0.30 is macvlan network in my dmz vlanimmich is a bridge network only immich server is in the eth0.30 network. All the other containers are in immich network.you also have to declare the type of network at the end of the file at the same level as services.In my case networks are created outside of the compose file hence the external: true statement. But you can't manage them inside the file. I advise you to read docker networking docs. 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: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - ${EXTERNAL_PATH}:/usr/src/app/external # env_file: # - .env ports: - 192.168.30.10:2283:2283 # expose: # - "2283" depends_on: - redis - database restart: always healthcheck: disable: false networks: eth0.30: ipv4_address: 192.168.30.10 immich: networks: eth0.30: external: true name: eth0.30 immich: external: true
January 17Jan 17 Author I am still running into issues. I am trying, to start, to just run the Immich server on my main VLAN which is br0 and leave all the other Immich containers on their default network.So I have this in my otherwise default from Immich compose file. (from here: https://github.com/immich-app/immich/releases/tag/v2.4.1)name: immich services: immich-server: ... ports: - 192.168.10.137:2283:2283 ... networks: br0: ipv4_address: 192.168.10.137However, when I do this, the sever will not start. Presumably there is a missing link between my br0 network and the default Immich compose network? How do I set the main server to have 2 interfaces? The network the other containers use is 'immich_default', but I see no reference to that in the compose file, so how do I add that as a network for the immich_server docker? Whenever I do try and add it, it says it is not defined in the compose messages when starting the stack.
January 17Jan 17 Author Well I got it to work once making a custom internal network, now I get this error after I try to start the stack again:Error response from daemon: driver failed programming external connectivity on endpoint immich_server (04565a5b1f19222fe7a7245130294e2f27b8b6fe6c51dc81b6fd7bbc36b00da0): Error starting userland proxy: listen tcp4 192.168.10.137:2283: bind: cannot assign requested address Edited January 17Jan 17 by ati
January 18Jan 18 Author Well this ended up breaker my entire docker image and freezing my server. I believe it is a result of some type of network conflict. Similar to here: https://forums.unraid.net/topic/181342-docker-engine-freeze-locks-up-unraid/Not really sure how to do this correctly now...
January 19Jan 19 Community Expert your compose has this: ports: - 192.168.30.10:2283:2283but ports section should only have ports: ports: - 2283:2283I don't think ports are required when setting static IPs, but will be ignored and can be a useful reference.
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.