VestaCP is an open source hosting control panel. VestaCP provides a set of features to manage Domains, DNS, Mail, Databases, Cron Jobs, Backups and many more.
In this tutorial, you are going to learn how to install Vesta Control Panel on Google Cloud with Ubuntu 18.04.
This setup is tested on Google Cloud Platform, so this guide can be used on any other cloud hosting services or VPS or Dedicated server running Ubuntu.
Create the VM Instance
Go to Compute Engine >> VM Instances and click Create Instance
In Name provide a
name for your Instance
In Region choose the region closest to your visitors
In Machine Type choose
3.75 GB memory 1vCPU
20 GB and click Select
In Firewall check both
Allow HTTP traffic and
Allow HTTPS traffic
It will take a while before the VM instance will be available for you.
Reserve your IP address
If your IP address has a valid license you can proceed to reserve your IP address by going to VPC Networks >> External IP Addresses reserve your IP address to Static.
Setup Cloud DNS
Please follow this guide to setup Cloud DNS and point your domain to Google Cloud.
Once you have created DNS Zone, you need to create one additional A record for VestaCP subdomain in your Cloud DNS.
Click Add record set
In Name enter
Select Resource Record Type to
IPv4 Address with the
IP address of your instance that you have reserved earlier.
Leave everything to default.
Setup Firewall rules
VestaCP uses a custom port to manage the server, so you need to create a firewall to provide access to this port.
Go to VPC Network >> Firewall rules and click Create Firewall rules.
In Name enter
In Targets select
All instances in the network
In Source filter select
In Source IP ranges enter
In Protocols and ports check TCP and
Connect your VM Instance
Go to Compute Engine >> VM Instances and click the SSH button right next to your instance to open the terminal window in the browser.
Set up Hostname in Google Cloud
Google Compute Engine won’t preserve the hostname (
panel.yourdomainname.com) you set and changes it to default hostname automatically. To preserve the hostname follow the below simple steps.
sudo nano set-hostname.sh
Paste the following contents and hit
Ctrl+X followed by
Y to save the filter. Remember to replace
yourdomainname.com with your domain name
Set correct permissions to the file you created
chmod 744 set-hostname.sh
Now you are ready to install VestaCP on Google Cloud.
Generate Install Command
Before installation go to VestaCP website and generate the installation command.
Scroll down to Advanced Install Settings and select the following.
- In Web select
nginx + apache
- In FTP select
- In DNS select
- In Firewall select
iptables + fail2ban
- If you need Softaculous select
- In DB select
- In Hostname enter
- In Email enter
your email address
- In Password enter your
admin login password
Click Generate Install Command.
Install VestaCP on Google Cloud
Update your server and download the installation script.
sudo apt update
sudo apt upgrade
curl -O http://vestacp.com/pub/vst-install.sh
Now paste the generated command with
If you don’t use the -f appended you will receive an error similar to this.
Please remove admin user account before proceeding.
Execute the command with the
-f option. So, The command looks similar to the one below.
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --softaculous yes --mysql yes --postgresql no --hostname panel.yourdomainname.com --email [email protected] --password your_password -f
Once the installation is completed you will be greeted with the login credentials
Congratulations, you have just successfully installed Vesta Control Panel
Verify the Installation
Now, go to your web browser and visit your Vesta Control Panel by typing the URL (
Here you will get a warning of insecure website, just proceeed to the website. We will install SSL certificate later to fix this issue.
Now login to your dashboard with the username and your password.
Install FREE SSL Certificate
Go to WEB section and hit EDIT which will show when you hover the mouse on hostname/subdomain.
Under Aliases remove everything from the box.
Navigate below You’ll see “SSL Support” checkbox mentioned at the bottom, check the box and select/check “Let’s Encrypt Support“
Set Up Cronjob
Create a cronjob to check the certificate daily and installs them if changed.
Paste the following lines.
if ! cmp -s $cert_dst $cert_src
# Copy Certificate
cp $cert_src $cert_dst
cp $key_src $key_dst
chown root:mail $cert_dst
chown root:mail $key_dst
service vesta restart &> /dev/null
service exim4 restart &> /dev/null
service dovecot restart &> /dev/null
Ctrl+X followed by
Enter to Save and Exit.
Set up correct permissions.
chmod +x /etc/cron.daily/vestassl
Restart VestaCP Services
Once done, you can start the cronjob and restart the services to apply the changes of SSL Installation.
You can also restart the services using the below comands.
service vesta restart
service exim4 restart
service dovecot restart
Now close the existing VestaCP tab in your browser and login again you will have your SSL certificate installed successfully.
Now you have learned how to install
Thanks for your time. If you face any problem or any feedback, please leave a comment below.