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)
typeTYPE β the TYPE can be any service type straight out of/etc/services, but with an underscore glued to the front. e.g.ippis port631/tcp, and that gives you the type_ipp._tcp. slay.portPORT β 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 π)
nameSTRING β a free form string describing the service. usually this is the thing discovery agents show to end users, so make it cute.txtSTRING β 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. πtargetHOST β 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. πcnameHOST β 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
- ubuntu stonking: mdnsd 1.2-1 Β· BSD-3-Clause
- Copyright (c) 2021-2026 Joachim Wiberg <troglobit@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms