How to Install VestaCP on AnonVM
Vesta Control Panel (VestaCP) is a free, open-source web hosting control panel designed for managing web servers, email, DNS, databases, and more. It is highly efficient, with a clean and simple user interface, and provides powerful tools for managing websites, security, and server configurations. In this tutorial, we’ll walk you through the process of installing VestaCP on your AnonVM VPS or dedicated server.
Prerequisites
Before installing VestaCP, ensure your AnonVM server meets the following requirements:
- VPS or Dedicated Server with root or sudo access.
- Operating System: The instructions below work for Ubuntu 18.04, 20.04, and CentOS 7, 8.
- Minimal Installation of the OS to reduce unnecessary packages.
- Public IP address and domain name (optional but recommended for SSL/TLS).
Step 1: Update Your System
Before starting, it is important to update the system’s package lists and upgrade the installed packages to ensure that you are working with the latest versions.
For Ubuntu/Debian-based systems:
For CentOS-based systems:
Step 2: Download and Install VestaCP
VestaCP provides a one-click installation script for easy setup. This script installs all the necessary components, including Apache, Nginx, PHP, MySQL/MariaDB, and more.
1. Download VestaCP Installation Script:
Run the following command to download the VestaCP installation script:
2. Start Installation:
Execute the installation script by running:
This will begin the installation process. The script will ask you to choose the installation options. By default, it will install the most common services such as:
- Web server: Nginx + Apache (reverse proxy)
- Database server: MySQL or MariaDB
- PHP: PHP-FPM
- Mail server: Exim + Dovecot
- DNS server: Bind9
You will also be prompted to set an Admin Password and Hostname for your server. Make sure to note down these credentials, as they will be required to access the VestaCP control panel later.
Step 3: Access VestaCP Control Panel
Once the installation is complete, the script will display the following information:
- Admin URL:
https://your_server_ip:8083
- Admin Username:
admin
- Admin Password: Your chosen password during installation.
You can access the VestaCP control panel by opening a browser and visiting:
Log in using the admin username and the password you set during installation.
Step 4: Configure VestaCP
After logging in, you can configure your VestaCP server. Some of the key steps include:
-
Setting Up Domains:
- Go to the Web tab in the VestaCP dashboard.
- Add a new domain by entering your domain name and the root directory where your website files will be stored.
- Ensure DNS settings are configured correctly, either by using VestaCP’s DNS or your own DNS provider.
-
Adding Email Accounts:
- You can create and manage email accounts directly from the VestaCP dashboard.
- Navigate to the Mail section to add new email addresses and manage your email settings.
-
Setting Up Databases:
- In the DB section, create new MySQL or MariaDB databases and manage users for your websites.
-
Managing SSL Certificates:
- VestaCP makes it easy to secure your website with SSL certificates. You can install Let’s Encrypt SSL certificates directly from the dashboard for free.
- Go to the Web section, select your domain, and enable SSL.
-
Firewall Configuration:
- VestaCP provides an easy-to-use firewall that can be configured under the Firewall tab.
- You can enable the default VestaCP firewall or configure custom rules to block unwanted traffic.
Step 5: Configure DNS Settings
If you want to use your server for DNS management, make sure your domain’s DNS records are pointed to the VestaCP server.
- Set DNS Records:
- In your domain registrar’s control panel, create A Records pointing to your server’s IP address.
- Add MX records to point to the email server for handling email.
Step 6: Secure Your VestaCP Server
Security is essential when hosting websites and managing email. To secure your VestaCP control panel:
-
Enable Firewall:
- VestaCP has a built-in firewall. Make sure it’s enabled and configured to protect your server.
- You can also use CSF or Fail2Ban for additional security layers.
-
Update Regularly:
- Always update VestaCP and your server regularly to apply the latest security patches.
- You can update VestaCP using the following command:
-
Use Strong Passwords:
- Ensure your VestaCP admin password and other user passwords are strong and secure.
-
Change Default Port:
- For extra security, change the default 8083 port used by the VestaCP control panel to another port. You can do this in the VestaCP settings.
Step 7: Create New User Accounts and Websites
With VestaCP, you can easily create new user accounts, each with their own websites and email addresses.
-
Add New User:
- In the User section, click Add User to create new users.
- Set up the username, password, email, and allocate resources such as bandwidth and disk space.
-
Create New Websites:
- Under each user, you can create multiple websites.
- Navigate to the Web section and click Add Domain to set up the new website.
Step 8: Monitor Server Performance
VestaCP includes a server monitoring tool to keep track of your server’s resource usage.
-
You can view CPU, memory, disk, and network usage in the Statistics tab of the VestaCP dashboard.
-
Set up daily/weekly/monthly logs to receive reports on server health.
Conclusion
You’ve successfully installed VestaCP on your AnonVM server! VestaCP is a powerful control panel for managing all aspects of web hosting, including websites, email, DNS, databases, and server security. It’s easy to use and highly configurable, making it an ideal choice for individuals and businesses looking for a free and efficient web hosting control panel.
With VestaCP, you can:
- Host multiple websites and manage domains with ease.
- Set up and manage email accounts for your domains.
- Create and manage databases for your web applications.
- Secure your server and websites with SSL certificates.
By following the steps in this tutorial, you can configure VestaCP to suit your needs and ensure your server is optimized for performance and security.