blog-image

Jun 06, 2018

13 min read

How to install VestaCP (cPanel alternative) on your server

Written by

Vippy The VPS
VestaCP is another open source hosting control panel that provides a set of features to manage domains, DNS, mail, databases, cron jobs, backups and much more. Compared with other control panels, it’s a very lightweight web hosting control panel that runs smoothly even with very low system specifications. In this article, We will look at how to install VestaCP and configure its various services in Ubuntu 16.04.

Prerequisites

  • You will require a fresh Ubuntu 16.04 machine with at least 1 GB of RAM.
  • A valid DNS name pointing its A record to the IP address of your Ubuntu machine.
[cta_inline]

Step 1. Configure FQDN of the host

To change the hostname of your system, use the hostnamectl command. hostnamectl will directly update the kernel about the change in the hostname, and you don’t need to reboot the machine afterward.
$ sudo hostnamectl set-hostname dwijadasdey
Next, edit the file /etc/hosts and add the following line at the end. The format is IP_ADDRESS HOSTNAME.TLD HOSTNAME. This is an example using a domain of mine and a fake IP.
$ sudo vi /etc/hosts
123.456.78.9 dwijadasdey.tk dwijadasdey
Run the command below to restart the network manager and apply these changes:
$ sudo systemctl restart networking
Check the hostname and FQDN of the host:
$ hostname
dwijadasdey
$ hostname -f
dwijadasdey.tk
Now that your FQDN has been set let’s proceed toward the process of installing VestaCP in detail.

Step 2. Install VestaCP

Update the system

Make sure all the packages in the system are up-to-date by issuing the following commands in the terminal:
$ sudo apt-get update
$ sudo apt-get upgrade

Download the VestaCP install script

Next, download the Vesta Control panel install script with the following command and make it executable:
$ curl -O http://vestacp.com/pub/vst-install.sh
$ sudo chmod u+x vst-install.sh

Generate the install command

VestaCP provides an intuitive way to generate the install command. Visit http://vestacp.com/install/, scroll down the page a little bit, and find the Advanced Install Settings section. enter image description here Now, judiciously choose the advanced install settings according to your requirements.
  • For Web options, choose nginx + apache if you plan to use a reverse proxy at a later stage.
  • Choose named in the DNS section if you want a DNS server, too. Otherwise, choose No.
  • If you want an extra repository for packages, then select Remi.
  • Type in the FQDN that we configured in Step 1.
  • VestaCP does not provide a file system browser of its own, so choose either vsftpd or proftpd as a FTP server for easy file upload and download.
  • Next is the firewall. You can choose whether to use iptables and fail2ban, iptables only, or no firewall at all. It is advisable to use at least one of the options for a secure system.
  • If you are going to use VestaCP as Shared Web Hosting service then choose File System Quota, to yes. Otherwise, choose no.
  • Provide your email.
  • For the email server, choose Exim + dovecot + SpamAssassin + ClamAV. SpamAssassin will protect the email server from spam. ClamAV will mitigate virus activity in your server but
Continue reading this article
by subscribing to our newsletter.
Subscribe now

A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.

If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.