[GH-ISSUE #216] WOLF_INTERNAL_IP is not used for mDNS? #144

Open
opened 2026-10-15 12:57:06 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @shawly on GitHub (Jun 25, 2025).
Original GitHub issue: https://github.com/games-on-whales/wolf/issues/216

Hi again,

I'm using a docker macvlan network to expose certain containers to my home subnet (br0). Before my wolf_default network was mapped to br0.
When I started using wolfmanager I changed the default: network to be internal so that wolfmanager will get its own internal ip in the wolf_default network, as I don't want it to assign to an IP in my home subnet.

The problem now is, that wolf also is in the default network now and not only in the br0 network. So mDNS will report the docker networks ip 172.26.0.3 for wolf instead of 192.168.10.140.
I found in the code that there is an env var for WOLF_INTERNAL_IP, but it seems that the ip isn't used for mDNS.

Here is my compose file:

services:                                                                                                                                                                                                                                                                                                                   
  app:                                                                                                                                                                                                                                                                                                                      
    restart: always                                                                                                                                                                                                                                                                                                         
    environment:                                                                                                                                                                                                                                                                                                            
      TZ: Europe/Berlin                                                                                                                                                                                                                                                                                                     
      XDG_RUNTIME_DIR: /tmp/sockets                                                                                                                                                                                                                                                                                         
      HOST_APPS_STATE_FOLDER: /srv/wolf/data                                                                                                                                                                                                                                                                                
      WOLF_CFG_FILE: /srv/wolf/data/cfg/config.toml                                                                                                                                                                                                                                                                         
      WOLF_CFG_FOLDER: /srv/wolf/data/cfg                                                                                                                                                                                                                                                                                   
      WOLF_PRIVATE_CERT_FILE: /srv/wolf/data/cfg/cert.pem                                                                                                                                                                                                                                                                   
      WOLF_PRIVATE_KEY_FILE: /srv/wolf/data/cfg/key.pem
      WOLF_DOCKER_SOCKET: /var/run/docker.sock
      WOLF_LOG_LEVEL: INFO
      WOLF_SOCKET_PATH: /var/run/wolf/wolf.sock
      WOLF_INTERNAL_IP: 192.168.10.140
    labels:
      com.centurylinklabs.watchtower.enable: true
    volumes:
    - /srv/wolf/data:/srv/wolf/data
    - /tmp/sockets:/tmp/sockets:rw
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /var/run/wolf:/var/run/wolf
    - /dev/:/dev/:rw
    - /run/udev:/run/udev:rw
    image: ghcr.io/games-on-whales/wolf:stable
    container_name: wolf
    device_cgroup_rules:
    - c 13:* rmw
    devices:
    - /dev/dri
    - /dev/uinput
    - /dev/uhid
    networks:
      default:
      br0:
        ipv4_address: 192.168.10.140

  web:
    restart: always
    environment:
      TZ: Europe/Berlin
      NODE_ENV: production
      NEXTAUTH_SECRET: xxx
      ENCRYPTION_KEY: xxx
      NEXTAUTH_URL: https://wolf.example.com
      NEXTAUTH_TRUST_HOST: 'true'
      AUTH_TRUST_HOST: 'true'
    labels:
      traefik.enable: true
      traefik.http.routers.wolf-http.service: wolf
      traefik.http.routers.wolf-http.entrypoints: web
      traefik.http.routers.wolf-http.rule: Host(`wolf.example.com`)
      traefik.http.routers.wolf.service: wolf
      traefik.http.routers.wolf.entrypoints: web-secure
      traefik.http.routers.wolf.middlewares: secHeaders@file
      traefik.http.routers.wolf.rule: Host(`wolf.example.com`)
      traefik.http.routers.wolf.tls: true
      traefik.http.routers.wolf.tls.certresolver: default
      traefik.http.services.wolf.loadbalancer.server.port: 3000
    volumes:
    - /var/run/wolf:/var/run/wolf
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /srv/wolf/webconfig:/app/config
    - /srv/wolf/webdata:/app/data
    image: ghcr.io/games-on-whales/wolfmanager/wolfmanager:latest
    container_name: wolf-manager
    depends_on:
    - app
    networks:
      default:
      traefik_net:

networks:
  default:
  traefik_net:
    external: true
  br0:
    external: true
    name: br0
Originally created by @shawly on GitHub (Jun 25, 2025). Original GitHub issue: https://github.com/games-on-whales/wolf/issues/216 Hi again, I'm using a docker macvlan network to expose certain containers to my home subnet (br0). Before my wolf_default network was mapped to br0. When I started using wolfmanager I changed the default: network to be internal so that wolfmanager will get its own internal ip in the wolf_default network, as I don't want it to assign to an IP in my home subnet. The problem now is, that wolf also is in the default network now and not only in the br0 network. So mDNS will report the docker networks ip 172.26.0.3 for wolf instead of 192.168.10.140. I found in the code that there is an env var for WOLF_INTERNAL_IP, but it seems that the ip isn't used for mDNS. Here is my compose file: ```yaml services: app: restart: always environment: TZ: Europe/Berlin XDG_RUNTIME_DIR: /tmp/sockets HOST_APPS_STATE_FOLDER: /srv/wolf/data WOLF_CFG_FILE: /srv/wolf/data/cfg/config.toml WOLF_CFG_FOLDER: /srv/wolf/data/cfg WOLF_PRIVATE_CERT_FILE: /srv/wolf/data/cfg/cert.pem WOLF_PRIVATE_KEY_FILE: /srv/wolf/data/cfg/key.pem WOLF_DOCKER_SOCKET: /var/run/docker.sock WOLF_LOG_LEVEL: INFO WOLF_SOCKET_PATH: /var/run/wolf/wolf.sock WOLF_INTERNAL_IP: 192.168.10.140 labels: com.centurylinklabs.watchtower.enable: true volumes: - /srv/wolf/data:/srv/wolf/data - /tmp/sockets:/tmp/sockets:rw - /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/wolf:/var/run/wolf - /dev/:/dev/:rw - /run/udev:/run/udev:rw image: ghcr.io/games-on-whales/wolf:stable container_name: wolf device_cgroup_rules: - c 13:* rmw devices: - /dev/dri - /dev/uinput - /dev/uhid networks: default: br0: ipv4_address: 192.168.10.140 web: restart: always environment: TZ: Europe/Berlin NODE_ENV: production NEXTAUTH_SECRET: xxx ENCRYPTION_KEY: xxx NEXTAUTH_URL: https://wolf.example.com NEXTAUTH_TRUST_HOST: 'true' AUTH_TRUST_HOST: 'true' labels: traefik.enable: true traefik.http.routers.wolf-http.service: wolf traefik.http.routers.wolf-http.entrypoints: web traefik.http.routers.wolf-http.rule: Host(`wolf.example.com`) traefik.http.routers.wolf.service: wolf traefik.http.routers.wolf.entrypoints: web-secure traefik.http.routers.wolf.middlewares: secHeaders@file traefik.http.routers.wolf.rule: Host(`wolf.example.com`) traefik.http.routers.wolf.tls: true traefik.http.routers.wolf.tls.certresolver: default traefik.http.services.wolf.loadbalancer.server.port: 3000 volumes: - /var/run/wolf:/var/run/wolf - /var/run/docker.sock:/var/run/docker.sock:ro - /srv/wolf/webconfig:/app/config - /srv/wolf/webdata:/app/data image: ghcr.io/games-on-whales/wolfmanager/wolfmanager:latest container_name: wolf-manager depends_on: - app networks: default: traefik_net: networks: default: traefik_net: external: true br0: external: true name: br0 ```
Author
Owner

@ABeltramo commented on GitHub (Jun 25, 2025):

Yeah, the mdns library doesn't currently support passing a static IP directly, so it'll pick up whatever the "first" is

github.com/games-on-whales/mdns_cpp@0d57ae3db7/src/mdns.cpp (L178-L211)

We could extend it so that we can pass that as a parameter. For now, I guess you'll have to manually insert the IP in the Moonlight clients, that should always work, right?

<!-- gh-comment-id:3005903805 --> @ABeltramo commented on GitHub (Jun 25, 2025): Yeah, the mdns library doesn't currently support passing a static IP directly, so it'll pick up whatever the "first" is https://github.com/games-on-whales/mdns_cpp/blob/0d57ae3db73d94ab2e7ac0a799a9165c8a221c80/src/mdns.cpp#L178-L211 We could extend it so that we can pass that as a parameter. For now, I guess you'll have to manually insert the IP in the Moonlight clients, that should always work, right?
Author
Owner

@shawly commented on GitHub (Jun 26, 2025):

Yep adding the IP/hostname works fine, it's just mDNS discovery that breaks.

<!-- gh-comment-id:3007072750 --> @shawly commented on GitHub (Jun 26, 2025): Yep adding the IP/hostname works fine, it's just mDNS discovery that breaks.
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
games-on-whales/wolf#144
No description provided.