Getting Started

PowerDNS Recursor can be installed on any modern unix-like system and is available in the software repositories for all major Linux distributions and BSDs.


Recursor is available for many platforms, instructions are provided here for several platforms.


As distribution provided package repositories are not always up-to-date, PowerDNS itself provides repositories for several Recursor versions for different operating systems. Checkout the repositories for more information.

Debian-based distributions

On Debian, Ubuntu, Linux Mint and related distributions, running apt-get install pdns-recursor as root will install Recursor.

Enterprise Linux

On Red Hat, CentOS and related distributions, ensure that EPEL is available. To install Recursor, run yum install pdns-recursor as root.


On FreeBSD Recursor is available through the FreeBSD ports system. Run pkg install powerdns-recursor as root to install.

To compile yourself from ports, run cd /usr/ports/dns/powerdns-recursor/ && make install clean.


On OpenBSD, Recursor is available through the OpenBSD ports system. Run pkg_add powerdns-recursor as root to install.


On macOS Recursor is available through brew. Run brew install pdnsrec to install.

Compiling From Source

See Compiling PowerDNS Recursor for instructions on how to build Recursor from source.

Configuring PowerDNS Recursor

The configuration file is called recursor.conf and is located in the SYSCONFDIR defined at compile-time. This is usually /etc/powerdns, /etc/pdns, /etc/pdns-recursor, /usr/local/etc or similar.

Run pdns_recursor --config=default | grep config-dir to find this location on your installation. Many packages provide a default configuration file that sets include-dir. Consider putting local .conf files into this directory, to make it clear which settings were locally modified.

Recursor listens on the local loopback interface by default, this can be changed with the local-address setting.

Now access will need to be granted to the Recursor. The allow-from setting lists the subnets that can communicate with Recursor.

An example configuration is shown below. Change this to match the local infrastructure.

local-address=, 2001:DB8::1:25
allow-from=, 2001:DB8::1:/64

After a restart of Recursor, it will answer queries on and 2001:DB8::1:25, but only for queries with a source address in the and 2001:DB8::1:/64 networks.

Recursor is now ready to be used. For more options that can be set in recursor.conf see the PowerDNS Recursor Settings. Guidance on interaction with Recursor is documented in Operating PowerDNS Recursor. If dynamic answer generation is needed or policies need to be applied to queries, the Scripting PowerDNS Recursor will come in handy.

Using Ansible

PowerDNS Recursor can also be installed and configured with Ansible. There is a role available from the PowerDNS authors.