Scroll to navigation

MDNSD(8) System Manager's Manual (smm) MDNSD(8)

NAME

mdnsd — small multicast DNS daemon

SYNOPSIS

mdnsd [-hnsv] [-g GROUP] [-H NAME] [-i IFACE] [-l LEVEL] [-p FILE] [-t TTL] [-u USER] [PATH]

DESCRIPTION

mdnsd is a small mDNS-SD daemon for UNIX like systems. It is based on an original implementation made by Jeremie Miller in 2003. Multicast DNS is an open standard defined in RFC6762, with service discovery (-SD) in RFC6763, commonly known to end-users as Bonjour or Avahi, depending on the operating system.

mdnsd reads service definitions of services to announce from /etc/mdns.d/*.service, a different path may be given on the command line, which can be a directory or a single service file.

mdnsd by default runs on all multicast capable interfaces on a system, over both IPv4 and IPv6. Use -i IFACE to only run on a single interface.

mdnsd advertises and answers for the local host and its services; it does not make the system resolver mDNS-aware. To resolve .local names on the host, install libnss-mdns and add it to nsswitch.conf(5).

OPTIONS

This program follows the usual UNIX command line syntax. The options are as follows:

GROUP
Group to drop privileges to after start. See -u for details.
NAME
Hostname to advertise, default: the system hostname.
Print a help message and exit.
IFACE
Interface to announce services on. By default mdnsd runs on all interfaces.

Only available on Linux.

LEVEL
Set log level: none, err, notice (default), info, debug.
Run in foreground, do not detach from controlling terminal.
FILE
Path to the pid file, default: /run/mdnsd.pid. When dropping privileges, point this at a directory the target user may write to, so the file can be updated on SIGHUP and removed at exit.
Use syslog even if running in foreground.
TTL
Set TTL of mDNS packets, default: 1 (link-local only).
USER
User to drop privileges to after start. Must be started as root.

mdnsd needs no special privileges to answer over mDNS, so it can also be started directly as a non-root user. The only privileged operation is the -i IFACE filter, which uses SO_BINDTODEVICE and thus needs the CAP_NET_RAW capability; grant it out-of-band, e.g. with AmbientCapabilities=CAP_NET_RAW in the systemd unit. Without it the daemon still runs, but listens on all interfaces and logs a warning.

Show program version, along with the project homepage and the address for bug reports.

FILES

/etc/mdns.d/*.service
mDNS-SD services to announce.
/run/mdnsd.pid
Process ID of the running daemon, see -p.

SEE ALSO

mquery(1), mdnsd.service(5), mdns-scan(1), nsswitch.conf(5)

AUTHORS

This mDNS-SD implementation was created in 2003 by Jeremie Miller ⟨jer@jabber.org⟩. Much later, in 2016, it was adopted by
Joachim Wiberg ⟨troglobit@gmail.com⟩ for further development and maintenance at GitHub: ⟨https://github.com/troglobit/mdnsd⟩.

Jul 24 2026 Nixpkgs