Installing a control panel like cPanel or Plesk on your unmanaged VPS can significantly simplify server management, especially for beginners or those managing multiple websites. These panels provide a graphical interface (GUI) for tasks that would otherwise require command-line knowledge, such as managing domains, email accounts, databases, and website files.
Important Considerations Before Installation:
- License: Both cPanel and Plesk are commercial software. You must purchase a license. Some VPS providers offer pre-installed versions with bundled licenses, which can be more cost-effective.
- Clean OS Installation: Control panels should almost always be installed on a freshly installed operating system. Installing them on a server with existing software can lead to conflicts and unstable behavior. If you have an existing server with data, back it up thoroughly and consider reinstalling the OS.
- Operating System Compatibility:
- cPanel: Primarily supports AlmaLinux OS, Rocky Linux, and CentOS Stream. It also has limited support for Ubuntu LTS (currently Ubuntu 20.04 and 22.04 LTS).
- Plesk: Supports a wider range of Linux distributions including Ubuntu, Debian, CentOS, AlmaLinux, Rocky Linux, RHEL, and CloudLinux, as well as Windows Server.
- Always check the official documentation for the latest supported OS versions.
- Resource Requirements: Control panels themselves consume a significant amount of RAM and CPU.
- cPanel: Minimum 1GB RAM and 20GB disk space (recommended 2GB+ RAM, 40GB+ disk space). With a control panel, a typical WordPress site needs at least 2GB RAM.
- Plesk: Minimum 512MB RAM for Linux (1GB+ recommended), 10GB disk space. For web hosting with standard features, 2GB+ RAM is usually advised.
- Ensure your VPS meets or exceeds these requirements to avoid performance issues.
- Time Commitment: The installation process for both panels can take a significant amount of time (30 minutes to over an hour, depending on server specs and internet speed).
General Steps to Install cPanel or Plesk
The installation process for both cPanel and Plesk is designed to be largely automated via a single script.
Step 1: Prepare Your VPS
- Provision a Fresh VPS: Order a new VPS from your chosen provider. Select a compatible operating system (e.g., AlmaLinux 9 for cPanel, Ubuntu 22.04 LTS for Plesk). Ensure it’s a minimal installation without any pre-installed web servers, databases, or other services.
- Access Your VPS via SSH: Use the root credentials provided by your VPS host.
Bash
ssh root@your_vps_ip_address
- Update Your System: Before installing anything, update all existing packages.
- For AlmaLinux/Rocky Linux/CentOS Stream (cPanel/Plesk):
Bash
sudo yum update -y # or sudo dnf update -y
- For Ubuntu/Debian (Plesk/cPanel on Ubuntu):
Bash
sudo apt update sudo apt upgrade -y
- Reboot if the kernel or other critical components were updated:
Bash
sudo reboot
Reconnect after the reboot.
- For AlmaLinux/Rocky Linux/CentOS Stream (cPanel/Plesk):
- Set Hostname (Optional but Recommended): Set a fully qualified domain name (FQDN) for your server. This should NOT be the domain name of a website you plan to host on the server. For example,
server.yourdomain.com
.Bashsudo hostnamectl set-hostname server.yourdomain.com
You might need to log out and back in for the change to reflect in your prompt.
- Disable SELinux (for CentOS/AlmaLinux/Rocky Linux, if necessary for cPanel): cPanel documentation usually recommends disabling SELinux or setting it to permissive mode during installation to avoid conflicts.
Bash
sudo nano /etc/selinux/config
Change
SELINUX=enforcing
toSELINUX=disabled
. Save and exit. Reboot the server for this change to take effect:sudo reboot
.
Step 2: Install the Control Panel
A. Installing cPanel/WHM:
cPanel provides a single-line command for installation.
-
Navigate to the
/home
directory:Bashcd /home
-
Download and Run the Installation Script:
Bashcurl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
curl -o latest -L https://securedownloads.cpanel.net/latest
: Downloads the latest cPanel installation script and saves it aslatest
.sh latest
: Executes the downloaded script.
-
Wait for Installation to Complete: This process is entirely automated and can take anywhere from 30 minutes to over an hour, depending on your server’s specifications and internet speed. You will see a lot of text scrolling by in your terminal. Do not close the terminal or interrupt the process.
-
Post-Installation: Once the script finishes, it will provide a URL to access the Web Host Manager (WHM) interface, typically:
https://your_vps_ip_address:2087
B. Installing Plesk:
Plesk also offers a simple one-click installer.
-
Ensure
wget
orcurl
is installed:- Ubuntu/Debian:
sudo apt install curl wget -y
- CentOS/AlmaLinux/Rocky Linux:
sudo yum install curl wget -y
- Ubuntu/Debian:
-
Download and Run the Installation Script (One-Click Installer for Recommended Components):
Bashsh <(curl https://autoinstall.plesk.com/one-click-installer || wget -O - https://autoinstall.plesk.com/one-click-installer)
This command will download the latest stable Plesk version and install it with a default set of components. This is the easiest for beginners.
-
Wait for Installation to Complete: Similar to cPanel, this can take a while.
-
Post-Installation: Once completed, the script will provide a URL to access the Plesk control panel, usually:
https://your_vps_ip_address:8443
You will typically log in with theroot
username and password initially.
Step 3: Initial Configuration (Accessing the Control Panel)
After the installation script finishes, you’ll access the web interface to complete the setup.
-
Access the Control Panel URL: Open your web browser and navigate to the URL provided by the installer (e.g.,
https://your_vps_ip_address:2087
for cPanel WHM orhttps://your_vps_ip_address:8443
for Plesk).- You will likely encounter a “Your connection is not private” or security warning because the panel uses a self-signed SSL certificate initially. Accept the risk and proceed.
-
Login:
- cPanel WHM: Use
root
as the username and your VPS root password. - Plesk: Use
root
as the username and your VPS root password.
- cPanel WHM: Use
-
Complete the Setup Wizard: Both cPanel WHM and Plesk will guide you through an initial setup wizard. This usually involves:
- Accepting End User License Agreements (EULA).
- Setting up administrative email addresses.
- Configuring nameservers (important for pointing domains to your VPS).
- Setting up a new administrative password (for cPanel, this is often done inside WHM after initial login).
- Entering your license key. If you purchased a license separately, you’ll activate it here. If your provider bundled it, it might be auto-detected.
Step 4: Post-Installation Security and Configuration
Even with a control panel, basic server security is still your responsibility.
-
Security Measures (within the control panel):
- cPanel WHM:
- cPHulk Brute Force Protection: Enable and configure this to block repeated failed login attempts.
- ConfigServer Security & Firewall (CSF): Install and configure this powerful firewall (often available as a plugin in WHM). It offers much more granular control than a basic OS firewall.
- SSH Password Authentication: While you might have disabled it manually in the CLI, ensure it’s off in WHM’s SSH configuration (SSH Password Auth).
- Two-Factor Authentication (2FA): Set up 2FA for your WHM root login.
- Security Advisor: Regularly run the security advisor in WHM for recommendations.
- Plesk:
- Plesk Firewall: Configure the built-in Plesk firewall.
- ModSecurity: Enable and configure this web application firewall.
- Fail2Ban: Plesk has integrated Fail2Ban; ensure it’s enabled for relevant services (SSH, web, mail).
- Security Advisor: Use the Plesk Security Advisor to check and improve security.
- cPanel WHM:
-
Create Your First Hosting Account (cPanel) / Subscription (Plesk):
- cPanel WHM: Go to “Account Functions” > “Create a New Account” to set up your first cPanel account for your website.
- Plesk: Go to “Subscriptions” > “Add Subscription” to create a new hosting subscription.
-
Point Your Domain: Update your domain’s DNS records at your domain registrar to point to your VPS’s IP address. If you’ve set up nameservers in WHM/Plesk, you’ll point your domain to those nameservers.
-
Install SSL Certificate:
- Both cPanel and Plesk offer easy ways to install free SSL certificates from Let’s Encrypt for your websites. This is critical for security and SEO.
- Also, consider securing the WHM/Plesk login itself with a valid SSL certificate (e.g., from Let’s Encrypt) rather than the self-signed one.
-
Regular Updates: While the panel might have its own update mechanism, also keep your underlying OS updated periodically using SSH commands, and monitor the panel’s internal update notifications.
-
Backups: Configure backup routines within the control panel. Most panels offer robust backup options to local storage or remote destinations.
By installing a control panel, you automate many complex server administration tasks, making your unmanaged VPS much more user-friendly. Remember to keep both your control panel and underlying OS updated for the best performance and security.