home Tutorial How to easily install Vesta Cpanel in a fresh server

How to easily install Vesta Cpanel in a fresh server

If you are a developer who uses cloud often, you must have come across situations where you needed to quickly host a new website on your server. But often it takes a considerable amount of work to get a fresh server ready and hardened for hosting websites. Installing the required software packages, like a web server, SQL server, mail server, and the likes can be really confusing and time-consuming.

A control panel comes in handy for taking care of all these. Now there are many paid control panel that you could install on your VPS, dedicated server, droplet or even any cloud instance like AWS EC2. In this tutorial, we are going to go ahead with an open source control panel, Vesta Panel. We will be installing the panel on a fresh ubuntu EC2 instance.

Let us first look into some prerequisites to get everything working before we go ahead and start the installation process.

  • It is vital to make sure that you are using a fresh install and your instance doesn’t have any web server, SQL or such installed.
  • Go ahead and assign an elastic IP to your instance if you haven’t already done it.
  • Create a new security group and add open the following ports
    • TCP port 8083, this is the port on which Vesta panel will be listening.
    • TCP and UDP port 53, this is the port on which the DNS service, bind, listen to. This is very vital else your domains will never get resolved.
    • TCP port 587, this will be used for listening to SMTP connections.
    • TCP port 143, this will be used for listening to IMAP connections.
    • TCP port 443 and 80, these are for your web traffic.
    • TCP port 22, to enable us to SSH into the server. For added security go ahead and restrict access to this port from only your IP.
  • Create 2 child nameservers, ns1.yourdomain.com and ns2.yourdomain.com pointed towards the elastic IP assigned to your EC2 instance.
  • Modify your domain’s nameservers and replace the existing ones with ns1.yourdomain.com and ns2.yourdomain.com Please be aware that this will disrupt services for your domain while you get Vesta setup

With all of the above done we can now go ahead and start the process of installing Vesta panel on our instance. It is comparatively simple, follow the steps below.

SSH into your instance and then do a sudo su this will log us in as root. This will let us run the next set of commands. Vesta panel tries to create an user called admin which is as the name suggest the admin user for Vesta, but unfortunately, AWS EC2 ubuntu installations always have a user group, admin already setup. We will need to first delete this group before we can actually start the installation. Please go ahead and type in groupdel admin

Now let’s do a apt-get update and then we will run curl -O http://vestacp.com/pub/vst-install.sh to download the installation script. Now we can go ahead and run the installation script by hitting bash vst-install.sh

Follow the onscreen prompts and go ahead and hit y when asked for a confirmation about all the packages that Vesta panel will be installing. And that’s should be it! The installation should take anywhere between 10 to 15 mins.

After successful installation your Vesta panel login details will be shown in the terminal, go ahead and note them down. Copy paste the login URL which should look something like this https://<your ip>:8083 your browser will tell you that the connection is not secured, but you can go ahead and ignore it and just add that certificate as a permanent exception.

Well, that’s how you install Vesta panel on an ubuntu server! Do comment if you are stuck or need any help.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.