With one server, DNS for all domains lives on that machine – if it goes down, DNS goes with it. DirectAdmin's Multi Server Setup copies DNS zones to other DirectAdmin servers automatically, so you can run redundant nameservers and share a pair of nameservers across many hosting servers.
Before you start
- Admin access on all DirectAdmin servers involved.
- Network access between servers on the DirectAdmin port (2222) and DNS port 53.
- A plan for nameserver names, for example
ns1.example.comon server A andns2.example.comon server B, with glue records at the registrar.
Create a login key on the remote server
- On the server that will receive zones, log in as admin.
- Go to Advanced Features → Login Keys and click Create Key.
- Allow only the DNS-related commands DirectAdmin documents for Multi Server (such as
CMD_API_DNS_ADMINandCMD_API_LOGIN_TEST). - Restrict Allowed IPs to the sending server's IP and save. Copy the key.
Using a restricted login key instead of the admin password limits risk if one server is compromised. See login keys.
Add the remote server
- On the sending server, go to Server Manager → Multi Server Setup (Admin Level).
- Click Add Server (or fill in the empty row).
- Enter the remote server's IP, Port (2222), user name
adminand the login key as password. Tick SSL. - Click Save, then Test Connection.
- Tick Domain Check (prevents creating a domain that already exists on another server) and Zone Transfer (sends zones).
- Save.
Repeat on the other server in the opposite direction if both host domains and should keep each other in sync.
Sync existing zones
New and changed zones are pushed automatically. To push all existing zones once, use the Transfer all zones option in Multi Server Setup, or run DirectAdmin's task queue command as documented for your version. Check a few domains on the remote server under DNS Administration.
Dedicated DNS servers
Many providers run two small DirectAdmin (or BIND) servers only for DNS. Each hosting server pushes zones to both, and all customer domains use the same nameservers. Set these as the default nameservers in each server's administrator settings.
Verify replication
dig @ns2.example.com example.org SOA +shortThe serial number should match the primary server's. Query a recently changed record on both nameservers to confirm updates propagate.
Troubleshooting
- Test connection fails: firewall blocks port 2222, wrong key, or the key's allowed IP does not match.
- Zones not appearing: Zone Transfer is unticked, or the task queue is stuck; check
/var/log/directadmin/. - Domain refused as existing: Domain Check found it on another server – a feature that prevents conflicts.
