Zeroconf API

class mopidy.zeroconf.Zeroconf(name, port, stype=None, domain=None, text=None)[source]

Publish a network service with Zeroconf.

Currently, this only works on Linux using Avahi via D-Bus.

  • name (str) – human readable name of the service, e.g. ‘MPD on neptune’
  • port (int) – TCP port of the service, e.g. 6600
  • stype (str) – service type, e.g. ‘_mpd._tcp’
  • domain (str) – local network domain name, defaults to ‘’
  • host (str) – interface to advertise the service on, defaults to all interfaces
  • text (list of str) – extra information depending on stype, defaults to empty list

Publish the service.

Call when your service starts.


Unpublish the service.

Call when your service shuts down.