homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 240 forks source link

network mode #471

Closed no-Legend closed 1 year ago

no-Legend commented 1 year ago

Current Situation

Hi I‘m running your docker container with homebridge I just moved my Fhem setup from a small Intel nuc to my docker server where also the homebridge is runn8ng. But there was a problem, that the home bridge was not able to connect to the Fhem instance. then I decided to run the homebridge also with a macvlan like Fhem and with an internal connection net for all Fhem belongs. no I’m not able to connect the homebridge to the home app anymore.

Here I want to know if the net host is always necessary or an other config like mine should also work.

Docker Config

version: '3'

services:
  homebridge:
    image: oznu/homebridge:ubuntu
    container_name: "homebridge"
    hostname: homebridge
    restart: always
    deploy:
      resources:
       limits:
          memory: 2048M
    networks:
      macvlan_bond0:
           ipv4_address: 192.168.1.6
      fhem-prod-net:
           ipv4_address: 172.18.0.4          
#    network_mode: host
    environment:
      - PGID=1007
      - PUID=1016
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8581
      - TZ=Europe/Berlin
    volumes:
      - /var/lib/docker/volumes/homebridge/_data:/homebridge

networks:
  macvlan_bond0:
    external:
      name: macvlan_bond0
  fhem-prod-net:
         name: fhem-prod-net

Logs

Can’t find any logs where the connection/home adding is shown.

Host Operating System

Ubuntu / Debian (or a variant)

Host Architecture

x86_64 / amd64

oznu commented 1 year ago

macvlan may work as well. It's not as straight forward to setup or explain in the wiki, so it's not "officially supported" even though it might work 😄