Skip to content

Commit d106d04

Browse files
committed
Update README to include background on zeroconf modes
1 parent 9f29965 commit d106d04

1 file changed

Lines changed: 30 additions & 6 deletions

File tree

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,40 @@ The default directory for configuration files is `~/.config/go-librespot`. On ma
7070

7171
The full configuration schema is available [here](/config_schema.json), only the main options are detailed below.
7272

73-
### Zeroconf mode
73+
### Zeroconf Mode and mDNS Backend Selection
7474

75-
This is the default mode. It uses mDNS auto discovery to allow Spotify clients inside the same network to connect to
76-
go-librespot. This is also known as Spotify Connect.
75+
Zeroconf mode enables mDNS auto discovery, allowing Spotify clients inside the same network to connect to go-librespot. This is also known as Spotify Connect.
7776

78-
An example configuration (not required) looks like this:
77+
**Backend selection:**
78+
go-librespot supports two different backends for mDNS service registration:
79+
80+
- **builtin**: (default) Uses the built-in mDNS responder provided by go-librespot itself.
81+
- **avahi**: Uses the system's avahi-daemon (via D-Bus) for mDNS service registration.
82+
83+
You can configure which backend to use via the `zeroconf_backend` setting in your configuration file:
84+
85+
```yaml
86+
zeroconf_backend: avahi # Options: "builtin" (default), "avahi"
87+
```
88+
89+
Or via the command line:
90+
91+
```shell
92+
go-librespot -c zeroconf_backend=avahi
93+
```
94+
95+
#### Which backend should I use?
96+
97+
- Use **avahi** if you want to integrate with an existing Avahi daemon, e.g. on embedded systems, to avoid port conflicts, or to centralize mDNS advertisements with system service management (e.g., using `systemd`).
98+
- Compatible with Avahi 0.6.x and later (tested with 0.7 and 0.8).
99+
- Use **builtin** if you do **not** have Avahi running and want go-librespot to manage its own mDNS advertisements (no extra dependencies required).
100+
101+
#### Example minimal Zeroconf configuration
79102

80103
```yaml
81-
zeroconf_enabled: false # Whether to keep the device discoverable at all times, even if authenticated via other means
82-
zeroconf_port: 0 # The port to use for Zeroconf, 0 for random
104+
zeroconf_enabled: true # Whether to keep the device discoverable at all times, even if authenticated via other means
105+
zeroconf_port: 0 # The port to use for Zeroconf, 0 for random
106+
zeroconf_backend: avahi
83107
credentials:
84108
type: zeroconf
85109
zeroconf:

0 commit comments

Comments
 (0)