Skip to content

When a DNSONLY server makes sense in front of cPanel

A DNSONLY server is a stripped-down cPanel that serves DNS only. Here is when it is worth running one, and when the cluster on existing hosts is enough.

A two-cPanel-host setup runs two nameservers, one on each host. When either host goes down, half the queries fail. Adding a third nameserver requires either a third cPanel host (expensive) or something lighter that serves DNS only. cPanel’s answer is DNSONLY — a free, stripped-down build of cPanel that runs named and the clustering daemon, nothing else.

What’s happening

DNSONLY is cPanel without Apache, Exim, MySQL, FTP, the file manager, or any of the customer-facing surfaces. It runs:

  • named (BIND, the same as on a full cPanel host)
  • dnsadmin (the clustering daemon)
  • WHM, but only the DNS-related panels
  • cpsrvd for the API

It’s installed with a different setup script (installer.cpanel.net/cpanel-dnsonly) and licensed separately — DNSONLY licenses are free from cPanel when you have at least one paid cPanel license. The DNSONLY host joins the DNS cluster just like a full cPanel slave, but with a much smaller resource footprint (256 MB to 1 GB RAM is typical), no patch cadence for unused services, and a smaller attack surface.

Use cases where DNSONLY is clearly the right answer:

  • You need a third or fourth nameserver for redundancy without a full cPanel license.
  • The new nameserver lives in a different region (different data centre, different cloud provider) and the cost of a full cPanel host there isn’t justified.
  • You want to expose DNS publicly on an instance that has none of the web or mail attack surface — easier compliance posture.

Cases where it’s not worth it:

  • You only have one cPanel host. A second nameserver for redundancy can live on a different host but the second cPanel license might be cheaper than the operational overhead.
  • The added latency to a far-away DNSONLY host outweighs the redundancy benefit. Anycast nameservers do this better.

How to verify

If you’re evaluating whether to add a DNSONLY peer, look at the existing nameserver load:

rndc stats
cat /var/named/data/named_stats.txt | tail -50
sar -n DEV 1 5 | grep eth0

If a single nameserver is under low load (under 1000 queries per second sustained), adding a second host for redundancy makes sense. If load is much higher, you’re past the point where one more BIND instance is a quick fix — consider an anycast service or hosted DNS.

Confirm the DNSONLY install media and license:

curl -fsSL https://securedownloads.cpanel.net/cpanel-dnsonly/release | head

cPanel will refuse to install DNSONLY if the source IP doesn’t have a DNSONLY license attached.

What to do

  1. Provision a small VM in the region where you want the extra nameserver. Minimum: 1 vCPU, 1 GB RAM, 20 GB disk, public IPv4 (IPv6 if available).
  2. Run the DNSONLY installer:
cd /home && curl -o latest-dnsonly -L https://securedownloads.cpanel.net/latest-dnsonly && sh latest-dnsonly

The install takes 20 to 40 minutes. It pulls cPanel’s repo, builds the smaller package set, and finishes with a WHM URL.

  1. License the DNSONLY. WHM > License Verification — if you have a paid cPanel license, request a free DNSONLY license attached to the new host’s IP.
  2. Join the DNS cluster from the master cPanel host. WHM > Clusters > DNS Cluster, add the DNSONLY hostname plus API token (generated on the DNSONLY’s WHM). Set the role to “Write-Only with sync” if the master is the source of truth.
  3. Add the DNSONLY hostname and IP to every zone’s NS record set. Glue at the registrar if the nameserver name is under one of your hosted domains.
  4. Test redundancy by stopping named on the master and confirming the DNSONLY still serves all zones identically.

Patch the DNSONLY on the same cadence as your cPanel hosts — /scripts/upcp works the same way, just with fewer packages to update.

Stack Harbor commissions DNSONLY hosts as part of multi-region DNS topology for clients in cPanel server administration.