Netbird Configuration
HEAD'S UP
If you haven't read the primer on name server configuration, you should read that first as this page builds on the information presented there.
What is Netbird?
Netbird is a service which can connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls. It also provides built-in custom DNS resolution.
Fields
api_key string required
Netbird refers to their API key as a Personal Access Token.
To obtain a token from Netbird, follow their tutorial. DockNS requires a token which has Network Admin permissions
Once you have created a token, place it into name_servers.<server id>.api_key in your config.toml, or set the DOCKNS_NS_<SERVER ID>_API_KEY environment variable.
host string optional
The host field is the URL at which to connect to your Netbird instance's API. The default value is https://api.netbird.io
Example:
[name_servers.netbird]
service = "netbird"
host = "http://192.168.1.60:1234"
api_key = "<api_key>"DOCKNS_NS_NETBIRD_SERVICE=netbird
DOCKNS_NS_NETBIRD_HOST=http://192.168.1.60:1234
DOCKNS_NS_NETBIRD_API_KEY=<api_key>zone_ids table required
Netbird requires that DNS API requests include the ID of the zone being modified. Please refer to their API documentation to retrieve your zone ID(s).
The zone_ids field must be a map between zones and their IDs, like so:
[name_servers.externaldns1]
service = "netbird"
# ...
zone_ids = {
"domain.tld" = "<domain.tld's ID>"
"domain2.tld" = "<domain2.tld's ID>"
}DOCKNS_NS_EXTERNALDNS1_SERVICE=netbird
DOCKNS_NS_EXTERNALDNS1_API_KEY=<api token>
DOCKNS_NS_EXTERNALDNS1_ZONE_IDS="domain.tld=<domain.tld's ID>,domain2.tld=<domain2.tld's ID>"When using an environment variable, zone IDs are specified as comma-separated domain=zone_id pairs.