If your hosting business has grown past one server, the DNS that ships on the cPanel box itself is now a single point of failure. When the primary reboots, every customer domain goes dark inside its TTL. The fix is a DNS cluster: two or more dedicated nameservers that share authoritative zones with the primary cPanel box and stay reachable when it isn't.
cPanel sells this configuration as DNSONLY — a stripped-down WHM image with no Exim, no Dovecot, no MySQL, just BIND or PowerDNS and the cluster API. The DNSONLY license is free and self-issues against the server's IP, so a three-node cluster costs you only the two extra VPSes.
Architecture
The typical small-host setup is three nodes:
| Role | Hostname | License | Services |
|---|---|---|---|
| Primary | server1.example.com | cPanel & WHM | Apache, MySQL, Exim, BIND |
| Secondary nameserver | ns1.example.com | DNSONLY (free) | BIND only |
| Tertiary nameserver | ns2.example.com | DNSONLY (free) | BIND only |
All three run BIND. When you create a zone on the primary, the cluster API pushes it to both DNSONLY nodes over port 2087. If the primary goes down, the two DNSONLY nodes keep answering queries from the cached zones — your customers don't notice.
For a larger fleet you can chain multiple cPanel servers into the same cluster, with each DNSONLY node acting as authoritative for every cPanel box in the group. cPanel supports up to 200 servers per cluster.
Prerequisites
- A working primary cPanel server. If you don't have one yet, start with installing cPanel on a fresh VPS.
- Two additional VPSes for the DNSONLY nodes. 1 vCPU and 1 GB RAM is plenty — BIND is light. Use AlmaLinux 9 to match the primary.
- Public IPv4 addresses on all three. cPanel licensing is IP-bound; the DNSONLY licenses self-issue when the installer runs.
- Port 2087/tcp open between all cluster members (this is the WHM API port the cluster uses to push zones).
- Port 53/tcp and 53/udp open from the public internet to both DNSONLY nodes.
- Glue records at your domain registrar pointing
ns1.example.comandns2.example.comat the DNSONLY IPs — see step 5.
Step 1 — Install DNSONLY on both secondaries
SSH into the first DNSONLY box as root and set the hostname:
hostnamectl set-hostname ns1.example.com
echo "203.0.113.20 ns1.example.com ns1" >> /etc/hosts
Run the DNSONLY installer:
cd /home
curl -o latest-dnsonly -L https://securedownloads.cpanel.net/latest-dnsonly
sh latest-dnsonly
It runs for 10–15 minutes and finishes with a WHM login URL. Repeat the entire step on
ns2.example.com with its own hostname and IP. Once both are up, run cpkeyclt on each to
confirm the free DNSONLY license is bound:
/usr/local/cpanel/cpkeyclt
You want Update succeeded. If you see License File Invalid, the licensing endpoint
couldn't reach the IP — usually a firewall blocking outbound 443 to verify.cpanel.net.
Step 2 — Generate API tokens on each node
The cluster authenticates with WHM API tokens. The older "Remote Access Hash" is deprecated and disabled by default since cPanel 100. Tokens are per-node and per-direction, so you'll create three of them.
On each of the three servers, log into WHM as root and go to Development → Manage API
Tokens → Generate Token. Name it cluster-from-<other-hostname> so you can identify it
later, leave privileges at root, and copy the token immediately — WHM only shows it once.
You should end up with:
| Token lives on | Used by | Name |
|---|---|---|
server1 | ns1, ns2 | cluster-from-ns |
ns1 | server1, ns2 | cluster-from-server1-ns2 |
ns2 | server1, ns1 | cluster-from-server1-ns1 |
Step 3 — Enable DNS clustering and add the trust relationships
On the primary (server1), open WHM → Clusters → Configure Cluster and toggle
DNS Clustering to Enabled. Save.
Then go to Clusters → DNS Cluster → Configure Cluster Member. For each DNSONLY node:
- Set Server Type to cPanel. (DNSONLY identifies as cPanel for cluster purposes.)
- Enter the remote IP, e.g.
203.0.113.20. - Paste the token you generated on that DNSONLY node.
- Set the DNS Role to Synchronize Changes.
- Click Submit. WHM tests the connection and saves the trust.
Synchronize Changes is the role you want for a true HA cluster — both sides accept writes and propagate. Write-only sends but never accepts, which is correct when the secondary is a pure stealth slave. Standalone disables sync for that pair.
Now repeat the same exercise on each DNSONLY node, adding both other nodes as Synchronize Changes peers. When you're done, every node should list both peers as green/trusted under DNS Cluster → Configure.
Step 4 — Set the cluster's nameserver IPs
On the primary, WHM → Server Configuration → Basic WebHost Manager Setup. In the Nameservers section:
- Set
ns1.example.com→203.0.113.20 - Set
ns2.example.com→203.0.113.21
Click Assign IP Address next to each and then Save Changes. From now on, every new cPanel account WHM creates will write its zone with these two nameservers and immediately push it to both DNSONLY nodes.
Step 5 — Register glue records at your registrar
The two DNSONLY hostnames have to resolve at the registry level, not just inside your zone. Log into your domain registrar and create glue records (sometimes labelled "child nameservers" or "register a host"):
ns1.example.com→203.0.113.20ns2.example.com→203.0.113.21
Then change example.com's authoritative nameservers to those two glue records.
Propagation takes 24–48 hours at the registry, longer at some recursive resolvers.
Step 6 — Verify replication
Create a throwaway test zone on the primary and confirm it appears on both DNSONLY nodes within a few seconds:
# on the primary
whmapi1 adddns domain=clustertest.example.com ip=203.0.113.10
Then query each DNSONLY node directly with dig:
dig @203.0.113.20 clustertest.example.com SOA
dig @203.0.113.21 clustertest.example.com SOA
Both should return the SOA record with server1.example.com. as the MNAME. If a node
returns REFUSED or SERVFAIL, the cluster push failed — check
/usr/local/cpanel/logs/dnsadmin_log on the primary for the error.
Clean up:
whmapi1 killdns domain=clustertest.example.com
Common gotchas
- TLS certificate on DNSONLY. The cluster API uses HTTPS on 2087. If the DNSONLY node
is using a self-signed cert from a hostname mismatch, WHM logs
SSL certificate problemand refuses to push. Run AutoSSL on the DNSONLY box for its own hostname — see WHM AutoSSL failures. - Firewall. ConfigServer Firewall on either node will block 2087 unless you add the
other node's IP to
TCP_INand the peer IP allowlist. - Mismatched cPanel versions. A primary on
11.124 stablewill refuse to cluster with a DNSONLY on11.120 lts. Match release tiers across the cluster. - NSD users. If you've switched the primary from BIND to NSD, the DNSONLY nodes must match. Mixed clusters work, but zone-format edge cases will bite you.
Is the DNSONLY license really free?+
Can I run a DNS cluster on the same server as cPanel?+
How many DNSONLY nodes do I need?+
Will the cluster replicate existing zones, or only new ones?+
Does the cluster work with PowerDNS instead of BIND?+
What happens if the primary is down when a customer changes a DNS record?+
Next steps
- How to install cPanel on your VPS — for the primary, if you haven't built it yet.
- Diagnose AutoSSL failures in WHM — DNSONLY nodes need their own valid certificate for the cluster API to trust them.
- cPanel license tiers explained — DNSONLY does not count against your account quota, so it's free even on Solo and Admin tiers.