MDNSD.SERVICE(5)

πŸ’– MDNSD.SERVICE(5) β€” the mdnsd service config file, bestie edition πŸ’–

okay so real quick, the manual name is mdnsd.service and it lives in section 5, aka "System Manager's Manual" territory. it's giving "let me tell you how to tell the whole network that you EXIST" ✨


πŸŽ€ NAME πŸŽ€

mdnsd.service β€” the config file that tells mdnsd what services to announce 🫢


🌸 SYNOPSIS 🌸

/etc/mdns.d/*.service

✨ DESCRIPTION ✨

so here's the tea: mdnsd needs at least one .service file, otherwise it literally has nothing to announce. it's just standing there. bestie needs a purpose. 😭

the systems mdnsd is targeting usually have an SSH or HTTP/HTTPS service just vibing on them, and end-users can find those with mDNS-SD. like, mdnsd might be embedded in your printer, an access point, an industrial switch, or honestly any other headless network connected device. main character energy for appliances, no cap. πŸ‘‘

services are defined one per .service file, and only two fields are mandatory. only two!! iconic minimalism. πŸ’…

the mandatory ones (the non-negotiables)

  • type TYPE β€” the TYPE can be any service type straight out of /etc/services, but with an underscore glued to the front. e.g. ipp is port 631/tcp, and that gives you the type _ipp._tcp. slay.
  • port PORT β€” the UDP or TCP port you wanna announce. you can also find this in the file /etc/services, iykyk.

the optional ones (the little extras, the accessories of the config world πŸŽ€)

  • name STRING β€” a free form string describing the service. usually this is the thing discovery agents show to end users, so make it cute.
  • txt STRING β€” Text records are free-form strings that get included in service announcements. super useful for announcing meta data about your service. and here's the fun part: a STRING with no = in it gets announced as a value-less boolean key, per RFC 6763. so yes, a bare key is a whole mood. 🌈
  • target HOST β€” the host name to announce as the target of the service's SRV record, aka the host the service actually runs on. it defaults to the daemon's own host name, hostname.local, and that one is shared by all of its services. and per RFC 6763, the service PTR always points to the service instance, never to this host. important!! don't get it twisted. πŸ™ˆ
  • cname HOST β€” announce an alias (CNAME) for the host, e.g. home.local, so the service can also be reached under a short, friendly name. the alias resolves to the same address as the target host. it's the nickname of hosts. πŸ¦‹

🌟 EXAMPLES 🌟

this section has some examples of mDNS service definitions. let's gooo.

SSH

# mDNS-SD advertisement of SSH service
type _ssh._tcp
port 22

FTP

# mDNS-SD advertisement of FTP service
name Troglobit FTP Server
type _ftp._tcp
port 21
txt server=uftpd
txt version=2.6

HTTP

# mDNS-SD advertisement of HTTP service
type _http._tcp
port 80
txt server=merecat
txt version=2.31
cname home.local

Printer

# mDNS-SD advertisement of foo._printer._tcp.local.
type _printer._tcp
port 515

IPP

# mDNS-SD advertisement of foo._ipp._tcp.local.
type _ipp._tcp
port 631

πŸ’œ FILES πŸ’œ

  • /etc/services β€” List of standard service definitions in UNIX

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

This mDNS-SD implementation was initially developed by Jeremie Miller <jer@jabber.org> in 2003. Much later, Joachim Wiberg <troglobit@gmail.com> adopted it for further development and maintenance of mdnsd.service at GitHub: https://github.com/troglobit/mdnsd

these two fr fr carried this whole thing on their backs, we love to see it 🫢

okay and that's a wrap on the Debian Jun 25 2026 build of this page, mwah πŸ’‹ stay discoverable, bestie, and go announce yourself πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from