COREDNS-ROOT(7)

πŸ“¦
version 1.15.0 Β· 2 versions
, in nixpkgs unstable, opensuse-leap 16.0

✨ NAME ✨

root - simply specifies the root of where to find files. πŸ’… This is the COREDNS-ROOT(7) manual, bestie, and we're gonna make it make sense.


🌸 DESCRIPTION 🌸

Okay so the default root is literally the current working directory of CoreDNS. The root plugin lets you change that. A relative root path is relative to the current working directory.

⚠️ NOTE: The root directory is NOT currently supported by all plugins. Currently the following plugins respect the root plugin configuration:
  • file πŸ“
  • tls πŸ”
  • dnssec πŸ›‘οΈ

This plugin can only be used once per Server Block. periodt πŸ’…


πŸŽ€ SYNTAX πŸŽ€

root PATH

PATH is the directory to set as CoreDNS' root. 🫢


πŸ¦‹ EXAMPLES πŸ¦‹

Serve zone data (when the file plugin is used) from /etc/coredns/zones:

. {
    root /etc/coredns/zones
}

When you use the root and tls plugin together, your cert and key should also be placed in the root directory. The example below will look for /config/cert.pem and /config/key.pem:

tls://example.com:853 {
    root /config
    tls cert.pem key.pem
    whoami
}

πŸ’€ BUGS πŸ’€

Bestie, this is the same important tea as above, but it lives here too:

🚨 NOTE: The root directory is NOT currently supported by all plugins. Currently the following plugins respect the root plugin configuration:
  • file πŸ“
  • tls πŸ”
  • dnssec πŸ›‘οΈ

🫢 cute sign-off: this page is from CoreDNS, dated March 2026, and it's the COREDNS-ROOT(7) manual. bye bestie, go slay those config files πŸ’–βœ¨

πŸ“¦ where this page comes from