AI AdminPanel Documentation

PowerDNS

Use PowerDNS when your domain is served by your own PowerDNS Authoritative server, or by a hoster that gives you its PowerDNS API. The panel then writes DNS records there itself:

  • one CNAME per service address, pointing at the panel, when a service is deployed, and removed again when the service is removed;
  • the _acme-challenge TXT records for DNS-01 certificates, through the DNS-01 bridge.

The panel talks to the PowerDNS HTTP API. It works with PowerDNS Authoritative 4.x and 5.x.

Before you start

The PowerDNS API must be on, and the panel server must be allowed to reach it. In pdns.conf on the PowerDNS server:

api=yes
api-key=<a long random value>
webserver=yes
webserver-address=0.0.0.0
webserver-port=8081
webserver-allow-from=<the panel server's IP address>/32

Restart PowerDNS after the change. The domain you use for services (for example example.com) must already exist as a zone on that server.

The API key is one key for the whole server: whoever has it can change every zone on that PowerDNS server. PowerDNS has no key limited to one zone. So:

  • allow only the panel server in webserver-allow-from, and keep port 8081 closed to the internet in your firewall;
  • use https (for example a reverse proxy in front of port 8081), or reach the API over a private network or VPN.

Set it up in the panel

Open Settings → Connectivity → DNS & Domains and choose PowerDNS as the DNS provider.

FieldWhat to enter
PowerDNS API URLThe API's address, for example https://dns.example.com:8081. Only http:// and https:// are accepted. You can leave /api/v1 off; the panel adds it.
API keyThe api-key value from pdns.conf. The panel stores it encrypted and never shows it again. Leave the field empty to keep the stored key.
Server IDAlmost always localhost. Change it only if your PowerDNS setup uses another server ID.
Zone (optional)The zone the panel writes to, for example example.com. Leave it empty and the panel picks, for each record, the most specific zone on the server that holds it. With a zone set, the panel refuses to write anything outside it.
Panel Service DomainThe base domain for deployed services, as with Cloudflare: each service gets a subdomain such as myapp.apps.example.com.

Click Save, then Test Connection. It runs the same named DNS checks as for Cloudflare, titled in API-key terms (for example API key works), with these PowerDNS rules:

  • credential_valid: the key is accepted and the server holds at least one zone;
  • zone_found: the zone you entered is on the server. With no zone entered, a zone on the server holds the Panel Service Domain;
  • token_scope: Not checked. A PowerDNS API key always reaches every zone on its server, so it cannot be limited to one zone; keep the API behind a firewall;
  • challenge_cleanup lists the _acme-challenge TXT records in your PowerDNS zones.

The DNS lookups (panel_domain_resolves, wildcard_resolves, caa_allows_letsencrypt) and dns01_bridge work as for Cloudflare.

A warning about plain http. If the URL starts with http:// and points at a server outside your network, the form shows a warning after you save: the API key would travel unencrypted. The setting is saved anyway, because a hoster may tunnel the connection. Local addresses (localhost, private addresses such as 10.x or 192.168.x, and container names such as http://pdns:8081) do not get the warning.

Switching between Cloudflare and PowerDNS keeps the other provider's saved settings, so you can switch back. Saved settings apply to the next deploy without a panel restart.

What the panel changes in your zone

PowerDNS stores all records with the same name and type together. The panel changes only the one value it owns:

  • Adding a record keeps the values already there (for example a TXT record you set by hand), along with their TTL and comments. A new record gets a TTL of 300 seconds, a new challenge TXT record 60 seconds.
  • A CNAME that already points somewhere else is not overwritten. The deploy log shows a DNS warning, and the service still works through its address once DNS points at the panel.
  • Removing a record takes away only its value; the record goes away when no value is left. Removing something that is already gone is fine.

The panel does not raise the zone's SOA serial itself. If secondary servers copy your zone, set the zone's SOA-EDIT-API metadata (for example DEFAULT) so PowerDNS raises it on every API change.

Certificates (DNS-01)

With the DNS-01 bridge on (new installations with TLS_MODE=letsencrypt-dns, or an installation that switched over), Traefik asks the panel for each challenge and the panel writes the TXT record to PowerDNS. Traefik needs no PowerDNS key of its own.

Two limits to know:

  • On a PowerDNS installation, install with TLS_MODE=letsencrypt-dns and leave CF_DNS_API_TOKEN empty, then save PowerDNS in Settings. Until then the panel cannot answer challenges, and Traefik retries. (TLS_MODE=cloudflare, the old name, still works.)
  • The panel has to be running when a certificate is issued or renewed. Traefik renews 30 days early, so a short outage does not cost a certificate.

Troubleshooting

The credential_valid check names the reason in brackets, for example "The PowerDNS API did not answer as expected at the saved URL (server "…" not found at this URL)".

Test Connection saysWhat to do
PowerDNS refused the saved API keyThe key does not match api-key in pdns.conf. Paste it again and save.
server "…" not found at this URLThe server ID is wrong, or the URL points at something other than the PowerDNS API. Use localhost unless your setup says otherwise.
could not reach the server or did not answer in timeCheck the URL and port, webserver-allow-from, and the firewall between the panel and PowerDNS. Each request gives up after 15 seconds.
the server answered with a redirectEnter the API's final address. The panel does not follow redirects, so the key never goes to another host.
the PowerDNS server holds no zonesCreate the zone on the PowerDNS server first.
The zone … is not on the PowerDNS serverCorrect the zone name, or leave the field empty.