Home > HyperV, Vesta > Creating a Master, Slave, Slave Nameserver setup using Vesta Control Panel

Creating a Master, Slave, Slave Nameserver setup using Vesta Control Panel

You can easily setup a master, slave DNS using Vesta CP with a single command line found at


However should you bring this to the next level and use it for your “enterprise” web hosting, there are a few things you need to do


You might be tempted to setup Vesta in the following way, where all the webhosts will sync to NS01 and then have NS01 sync the dns config over to NS02.


Unfortunately Vesta does not allow you to do this, BUT it does allow the setup as shown below, where each of the web servers will send the dns updates to each of the named servers.



Setting up the NameServers (NS01, NS02)

Now given that Vesta will install and setup different components depending on the amount of ram of the machine, for NS01 and NS02, it would be wise to go with 512MB ram so that it will install the bare minimum.

Once you have installed Vesta on the servers, its time for some clean up

  1. Delete the unused packages
  2. cd $VESTA/bin
    ./v-delete-user-package palegreen
    ./v-delete-user-package gainsboro
    ./v-delete-user-package slategrey

  3. Create the dns-cluster user, who will own all the domains that was synchronized over

    ./v-add-user dns-cluster [password] [email] default [firstname] [lastname]

  4. Stop all the unnecessary services

    ./v-stop-service httpd
    ./v-stop-service nginx
    ./v-stop-service exim
    ./v-stop-service dovecot
    ./v-stop-service vsftpd

  5. Login to Vesta using your web browser, and disable the necessary services at the Firewall section
    1. Accepted services: SSH, DNS, Vesta, Ping
    2. Blocked services: Web, FTP, SMTP, POP3, IMAP, DB

Setting up the Master > Slave DNS (Web01, Web02 > NS01, NS02)

Remember that Vesta allows you to add an unlimited number of slave DNS for each master server

So for web01, and web02, run the following commands:

cd $VESTA/bin
./v-add-remote-dns-host ns01 8083 admin [ns01 admin password]
./v-add-remote-dns-host ns02 8083 admin [ns02 admin password]


You can verify that this is done by doing to server setup and ensuring that DNS is set to cluster and confirm that the following cron job exists



Testing the setup

Now goto web01 and/or web02 and create a few domains, on ANY accounts and at for the 6th minute of the hour, goto ns01 and ns02 to confirm that the changes are synchronized


Now what about URGENT cases

If there are cases where you urgently need to sync over, you can run this command on all of your web servers for each named server that you have: v-sync-dns-cluster [target host]

v-sync-dns-cluster ns01
v-sync-dns-cluster ns02

Categories: HyperV, Vesta
  1. February 22, 2016 at 11:39 pm

    Super helpful and straight to the point. Thanks a lot

  2. Jan
    April 22, 2016 at 12:24 am

    [root@ip bin]# ./v-add-remote-dns-host ns1 8083 admin ##########
    bash: ./v-add-remote-dns-host: No such file or directory

    On centos 7

    • April 22, 2016 at 5:35 am

      this instructions are for centos 6, when i tried installing vesta CP on centos 7, it didnt go quite so well

      You might want to try cd /usr/local/vesta/bin first

  3. May 20, 2016 at 2:31 pm

    I have this setup but nothing ever syncs over to the 2nd server. What have I missed?

    • May 23, 2016 at 9:21 pm

      take a look at the vesta logs and see if there is anything special there?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: