Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
mDNS Options
Homebridge uses mDNS-based service discovery in order for your accessory to be discovered by your Apple devices (seeA beginner’s guide to mDNS and DNS-SD for a more detailed explanation).
Homebridge provides a range of mDNS Advertisers it can interface with to advertise itself on the local network.
Bonjour-HAP is the default and legacy advertiser. It is not as efficient in terms of system resource usage and network traffic when compared to the other options.
Ciao is aRFC 6763 compliantdns-sd and advertising on multicast dns (RFC 6762) library developed by Homebridge.It is entirely written in TypeScript, and therefore tries to be platform-independent.
For non-Linux users,ciao should provide the best experience. It fixes a lot of the deficiencies of thebonjour-hap advertiser. However, you might experience issues in the following two scenarios.
Whilebonjour-hap only advertises on the primary network interface,ciao tries to be aware of multiple network interfaces. On startup, it tries to evaluate which network interfaces to advertise on by default.
In certain circumstances,ciao is unable to properly determine the set of valid network interfaces (e.g., when dealing with virtual network interfaces on containerised environments).In those cases, it might be helpful to manually define the set of network interfaces (seebelow). Otherwise, fall back to thebonjour-hap advertiser.
On some systems, there is already a mDNS advertiser stack running (e.g. avahi on linux).There might be issues running multiple mDNS advertisers on the same host (seeNotice on native mDNS responders).
Avahi is a mDNS advertiser that is installed by default on many linux distributions.As of Homebridge 1.4.0, Homebridge can be configured to advertise itself by interfacing with avahi via its dBus interface.
For Linux users,Avahi should provide the best experience.Note that your system must have theavahi-daemon anddbus services installed and running for this option to work.
For using the host'savahi-daemon from Docker, mount/var/run/dbus:/var/run/dbus and/var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket as volumes so the container has a path to communicate with theavahi-daemon. Unless you've disabled AppArmor on your Linux distro, or it's disabled by default, you'll also need to set asecurity_opt setting ofapparmor:unconfined, otherwise AppArmor will block the container's attempt to talk to Avahi viadbus. Here's a sample snippet of what this all looks like in adocker-compose.yml:
security_opt: - apparmor:unconfined volumes: - /var/run/dbus:/var/run/dbus - /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket - ...As of Homebridge 1.6.0, Linux users can choose theresolved advertiser, which uses systemd-resolved via D-Bus. If your system already uses systemd-resolved for mDNS support, this will likely provide the best experience. You can check this by runningresolvectl mdns; if the first line isGlobal: yes, you should use this advertiser.
Using theresolved advertiser has the following prerequisites:
- Having
systemd-resolvedanddbusservices installed and running. - Having
MulticastDNSconfigured and enabled (seehttps://linuxreviews.org/Systemd-resolved). - Having configured the respective permissions to allow Homebridge to access
systemd-resolved(see below).
Setting up theresolved advertiser is only advised for more experienced users.
The user that runs Homebridge must have permission to register and unregister DNS-SD services withsystemd-resolved. If you installed Homebridge using the officialapt package, this should be handled for you automatically. Otherwise, you'll need to do this manually. First, runpkcheck --version to see what version of Polkit you're running.
If the version is 0.105 or below, create a file in/etc/polkit-1/localauthority/30-site.d namedhomebridge.pkla with the following contents:
[Homebridge ManageService]Identity=unix-user:homebridgeAction=org.freedesktop.resolve1.register-service;org.freedesktop.resolve1.unregister-serviceResultAny=yesIf you run Homebridge as a different user thanhomebridge, you'll need to adjust theIdentity line accordingly.
If the version is 0.106 or higher, create a file in/etc/polkit-1/rules.d namedhomebridge.rules with the following contents:
polkit.addRule(function(action, subject) { if ((action.id == "org.freedesktop.resolve1.register-service" || action.id == "org.freedesktop.resolve1.unregister-service") && subject.user == "homebridge") { return polkit.Result.YES; }});If you run Homebridge as a different user thanhomebridge, you'll need to adjust the condition accordingly.
You can set the mDNS Advertiser from the settings section in the Homebridge UI:

Alternatively, you can manually add this to theconfig.json:
{"bridge":{// ..."advertiser":"ciao"// accepts "ciao" or "bonjour-hap" or "avahi" or "resolved"}}
If your Homebridge host has multiple network interfaces, it may be necessary to restrict, or manually choose, which interfaces are advertised by the mDNS services. This option affects both the addresses advertised via mDNS SD and the interface the HAP server TCP socket is bound to.
Note that this configuration only has an effect on the advertised addresses when using thebonjour-hap orciao advertiser.A more detailed explanation can be found in thetechnical documentation.
You can select the network interfaces Homebridge should advertise / listen from the "Homebridge Settings" section of the Homebridge UI:

Alternatively, you can manually add this to theconfig.json:
{"bridge":{// ..."bind":["eth0"]// accepts an array of network interface names or IP addresses}}
- Raspberry Pi
- Debian, Ubuntu
- CentOS, Fedora, Red Hat
- Arch, Manjaro
- Docker
- Virtual Machine ( Windows and MacOS)
- macOS
- Synology DSM 7
- Other Platforms
- Basic Troubleshooting
- Backup and Restore
- Child Bridges
- Config File
- Connect To HomeKit
- FFmpeg for Homebridge
- HomeKit Glossary of Terms
- iOS Homemanager App
- mDNS Options
- Remote Access
- Useful Links
- Basic Troubleshooting
- Config Options
- Enabling Accessory Control
- Enabling UI with Docker
- Homebridge Service Command
- Manual Configuration
- Reverse Proxy: Apache
- Reverse Proxy: Nginx and SSL
- Standalone Mode
- Swap From Standalone To Service Mode
- Developer Docs
- API Reference
- Plugin Templates
- Other Links (Internal)
- Other Links (External)