version: "3.8" services: homebridge: container_name: homebridge image: homebridge/homebridge:ubuntu restart: always network_mode: host hostname: homebridge environment: HOMEBRIDGE_CONFIG_UI_PORT: "8581" TZ: America/New_York # Add if not already set in your env ENABLE_AVAHI: "1" HOMEBRIDGE_APT_PACKAGE: "1" UIX_CUSTOM_PLUGIN_PATH: "/var/lib/homebridge/node_modules" # Keep any other custom env you had expose: - "8581/tcp" volumes: - "homebridge_homebridge:/homebridge" working_dir: "/homebridge" entrypoint: ["/init"] logging: driver: json-file volumes: homebridge_homebridge: external: true