VestaCP; Installing the Free Website Management Utility on Ubuntu

One of the most daunting thing that scare people away from the server side of computing is the rampant use of command line interface or CLI for short. While it is still important to know how to use a CLI, it does seem very harsh to force web developers and designers, who make pretty and intuitive web content for the rest of us, to use a CLI with fonts that will give you a headache and variable names with arbitrary vowels dropped here and there.

Even for sysadmins who are good at using the command line, this can get tedious after a while, especially if the same procedure is to be repeated on multiple servers each running a different shell or a different OS, altogether. To automate most of the routine job, without losing the low-level control over the system, we need VestaCP.

Prerequisites and Initial Set Up

Before heading over to the installation, let’s list all the things that you are going to need before running the installation.

  1. A virtual private server (VPS) with public IP and root access.
  2. A registered domain name.
  3. An A record to the domain name example.com pointing to the IP of your VPS
  4. An A record to a subdomain panel.example.com pointing to the IP of your VPS.
  5. A non-root user with sudo privileges (more on this below).

The first option is almost always available from most VPS providers, and your domain name registrar would provide you a nice interface for adding DNS records. The non-root user, if absent, can be added by running the following command as root:

$adduser username 

The username can be any reasonable name you want it to be. After which there would be several prompts for setting the password and other user details. You can skip all the private details by hitting [ENTER] until the options run out. However, please select a strong password. In our example, we have chosen the username to be bob.

Next, you will need to give the user bob superuser (or sudo) privileges. This can be done by running the following command:

$gpasswd -a bob sudo

The gpasswd is a command to manage user and group memberships on Linux, the flag -a is for adding the user bob to the user group sudo. With Bob capable of being the omnipotent root, you can login as bob and proceed with the installation.

$login bob

It will prompt you for the password, enter the password that you chose for Bob initially.

Related:  How to Use Siege to Load Test Your WordPress Website

Setting Up Vesta Control Panel

After logging in as bob, run the command to fetch Vesta installation script. It is being stored in the directory, where you ran the command. In this example, it is going to /home/bob

$curl -O https://vestacp.com/pub/vst-install.sh

If you run it elsewhere, the script will be saved in that directory. Regardless of which directory it is stored in, you can visit that directory and give the following command:

$sudo bash vst-install.sh

Note: For some server setups this might give you the following error message:

Error: group admin exists

Please remove admin user account before proceeding.
If you want to do it automatically run the installer with -f option:
This is not unexpected, as most VPS have configurations with an ‘admin’ username. Running the following command can fix it:

$sudo groupdel admin

If you are sharing this server with other users, please verify with them if they are using ‘admin’ username for any purpose.
Running the vst-install.sh script, as above, will then alert you about all the packages it is going to install on your server. For a new server, with nothing but default packages installed, this is what you will see:

Enter y to accept and then enter your email address at the next prompt. Pick an email that you can rely upon, since this is what Vesta would use to send you important information like newly generated password, or password reset links, in case you forget them.

Followed by this is a prompt to enter your Fully Qualified Domain Name (FQDN), which in our example is: panel.example.com. You can use any subdomain instead of ‘panel’ but it is intuitive and easy to remember. As long as you have an A record for the domain name pointing to your server’s IP, it will work.

Avoid using the domain name you will be exposed to your customers or the public like example.com or www.example.com or blog.example.com.

The redacted portions are where your email and domain name would be go in, respectively

Once these details are entered, it will take some time for the set up to finish, it says 15 minutes but is usually quicker than that.
Finally, you will see a message giving you the login details for your control panel.

Related:  Top 10 Best Dummy Content (Lorem Ipsum) Generators WordPress Plugins

Using the Control Panel

While the entire UI is pretty intuitive, here are a few things you might want to look out for, first is the warning from Chrome, as you try and visit https://panel.example.com:

It is perfectly safe to ignore this warning, but only here, as Vesta uses self-signed certificates to secure the connection between your browser and the server.

This certificate can’t be verified by any third party because it is self-signed, hence the warning. Once you see the login prompt, enter your login credentials generated earlier by Vesta.

After this, you are almost done, you will be greeted by a clean GUI with all the bells and whistles that a sysadmin, or for that matter a web developer testing a new website, might need.

Where to go from here?

The first and foremost thing you would want to do is change the password to something more secure. Click on admin at the top right corner of the screen and you can edit your admin’s password or add more admins, in case there is a team involved in the project.
You can click on Web, for example, and click on the plus symbol on the left-hand side column and enter a domain name you like. To begin with, our initial domain name: example.com would be a good start.

From here on, you can add SSL certificates, using Lets Encrypt, or spin up mail servers and more sub domains using a simple point and click interface. You can setup name servers too. Typical naming convention would be something similar to this:

ns1.example.com
ns2.example.com

This will additionally, help you to add more websites under your control panel. Install FileZilla on your personal computer and set up ftp servers (by going back to VestaCP) to access various directories in your remote server. If you are collaborating with other people, you can add them as users too, without any hassle.

VestaCP; Installing the Free Website Management Utility on Ubuntu
4 (85%) 161 votes