MDNSD(8)

✨ mdnsd β€” the little multicast DNS daemon that could πŸ’–

okay bestie, sit down, hydrate, because we're talking about mdnsd β€” a small multicast DNS daemon, and she's honestly doing the most for a program that fits in your pocket. 🫢


🌸 SYNOPSIS

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

that's it. that's the whole vibe check. πŸ‘‘


πŸ’« DESCRIPTION

so mdnsd is a small mDNS-SD daemon for UNIX like systems, and no cap she has history β€” she's based on an original implementation made by Jeremie Miller back in 2003. vintage. iconic. still serving. πŸŽ€

multicast DNS is an open standard, defined in RFC6762, and the service discovery part (-SD) lives in RFC6763. you probably know it by its government name, Bonjour or Avahi, depending on which operating system you're on. iykyk. πŸ¦‹

she reads the service definitions of the services she's gonna announce from:

/etc/mdns.d/*.service

...but you can hand her a different path on the command line, and that path can be either a directory or a single service file. flexible fr fr. ✨

by default mdnsd runs on all multicast capable interfaces on the system, over both IPv4 and IPv6. wanna keep her on just one? that's what -i IFACE is for. πŸ’…

here's the thing though, and this part is important so i'm putting it in a box:

mdnsd advertises and answers for the local host and its services β€” she does not make the system resolver mDNS-aware.

so if you want to actually resolve .local names on the host, you need to install libnss-mdns and add it to nsswitch.conf(5). do it. it's giving "necessary step", not "optional step". 😭


πŸ”₯ OPTIONS

this program follows the usual UNIX command line syntax. the options are as follows, bestie, and i'm listing every single one because we don't skip:

  • -g GROUP β€” the group to drop privileges to after start. πŸ‘‘ see -u for the details, they're linked.
  • -H NAME β€” the hostname to advertise. default is just the system hostname, which is honestly fine but you can flex. πŸ’–
  • -h β€” print a help message and dip. so simple, so underrated.
  • -i IFACE β€” the interface to announce services on. by default mdnsd runs on all interfaces, so this is your "no, just this one" button. 🎯
    • only available on Linux. sorry to the BSD girlies, that's just how it is. 🫢
  • -l LEVEL β€” set the log level. your choices are: none, err, notice (this is the default), info, debug. πŸ“
  • -n β€” run in the foreground, do not detach from the controlling terminal. for when you wanna watch her work. πŸ‘€
  • -p FILE β€” path to the pid file. default: /run/mdnsd.pid. when you're dropping privileges, point this at a directory the target user can actually write to, so the file can be updated on SIGHUP and removed at exit. trust. πŸ™ˆ
  • -s β€” use syslog even if you're running in the foreground. she logs either way, she just changes venues. πŸ’…
  • -t TTL β€” set the TTL of the mDNS packets. default: 1, which is link-local only. 🌈
  • -u USER β€” the user to drop privileges to after start. must be started as root.
    • okay so here's the tea: mdnsd needs no special privileges to answer over mDNS, so you can absolutely start her directly as a non-root user. the only privileged operation is the -i IFACE filter, which uses SO_BINDTODEVICE and therefore 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 β€” she just listens on all interfaces and logs a warning. she's not mad, she's just disappointed. 😭
  • -v β€” show the program version, along with the project homepage and the address for bug reports. know who you're talking to. πŸ‘‘βœ¨

πŸŽ€ FILES

  • /etc/mdns.d/*.service β€” mDNS-SD services to announce. this is where the good stuff lives. πŸ’–
  • /run/mdnsd.pid β€” process ID of the running daemon, see -p. (hi -p, we see you.) πŸ¦‹

🌈 SEE ALSO

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

go read them. expanding your mind is free and it's a slay. πŸ’œ


🫢 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⟩. ✨

give them their flowers. they earned them. πŸ’


okay that's the whole page, bestie β€” this was the Debian build of MDNSD(8) from the System Manager's Manual, dated Jul 24 2026. you're now officially mDNS-pilled. go announce some services. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from