The Vesta Control Panel is a free, open source control panel with website, email, database, and DNS functionalities. In this tutorial you will install the control panel on an Ubuntu or CentOS server, update the default admin interface port, and learn how to migrate user data from an existing installation.
Note: On April 8th, 2018, a vulnerability was discovered in VestaCP that allowed attackers to compromise host systems and send malicious traffic targeting other servers. As a result, DigitalOcean has disabled VestaCP’s default port 8083
. This tutorial will update the installation to use port 5600
instead. For more up to date information on this vulnerability, please read this Community Q&A post.
The following resources are required to complete this tutorial:
Log into your server via SSH. Because VestaCP handles the creation of individual user accounts, this tutorial will assume you’re logging in as the root user to do the initial setup.
After logging in, move to the /tmp
temporary directory and download the installation script:
cd /tmp
curl -O https://assets.digitalocean.com/vesta/install-vesta-do.sh
This script is a wrapper around the official VestaCP installation script. You can open it in your favorite text editor to see what it does. It uses the official script to install the software, then updates the admin interface to use port 5600
.
Make the script executable:
chmod +x install-vesta-do.sh
Finally, run the script to install VestaCP. You may pass in any of the options supported by the official installation script, which you can find on VestaCP’s installation page. We will use the --force
option, because otherwise the installer may complain about an existing admin group on some machines:
./install-vesta-do.sh --force
The script will interactively ask a few questions, then take around 5–15 minutes to complete the installation. The URL for your admin interface will be printed out, along with the admin login information:
OutputCongratulations, you have just successfully installed Vesta Control Panel
https://panel.example.com:8083
username: admin
password: a-random-password
Note: these initial URLs will be incorrect, as they’ll still be using port 8083
. The very last line of the installation output should be
Configuring to use port 5600 as admin port
Update all port 8083
references to port 5600
before attempting to connect. The example URL would be https://panel.example.com:5600, for instance. After the initial installation, any subsequent emails to your users will use the correct port.
VestaCP is now up and running on your server. If you have an existing VestaCP installation, continue on to the next step, where we’ll migrate your user data to the new server.
VestaCP comes with some scripts to help back up and restore user data. We will migrate all users using these scripts.
On the server you are migrating from, use v-backup-users
to backup all users:
v-backup-users
Note: If you get a command not found
error when running the backup program, you may need to update your PATH
by running:
export PATH=$PATH:/usr/local/vesta/bin
This is handled automatically if you log out and back in after installing VestaCP.
The command will output no status information. You can check for the resulting backup files in /backup
:
ls /backup
Outputadmin.2018-04-11_13-07-02.tar exampleuser.2018-04-11_13-07-02.tar
The above output shows two users backed up, admin and exampleuser. To transfer these files to your new server, we’ll use the scp
utility. The following steps will work the same whether you have one backup file or multiple.
If you’re using password authentication on the new server, it’s easiest to transfer the files directly from the old server to the new, like so:
scp /backup/* root@panel.example.com:/backup/
This won’t easily work if you use SSH keys instead of passwords. In that case it’s easiest to download the files to your local machine, then upload them to the new server. We will create a temporary local directory to hold the files first. On your local command line, do the following:
mkdir /tmp/vesta-backups
scp root@old-server.example.com:/backup/* /tmp/vesta-backups/
scp /tmp/vesta-backups/* root@panel.example.com:/backup/
Now, with the backup .tar
files uploaded to the new server’s /backup
directory, log back in to the new server and use the v-restore-user
command to complete the process:
v-restore-user admin admin.2018-04-11_13-07-02.tar
Note that the v-restore-user
command needs the filename of the .tar
file, but not the full path to the file. It is assumed that the filename you provide is in the /backup
directory.
The command will output a summary of the items it has restored. Repeat this command for each user you need to restore, replacing the username and .tar
file name as need. Your migration is now complete.
In this tutorial you installed the VestaCP control panel, updated the port of its default admin interface, and migrated user data from a preexisting installation. To learn more about using the VestaCP software to set up websites and email, please refer to steps 3 and 4 of How To Install VestaCP and Set Up a Website on Ubuntu 14.04. You can also refer to the official documentation.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Glad to see a guide for users wanting to know how to install on a fresh droplet with port 5600.
Just a note for users this is a backup and import of the admin account only, you will need to run backup and restore for any secondary accounts also, just follow the steps above but replace admin with the users name.
Need update to install Vestacp
I cant install Vestacp, I dont know why? plz help me
You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest Error: yum install failed
https://i.imgur.com/bG4Kcdp.png
Thank you Brian, worked fine for me!! Can you please help me with how can I downgrade to PHP 5.6?
How to update to php 7.2 using nginx and php-fpm on ubuntu/debian?
Will the same instructions work with Ubuntu 18.04?
Great tutoria! Thank you. Since the time it was published looks like some changes have taken place.
This is what worked for me today when installing vestacp:
cd /tmp curl -O https://assets.digitalocean.com/vesta/install-vesta-do.sh
and then (because this is what the install-vesta-do.sh file references):
chmod +x vst-install.sh
/.vst-install.sh --force
it seems to work with port :8083 now
does webserver installed by default with this installation and whats the default mail server address? currently im having issue with receiving email. i have no clue on how to set up MX record.
My current setup: domain: example.com FQDN: test.example.com used the tutorial above successfully
What entry should i put in DigitalOcean domain’s config page? and what other changes do i need to make it properly function.
This comment has been deleted