{
    "mode": "man",
    "parameter": "systemd.dnssd",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.dnssd/5/json",
    "generated": "2026-05-30T06:06:12Z",
    "synopsis": "networkservice.dnssd",
    "sections": {
        "NAME": {
            "content": "systemd.dnssd - DNS-SD configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "networkservice.dnssd\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "DNS-SD setup is performed by systemd-resolved(8).\n\nThe main network service file must have the extension .dnssd; other extensions are ignored.\n\nThe .dnssd files are read from the files located in the system network directories\n/usr/lib/systemd/dnssd and /usr/local/lib/systemd/dnssd, the volatile runtime network\ndirectory /run/systemd/dnssd and the local administration network directory\n/etc/systemd/dnssd. All configuration files are collectively sorted and processed in lexical\norder, regardless of the directories in which they live. However, files with identical\nfilenames replace each other. Files in /etc/ have the highest priority, files in /run/ take\nprecedence over files with the same name in /lib/. This can be used to override a\nsystem-supplied configuration file with a local file if needed.\n\nAlong with the network service file foo.dnssd, a \"drop-in\" directory foo.dnssd.d/ may exist.\nAll files with the suffix \".conf\" from this directory will be parsed after the file itself is\nparsed. This is useful to alter or add configuration settings, without having to modify the\nmain configuration file. Each drop-in file must have appropriate section headers.\n\nIn addition to /etc/systemd/dnssd, drop-in \".d\" directories can be placed in\n/usr/lib/systemd/dnssd or /run/systemd/dnssd directories. Drop-in files in /etc/ take\nprecedence over those in /run/ which in turn take precedence over those in /usr/lib/ or\n/usr/local/lib. Drop-in files under any of these directories take precedence over the main\nnetwork service file wherever located.\n",
            "subsections": [
                {
                    "name": "[SERVICE] SECTION OPTIONS",
                    "content": "The network service file contains a [Service] section, which specifies a discoverable network\nservice announced in a local network with Multicast DNS broadcasts.\n\nName=\nAn instance name of the network service as defined in the section 4.1.1 of RFC 6763[1],\ne.g.  \"webserver\".\n\nThe option supports simple specifier expansion. The following expansions are understood:\n\nTable 1. Specifiers available\n┌──────────┬───────────────────────────┬───────────────────────────┐\n│Specifier │ Meaning                   │ Details                   │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%a\"      │ Architecture              │ A short string            │\n│          │                           │ identifying the           │\n│          │                           │ architecture of the local │\n│          │                           │ system. A string such as  │\n│          │                           │ x86, x86-64 or arm64. See │\n│          │                           │ the architectures defined │\n│          │                           │ for                       │\n│          │                           │ ConditionArchitecture= in │\n│          │                           │ systemd.unit(5) for a     │\n│          │                           │ full list.                │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%A\"      │ Operating system image    │ The operating system      │\n│          │ version                   │ image version identifier  │\n│          │                           │ of the running system, as │\n│          │                           │ read from the             │\n│          │                           │ IMAGEVERSION= field of   │\n│          │                           │ /etc/os-release. If not   │\n│          │                           │ set, resolves to an empty │\n│          │                           │ string. See os-release(5) │\n│          │                           │ for more information.     │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%b\"      │ Boot ID                   │ The boot ID of the        │\n│          │                           │ running system, formatted │\n│          │                           │ as string. See random(4)  │\n│          │                           │ for more information.     │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%B\"      │ Operating system build ID │ The operating system      │\n│          │                           │ build identifier of the   │\n│          │                           │ running system, as read   │\n│          │                           │ from the BUILDID= field  │\n│          │                           │ of /etc/os-release. If    │\n│          │                           │ not set, resolves to an   │\n│          │                           │ empty string. See os-     │\n│          │                           │ release(5) for more       │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%H\"      │ Host name                 │ The hostname of the       │\n│          │                           │ running system.           │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%m\"      │ Machine ID                │ The machine ID of the     │\n│          │                           │ running system, formatted │\n│          │                           │ as string. See machine-   │\n│          │                           │ id(5) for more            │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%M\"      │ Operating system image    │ The operating system      │\n│          │ identifier                │ image identifier of the   │\n│          │                           │ running system, as read   │\n│          │                           │ from the IMAGEID= field  │\n│          │                           │ of /etc/os-release. If    │\n│          │                           │ not set, resolves to an   │\n│          │                           │ empty string. See os-     │\n│          │                           │ release(5) for more       │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%o\"      │ Operating system ID       │ The operating system      │\n│          │                           │ identifier of the running │\n│          │                           │ system, as read from the  │\n│          │                           │ ID= field of              │\n│          │                           │ /etc/os-release. See os-  │\n│          │                           │ release(5) for more       │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%v\"      │ Kernel release            │ Identical to uname -r     │\n│          │                           │ output.                   │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%w\"      │ Operating system version  │ The operating system      │\n│          │ ID                        │ version identifier of the │\n│          │                           │ running system, as read   │\n│          │                           │ from the VERSIONID=      │\n│          │                           │ field of /etc/os-release. │\n│          │                           │ If not set, resolves to   │\n│          │                           │ an empty string. See os-  │\n│          │                           │ release(5) for more       │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%W\"      │ Operating system variant  │ The operating system      │\n│          │ ID                        │ variant identifier of the │\n│          │                           │ running system, as read   │\n│          │                           │ from the VARIANTID=      │\n│          │                           │ field of /etc/os-release. │\n│          │                           │ If not set, resolves to   │\n│          │                           │ an empty string. See os-  │\n│          │                           │ release(5) for more       │\n│          │                           │ information.              │\n├──────────┼───────────────────────────┼───────────────────────────┤\n│\"%%\"      │ Single percent sign       │ Use \"%%\" in place of \"%\"  │\n│          │                           │ to specify a single       │\n│          │                           │ percent sign.             │\n└──────────┴───────────────────────────┴───────────────────────────┘\n\nType=\nA type of the network service as defined in the section 4.1.2 of RFC 6763[1], e.g.\n\"http.tcp\".\n\nPort=\nAn IP port number of the network service.\n\nPriority=\nA priority number set in SRV resource records corresponding to the network service.\n\nWeight=\nA weight number set in SRV resource records corresponding to the network service.\n\nTxtText=\nA whitespace-separated list of arbitrary key/value pairs conveying additional information\nabout the named service in the corresponding TXT resource record, e.g.\n\"path=/portal/index.html\". Keys and values can contain C-style escape sequences which get\ntranslated upon reading configuration files.\n\nThis option together with TxtData= may be specified more than once, in which case\nmultiple TXT resource records will be created for the service. If the empty string is\nassigned to this option, the list is reset and all prior assignments will have no effect.\n\nTxtData=\nA whitespace-separated list of arbitrary key/value pairs conveying additional information\nabout the named service in the corresponding TXT resource record where values are\nbase64-encoded string representing any binary data, e.g.\n\"data=YW55IGJpbmFyeSBkYXRhCg==\". Keys can contain C-style escape sequences which get\ntranslated upon reading configuration files.\n\nThis option together with TxtText= may be specified more than once, in which case\nmultiple TXT resource records will be created for the service. If the empty string is\nassigned to this option, the list is reset and all prior assignments will have no effect.\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "Example 1. HTTP service",
                    "content": "# /etc/systemd/dnssd/http.dnssd\n[Service]\nName=%H\nType=http.tcp\nPort=80\nTxtText=path=/stats/index.html t=temperaturesensor\n\nThis makes the http server running on the host discoverable in the local network given\nMulticastDNS is enabled on the network interface.\n\nNow the utility \"resolvectl\" should be able to resolve the service to the host's name:\n\n$ resolvectl service meteo.http.tcp.local\nmeteo.http.tcp.local: meteo.local:80 [priority=0, weight=0]\n169.254.208.106%senp0s21f0u2u4\nfe80::213:3bff:fe49:8aa%senp0s21f0u2u4\npath=/stats/index.html\nt=temperaturesensor\n(meteo/http.tcp/local)\n\n-- Information acquired via protocol mDNS/IPv6 in 4.0ms.\n-- Data is authenticated: yes\n\n\"Avahi\" running on a different host in the same local network should see the service as well:\n\n$ avahi-browse -a -r\n+ enp3s0 IPv6 meteo                                         Web Site             local\n+ enp3s0 IPv4 meteo                                         Web Site             local\n= enp3s0 IPv6 meteo                                         Web Site             local\nhostname = [meteo.local]\naddress = [fe80::213:3bff:fe49:8aa]\nport = [80]\ntxt = [\"path=/stats/index.html\" \"t=temperaturesensor\"]\n= enp3s0 IPv4 meteo                                         Web Site             local\nhostname = [meteo.local]\naddress = [169.254.208.106]\nport = [80]\ntxt = [\"path=/stats/index.html\" \"t=temperaturesensor\"]\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "systemd(1), systemd-resolved.service(8), resolvectl(1)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. RFC 6763\nhttps://tools.ietf.org/html/rfc6763\n\n\n\nsystemd 249                                                                         SYSTEMD.DNSSD(5)",
            "subsections": []
        }
    },
    "summary": "systemd.dnssd - DNS-SD configuration",
    "flags": [],
    "examples": [
        "# /etc/systemd/dnssd/http.dnssd",
        "[Service]",
        "Name=%H",
        "Type=http.tcp",
        "Port=80",
        "TxtText=path=/stats/index.html t=temperaturesensor",
        "This makes the http server running on the host discoverable in the local network given",
        "MulticastDNS is enabled on the network interface.",
        "Now the utility \"resolvectl\" should be able to resolve the service to the host's name:",
        "$ resolvectl service meteo.http.tcp.local",
        "meteo.http.tcp.local: meteo.local:80 [priority=0, weight=0]",
        "169.254.208.106%senp0s21f0u2u4",
        "fe80::213:3bff:fe49:8aa%senp0s21f0u2u4",
        "path=/stats/index.html",
        "t=temperaturesensor",
        "(meteo/http.tcp/local)",
        "-- Information acquired via protocol mDNS/IPv6 in 4.0ms.",
        "-- Data is authenticated: yes",
        "\"Avahi\" running on a different host in the same local network should see the service as well:",
        "$ avahi-browse -a -r",
        "+ enp3s0 IPv6 meteo                                         Web Site             local",
        "+ enp3s0 IPv4 meteo                                         Web Site             local",
        "= enp3s0 IPv6 meteo                                         Web Site             local",
        "hostname = [meteo.local]",
        "address = [fe80::213:3bff:fe49:8aa]",
        "port = [80]",
        "txt = [\"path=/stats/index.html\" \"t=temperaturesensor\"]",
        "= enp3s0 IPv4 meteo                                         Web Site             local",
        "hostname = [meteo.local]",
        "address = [169.254.208.106]",
        "port = [80]",
        "txt = [\"path=/stats/index.html\" \"t=temperaturesensor\"]"
    ],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemd-resolved.service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-resolved.service/8/json"
        },
        {
            "name": "resolvectl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/resolvectl/1/json"
        }
    ]
}