HF PanelDocsv1.0.0

Set up your own nameservers

Run ns1 and ns2 on your own domain: add the records and glue records, set them in Settings, check them, and add a secondary nameserver.

With your own nameservers, customers point their domains at ns1.yourdomain.com and ns2.yourdomain.com, and every DNS record for their websites and email is then made and kept up to date by HF Panel. This tutorial sets them up and, optionally, puts the second one on another machine so DNS keeps answering if the main server is down.

You need:

  • an HF Panel server installed with DNS (without --no-dns)
  • access to the registrar of your server's domain, yourdomain.com

1. Add the A records

Where yourdomain.com's DNS is run, add A records pointing at the server's public IP address:

Name Points to
ns1.yourdomain.com the server's IP
ns2.yourdomain.com the server's IP (or a secondary's IP, see step 5)

hf-panel dns-setup on the server lists them with the server's real address.

2. Register the glue records

Because the nameservers are inside the domain they serve, the registrar must know their IP addresses.

  1. Sign in at the registrar of yourdomain.com.
  2. Find glue records (also called child nameservers, host records or "register nameservers").
  3. Create ns1.yourdomain.com and ns2.yourdomain.com, each with the server's IP address.

3. Set them in the panel

  1. Open Server Admin › System › Settings.
  2. Under DNS & network, check Nameserver 1 and Nameserver 2 (for example ns1.yourdomain.com and ns2.yourdomain.com) and the Server IP address.
  3. Click Save settings.

New DNS zones list these nameservers, and customers see them on their DNS setup and Domains pages.

4. Check them

On the server, run:

bash
hf-panel dns-setup --check

It looks every record up in public DNS and marks what is still missing. Glue records can take a few hours to appear. Server Admin › Server › Server health also checks the DNS group.

A secondary copies every zone from this server and keeps answering if this server is down.

  1. Get a second machine, ideally in another data centre. If it runs HF Panel and is added under Server Admin › Accounts › Servers, go to Server Admin › Hosting › DNS cluster and click Make secondary next to it. Any BIND 9.18+ server also works: copy the configuration from the Any other BIND 9.18+ server card, then add its IP under IP addresses (one per line) and click Save.
  2. Wait until its status shows In sync.
  3. Point ns2.yourdomain.com (its A record and its glue record) at the secondary's IP address, and set Nameserver 2 in Settings if the name changed.

See DNS cluster.

6. Tell your customers

Customers now set ns1.yourdomain.com and ns2.yourdomain.com at their registrar. Their DNS setup page shows the names with a Copy button and checks their domain live. Share Point a domain bought elsewhere with them.

Tip: resellers can show their own nameserver names to their customers: see Become a reseller host.