CyberPanel version v1.8.5 and above have ability to configure CyberPanel as either PowerDNS Master or Slave. For more details visit changelogs. In this guide we will see how to configure CyberPanel as Master or Slave.
Before configuring CyberPanel, you need to register Glue Records (some registerars call them Private Nameservers or hostnames) at your domain registrar. You can read this article for more details.
In this tutorial we assume that:
Configure them accordingly on your domain registrar using this guide.
Install CyberPanel on your Master and Slave servers.
Once CyberPanel is installed, log in to your CyberPanel dashboard and navigate to -> :8090/manageservices/managePowerDNS
It gives you option to configure upto 3 slave servers. However we are going to configure only one. From dropdown select Master.
Slave Server 1 -> ns2.cyberpanel.xyz (Your value here will be different according to your slave server).
Slave Server IP -> 192.168.100.2 (IP of your slave server).
Once done, click Save Changes, your master is now configured. You need to configure your slave so that it can accept DNS queries.
Log into your slave CyberPanel dashboard and navigate to -> :8090/manageservices/managePowerDNS
Here you will enter two things:
Slave Server -> This is name of slave server such as ns2.cyberpanel.xyz
Master Server IP -> Don't confuse it with Slave IP, you need to enter IP of master server here.
Once done click Save Changes.
Once all of the steps above are completed, open your Master CyberPanel and create website, now go to your CyberPanel Slave and make sure zone is replicated there.
On slave you can also use this command to make sure that Master CyberPanel is sending notifications to slave about newly created DNS zones:
journalctl -f | grep pdns