This article outlines the initial basic steps you need to do after installing VestaCP on your Ubuntu or CentOS server. The main purpose of this guide is setting up VestaCP so that the main website can resolve to the server or is accessible through the Internet.
Without further ado, let’s dive into the tutorial.
- You need to follow our previous guide on how to set up your own Nameserver or NS. The actual steps are different depending on which registrar your domain is registered at. The point of that guide is to register your own NS1 and NS2.
- Obviously, you’ll also need a server (VPS/Cloud) with VestaCP. Read our guide on how to install VestaCP.
You’ll need to change:
- Change yourdomain.tld with your own domain name. In my example, I use speedy.monster to show you the picture.
- Change 184.108.40.206 with the actual public IPv4 address of your server.
VestaCP Initial and Basic Setup
Step 1. Login to VestaCP dashboard by going to:
in which 220.127.116.11 is the IP address of your server.
Step 2. You’ll be on the main page of VestaCP dashboard. Next, you need to change the default name server used by VestaCP services.
Step 3. Choose [Packages] in the main menu at the top of the page.
Step 4. You’ll see all available Hosting Packages in the VestaCP. The “Default” package is the currently assigned package to the Admin user. Click the [Edit] button.
Step 5. In the next page, you can change the default value of each configuration such as Apache Template, Nginx Template, DNS Template, SSH Access, Web Domains, DNS Records, Mail Accounts, Databases, Cronjobs, Backups, Hosting Quota, Bandwidth, and Nameservers.
Generally, you don’t need to alter all of them if you plan to use the server as your personal use to host your own websites and clients websites. You’ll need to adjust those settings if you want to use the server as Shared Hosting service (selling web hosting services).
Personally, what I do are: to change the backups from 3 to 1, and change the Name servers. Nevertheless, adjust the configuration as needed.
Step 6. On the same page, change the default Name Servers to ns1.yourdomain.tld and ns2.yourdomain.tld. Again, make sure the Name servers are registered already (refer to the previous guide).
Hit that green [Save] button once done.
Step 7. Go back to the main page and notice that the default Nameservers have changed.
Step 8. Now you’ll need to change the default IP address assigned to the hostname. You just need to double-check it since in my case, the internal IP address is used. Go to [Web] then click the [Edit] button.
Step 8.a. Click on the IP Address option.
Step 8.b. Choose the public IP address of your server.
Step 8.c. Scroll down the page and click that green [Save] button.
Step 9. Next, you’ll need to edit the default SOA record for the Hostname. Click [DNS] then click [Edit].
Step 9.a. Change the SOA record from the default tone to the new one. Click the [Save] button once done.
Step 10. Next, click [DNS] then [List 14 Records] as shown in the example below. We need to change the default NS records used by the Hostname.
Step 10.a. Click the [Edit] button next to the ns1.domain.tld record.
Step 10.b. Change the value to ns1.yourdomain.tld as shown in the example below.
Step 10.c. Do the same for the NS2 record.
Once changed, you can see the default NS records have been changed.
Step 11. Test accessing the Hostname through the Internet. Open up a new browser tab, type in the address bar your Hostname URL, and hit Enter.
Congratulation, you have successfully pointed the main Hostname to your server. That said, you can now use it to log in to VestaCP dashboard (instead of using the IP address).
https://hostname.yourdomain.tld:8083/ #in my example, it is: https://host.speedy.monster:8083/
Step 12. The only website available by default is your Hostname and you’ve gone through the steps on how to make it accessible. Now, let’s add your main domain name as the main website. Click [Web] then click the green [Add Web Domain] button.
Step 12.a. Type in the main domain name, make sure the IP Address is correct, then click the [Add] button.
Step 12.b. Once added, you’ll see a message displayed similar to the example below.
Step 13. Next, you need to make sure the domain name points to your VestaCP server. Click the [DNS] menu, then click [Add Record] button of your main domain name.
Step 13.a. Type ns1 in the Record field, enter the IP address, then finally click the [Add] button. See an example below. Make sure the DNS Type is A record.
Step 13.b. Do the same to add the A record for the NS2.
Step 13.c. Next, you need to also add the NS record for both NS1 and NS2. Type ns1 in the Record field, choose NS in the Type dropdown option, enter the IP address, then click the [Add] button.
Step 13.d. Do the same for the NS2.
Step 14. Again, you need to test it. Open up a new browser tab, then try accessing your website. It shall display the main default page of VestaCP.
Congratulation! That’s all the basic steps necessary to make your website hosted on the VestaCP server accessible from the Internet.
You can skip most of the steps above if you opt to use third-party DNS hosting provider such as Cloudflare, NSONE, CloudNS, etc.
In this article you have learned:
- How to change settings for the default hosting package (Step 1 – 5).
- How to change the default Nameservers for the current user/Admin (Step 1 – 7).
- How to make the Hostname accessible (Step 8 – 11).
- How to add a new website in VestaCP (Step 12: a-b).
- How to add new DNS records in VestaCP (Step 13).
- How to make your main website accessible (Step 12 – 14)