LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

How to Setup & Configure VestaCP on Ubuntu 16.04

VestaCP is a versatile open-source control panel for Linux machines. It provides a point & click, clutter-free interface, simplifying server administration tasks at the same time.   In this tutorial we will walk you through the process of installation, configuration, and first time usage of this free and open-source web hosting control panel.

As a part of the installation, VestaCP will install and configure the following for you:

  • Apache web server with Nginx as the frontend. Nginx will serve static files (such as images and CSS), while Apache will render PHP and HTML files.
  • vsftpd, a FTP server
  • Exim and Dovecot, so you can create and use email accounts
  • MySQL database
  • Softaculous, an application auto-installer

It requires 512MB RAM, 1Ghz CPU, and 20Gb disk space.

In this article, you will install VestaCP on your VPS. Then, you’ll setup a new site in VestaCP, along with an email address (at your domain).

Prerequisites

  • A clean VPS running Ubuntu 16.04 with at least 512MB RAM, 1GHz CPU and 20Gb disk space.
  • A domain name for hosting VestaCP and your sites, pointed to your machine’s IP address at your DNS provider. We will use panel.example.com for Vesta, and test.example.com for the website throughout the tutorial.
  • If you wish to set up email accounts, you’ll need to have PTR records correctly set for your server. This can be done only by your hosting provider.

Step 1 – Installing VestaCP

First, login to your VPS as root via SSH. After logging in, navigate to the /tmp directory by running the following command:

cd /tmp

Then, download VestaCP installation script by running:

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

Run it with:

bash vst-install.sh --force

The –force parameter overrides Vesta’s warnings such as Apache already installed, the admin group already being present in the system and so on. The warning may look like this:

With the the –force option you go directly to the installation prompt:

Answer with y. You will be be asked to provide your email address and a FQDN hostname. Enter an email where you woud like to receive messages from Vesta, and for the hostname, enter your domain name, which you have set up in the prerequisites.

Vesta will then start the installation, and it will take about 15 minutes to complete. You won’t need to enter anything else. When it finishes, you will see a message that looks like this:

Note the username (admin) and the generated password – you’ll need them to log in to Vesta.

Step 2 – Logging in to Vesta

Navigate to the domain shown in the message in your web browser. Note the :8083 at the end of the address – that is the default port for accessing Vesta.

During the installation, Vesta created a self-signed certificate to enable HTTPS access. That is why your browser may show a warning  about TLS certificates being self-signed — here is what it would look like in case of Mozilla Firefox:

In case of Chrome, the message will be:

In spite of the warnings, proceed to the advanced section and create an exception for your browser.

You will be asked to log in:

Enter the credentials you noted previously and press the Login button. You will see Vesta control panel:

Notice the columns in the center upper part of the screen. They allow access to the core of Vesta’s functionality – managing users, their websites, DNS records, email addresses, databases and backups.

Step 3 – Creating a New User

After the installation of Vesta, there will be exactly one user, called admin, as shown in the image above. Adding a new user is a frequent task when setting up Vesta, as you’ll need one new user for each new site that you are creating.

When you want to create a new resource in Vesta (be it a user, a domain, or whatever else), you’ll need to click the green plus button, which will expand with additional text when you hover mouse cursor over it.

So, to add a new user, press the green plus button on the Users page. You’ll see the following form:

VestaCP Add User

Fill in the username and password with your desired credentials, the first and last name with your name, and type in your email. When you’re done, scroll down and press Add.

Vesta will then show the same page you were on before, with the message informing you that the user has been successfully created. For a user named example-user, here’s how the message will look like:

For each available user, you have the options such as Logout, Edit, Suspend, and Delete. They will unintuitively appear only when you hover your mouse cursor over the row, and they look like this:

Step 4 – Create a New Web Site

Click the link shown to log in as the newly created user, and when you become logged in, click the Web column. Press the green plus button to create a new web site.

Enter the domain name  — ours is test.example.com. As noted in the prerequisites, you’ll need to point the domain name to the IP address of your server beforehand – for instructions on how to achieve this, consult your DNS provider.

FTP access

To be able to access files in your site, you will need to create a FTP user for it. To do so, press on Advanced Options and check the additional FTP option. Then, enter username for the new FTP user (maximum safe length is 8 characters), and a password. You can press on Generate to let Vesta create one for you. Note it down for future reference, because that is how you will be accessing your website’s files from now on. If you want to create an additional FTP user, press Add One More FTP Account and repeat the process.

Enabling HTTPS

If you want to have HTTPS enabled for your site (and you most certainly do), check the SSL Support option.

Then, you’ll have to fill in the required fields with the data you got from your certificate issuer, or automate the whole process for free by checking Lets Encrypt Support. Let’s Encrypt is a fully trusted certificate authority which issues completely free certificates, which last 90 days. You can check this option provided you have certbot installed on your system (the program which actually requests the certificates) installed, and Vesta will create and renew them for you. Keep in mind that if you do select this option, Vesta will take a longer time to add the new website, so don’t press the Add button twice.

Tracking Site Statistics

VestaCP also allows you to set up either webalizer or awstats web statistics software. Without delving in deeply into which one of them is better, note that Webalizer does not differentiate between human visitors and bots in its reports, while awstats tries to.

When you are done, click on Add to create the website in Vesta. When the page loads, you’ll see the new website in the list. If you navigate to your domain in your browser, you’ll see a placeholder page created by Vesta that shows the domain name.

Step 5 – Create an Email Account

Click on the Mail column in the center. To create an email address, you’ll first have to add an email domain in Vesta, after which you will be able to create unlimited amounts of email addresses. As in the previous steps, start adding an email domain by clicking the green plus button.

You’ll only need to enter a domain name. Leave the AntiSpam and AntiVirus options checked, which will increase security at no additional expense. When you are finished, press the Add button.

As in the case of Users, additional options will show up when you hover your mouse cursor over it. To list the existing email accounts for that domain, click the List Account button. Otherwise, to add a new email address (account), click Add Account.

Type in your desired email address (without the @domain part) in the Account field. Next, enter your desired password, or let Vesta create one for you by pressing on Generate. You can see how the final configuration will look like in the box shown on the right.

If you wish to set a storage quota or set up email forwarding, press on Advanced Options and type in the relevant information. When you are done, press Add.

You’ll be returned to the listing. Vesta will show you a success message that looks like this:

You can press the Open Webmail link, which will open Roundcube. Roundcube is a mature open source web mail software used by many. It will ask you to log in – enter the full email address you just created as the username as well as your password, then click on Login. Once in Roundcube, you’ll be able to read and write email as you normally would.

Dusko Savic is a technical writer and Flutter programmer.
duskosavic.com

Kaylee

4 Comments

  1. ya vestcp is one of the best free web panel am using it from years .

    June 10, 2019 @ 12:39 am | Reply
    • I am having a problem setting up webmail for my domain, it gives 404…

      September 22, 2019 @ 4:15 am | Reply
  2. George:

    Hello ,
    What about security issues ?

    June 10, 2019 @ 11:58 am | Reply
    • Agree, this should be mentioned on this article.

      June 12, 2019 @ 6:34 am | Reply

Leave a Reply

Some notes on commenting on LowEndBox:

  • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
  • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
  • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

Your email address will not be published. Required fields are marked *