A DNSONLY host comes up clean — fresh install, blank /var/named, ready to take zones. Adding it to the cluster looks like a one-step operation in WHM, but if the steps run out of order the new peer either rejects pushes (no trust yet) or accepts pushes for zones the master doesn’t have (because the new peer’s named is empty and refuses to serve unknown names). The right order is license, trust, full sync, then NS publication.
What’s happening
dnsadmin syncs zones incrementally — when a zone changes on the master, the daemon pushes only that change. A brand new peer needs the entire zone set pushed at once, not change by change. WHM exposes this as the “sync all zones” button in the cluster panel, but the button only works once trust is established in both directions.
The order matters because:
- Without a valid license on the DNSONLY, WHM refuses to start
cpsrvd, and the API never answers. - Without two-way trust, the master can push but the DNSONLY rejects, or vice versa.
- Without a full sync, the DNSONLY has empty
/var/named/and serves SERVFAIL for every zone the master holds — if you add the DNSONLY’s IP to NS records before the sync, you’ve just published a nameserver that fails every query.
How to verify
After each step, confirm before moving to the next.
License:
ssh dnsonly "whmapi1 license_check"
ssh dnsonly "/usr/local/cpanel/cpkeyclt"
Trust (both directions):
ssh master "whmapi1 dnscluster_listpeers"
ssh dnsonly "whmapi1 dnscluster_listpeers"
Both should show each other as Active. Status must be reciprocal.
Full sync:
ssh master "for z in /var/named/*.db; do zone=\$(basename \$z .db); /scripts/dnscluster synczone \$zone; done"
ssh dnsonly "ls /var/named/*.db | wc -l"
ssh master "ls /var/named/*.db | wc -l"
The zone counts should match. If they don’t, some zones failed to sync — check dnsadmin log on both ends.
NS publication:
dig +short NS example.com
dig @dnsonly +short SOA example.com
Only after both succeed should you add the DNSONLY’s hostname to NS records.
What to do
- Confirm the DNSONLY is licensed. New install needs a license tied to the IP. If WHM shows “license expired”, contact the licence provider or cPanel directly to attach a DNSONLY license.
- Generate API tokens on both ends. WHM > Development > Manage API Tokens, with DNS scope.
- Establish two-way trust. On the master, add the DNSONLY as a peer with the DNSONLY’s token. On the DNSONLY, add the master as a peer with the master’s token. Both should show as Active in the cluster panel.
- Run a full sync from the master for every zone. The loop above does it; or use WHM’s “Synchronize Zone to All Peers” with each zone.
- Verify every zone resolves correctly from the DNSONLY with
digagainst the DNSONLY’s IP. Spot-check 5 to 10 zones; if any return SERVFAIL or REFUSED, troubleshoot before exposing the DNSONLY publicly. - Add the DNSONLY’s hostname and IP to the master’s NS record list. Use the cPanel host’s
/etc/nameserverips.confand update each zone’s NS records viawhmapi1 editzonerecord. Set glue at the registrar if the nameserver name is under a hosted domain. - Lower the NS TTL to 3600 or 7200 for the first week so any issue can be reverted quickly. Raise back to 86400 once stable.
If the DNSONLY is in a different region or behind a separate firewall, confirm port 53/UDP and 53/TCP are open from the public internet to the DNSONLY. Some clouds block 53/TCP by default (used for DNSSEC and large responses).
Stack Harbor commissions and tests DNSONLY peers as part of cPanel/WHM management.