VestaCP is installed with a script provided by the developers: you download it from the official site and run it. The only real decision is which components to include.
Choosing the components
The web server, first of all:
- Nginx + Apache + PHP — Nginx serves static content, Apache handles the rest. The most compatible option, and what most CMS platforms expect because it supports
.htaccess. - Apache + PHP — simpler, but slower with static content.
- Nginx + PHP-FPM — the fastest and lightest, but there is no
.htaccesssupport, so rewrite rules have to be written in the Nginx configuration instead. Choose this only if you know your applications do not depend on.htaccess.
Then the optional components:
- FTP server (vsftpd) — worth including if files will be uploaded over FTP. Note that it is not configured for encryption by default; SFTP over SSH is the safer route.
- Firewall (iptables) and fail2ban — include both. Any server exposed to the internet is subjected to continuous automated login attempts, and these are what limit the damage.
- DNS server (named) — only if the server is to serve DNS for your domains. If DNS is handled by us or by your registrar, leave it out.
- Mail server — several combinations are offered. Leave it out if mail is handled by an external provider; running an unnecessary mail server only gives you something else to secure.
- Database server — MySQL or PostgreSQL. MySQL for most web applications.
Include only what you will use. Every component installed is a service that has to be updated and kept secure.
Getting the installation command
The installation page on the official site — vestacp.com/install/ — has a form that generates the command with the flags matching your chosen components. Use it rather than copying a command from elsewhere, so that the flags match what you actually want.
Running the installation
Connect to the server over SSH as root and download the script:
cd /tmp curl -O https://vestacp.com/pub/vst-install.sh
Then run it with your flags. For example, for Nginx with PHP-FPM, MySQL, FTP, firewall and fail2ban, and without a DNS or mail server:
bash vst-install.sh --nginx yes --phpfpm yes --apache no --named no \ --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no \ --exim no --dovecot no --spamassassin no --clamav no \ --mysql yes --postgresql no \ --hostname vm00000.sayob.com --email [email protected]
Replace the host name with your server's own — vm00000.sayob.com, where vm00000 is your server's identifier — and the email address with yours: that address receives the panel's notifications.
The installer lists the components and asks for confirmation. Check the list, then confirm.
Install on a clean server. The script installs and configures a full stack of services, and it will conflict with a web server, database or mail server that is already present. If the server is not clean, reinstall the operating system first — see Managing your CloudVM virtual server in the client area.
When it finishes
The installer prints the panel address, the user name and the password. Save them before closing the terminal — the password is shown once.
Log in at the address given to confirm the panel works.
First things to do afterwards
- Change the password you were given, and set up SSH key authentication — see How to connect to a server via SSH.
- Issue an SSL certificate for the panel's own address, so that your login credentials are not sent unencrypted.
- Review the basic settings, including the fail2ban ban time — see General VestaCP configuration.
- Configure backups before you put anything important on the server — see Configuring backups in VestaCP.
If the installation fails partway through, open a ticket from your client area with the output of the script — the point at which it stopped usually identifies the cause.