Built-in Webserver and HTTP API

The PowerDNS Authoritative Server features a built-in built-in webserver that exposes a JSON/REST API. This API allows for controlling several functions and reading statistics.


To launch the internal webserver, add a webserver to the configuration file. This will instruct PowerDNS to start a webserver on localhost at port 8081, without password protection. By default the webserver listens on localhost, meaning only local users (on the same host) will be able to access the webserver. Since the default ACL before 4.1.0 allows access from everywhere if webserver-address is set to a different value, we strongly advise the use of a password protection. The webserver lists a lot of potentially sensitive information about the PowerDNS process, including frequent queries, frequently failing queries, lists of remote hosts sending queries, hosts sending corrupt queries etc. The webserver does not allow remote management of the daemon, but allows control over the size of the queries and response rings that may be used to monitor activities. The following webserver related configuration items are available:

  • webserver: If set to anything but ‘no’, a webserver is launched.
  • webserver-address: Address to bind the webserver to. Defaults to, which implies that only the local computer is able to connect to the nameserver! To allow remote hosts to connect, change to or the physical IP address of your nameserver.
  • webserver-password: If set, viewers will have to enter this plaintext password in order to gain access to the statistics.
  • webserver-port: Port to bind the webserver to.
  • webserver-allow-from: Netmasks that are allowed to connect to the webserver

Enabling the API

To enable the API, the webserver and the HTTP API need to be enbaled. Add these lines to the pdns.conf:


And restart, the following examples should start working:

curl -v -H 'X-API-Key: changeme' | jq .
curl -v -H 'X-API-Key: changeme' | jq .

JSON Objects

The following documents describe the JSON objects available in the API: