Knowledgebase > Server Management > How to Install CloudPanel v2 on Ubuntu 22.04
How to Install CloudPanel v2 on Ubuntu 22.04
CloudPanel is a free, modern, and powerful open-source server control panel with a clean, easy-to-use interface. It's designed to be lightweight, incredibly fast, and secure. This guide will walk you through the complete installation process on a fresh Ubuntu 22.04 server.
Prerequisites
Before you begin the installation, make sure you have the following:
- A server running a fresh, minimal installation of Ubuntu 22.04.
- root access or a user with
sudo
privileges. - A registered domain name pointed to your server's IP address (optional but recommended for a production environment).
Don't have a server yet? Get a powerful NVMe VPS from VPS-SERVER HOST to get started. Our high-performance virtual private servers are perfect for hosting your websites and applications with CloudPanel.
Hardware Requirements
Ensure your server meets these minimum hardware requirements for CloudPanel to run smoothly:
- CPU: 1 vCore
- RAM: 2 GB
- Disk Space: 15 GB
Step 1: Prepare Your Server
First, connect to your server via SSH. Once logged in, it's crucial to update your system's package lists and upgrade any existing packages to their latest versions. This ensures that you have the latest security patches and dependencies.
sudo apt-get update && sudo apt-get upgrade -y
This command first updates the package index (apt-get update
) and then upgrades all installed packages to their newest available versions (apt-get upgrade -y
). The -y
flag automatically answers "yes" to any prompts.
Next, install the required packages for the CloudPanel installation, such as curl
, wget
, and unzip
.
sudo apt-get install -y curl wget unzip
Step 2: Run the CloudPanel Installation Script
CloudPanel provides a convenient installation script that automates the entire setup process. This script will install all necessary components, including a complete LEMP stack (Nginx, MySQL, PHP-FPM), and configure the firewall.
The following command downloads and executes the official CloudPanel v2 installer for Debian-based systems like Ubuntu.
curl -sSL https://installer.cloudpanel.io/ce/v2/install.sh | sudo bash
The installation process may take 10-15 minutes. During this time, the script will perform the following actions:
- Install essential packages and dependencies.
- Set up and configure Nginx, MySQL, and PHP.
- Install and configure CloudPanel.
- Secure the server by configuring the UFW (Uncomplicated Firewall).
Once the installation is complete, you will see a confirmation message with the URL to access your CloudPanel dashboard.
Step 3: Access CloudPanel and Create an Admin User
After the installation is finished, you can access the CloudPanel web interface by navigating to your server's IP address on port 8443.
Open your web browser and go to:
https://your-server-ip:8443
Since CloudPanel uses a self-signed SSL certificate initially, you will likely see a browser warning. You can safely proceed by accepting the warning.
The first time you access this URL, you will be prompted to create an administrator account.
[Screenshot: CloudPanel admin user creation screen]
Fill in the required fields to create your admin user:
- First Name: Your first name.
- Last Name: Your last name.
- User Name: Your desired username.
- Email: Your email address.
- Password: A strong and secure password.
- Time Zone: Select your time zone.
Once you have created the admin user, you will be redirected to the CloudPanel login page. Enter your newly created credentials to log in.
[Screenshot: CloudPanel login screen]
Step 4: Exploring the CloudPanel Dashboard
Welcome to your CloudPanel dashboard! From here, you can manage all aspects of your server.
[Screenshot: CloudPanel dashboard]
Here are some of the key features you can manage:
- Add a Site: Easily add a new website, whether it's a static site, a PHP application, or a Node.js project.
- Databases: Create and manage MySQL databases.
- Cron Jobs: Schedule automated tasks.
- Security: Configure firewall rules, manage SSL certificates, and set up IP and Bot blocking.
- Users: Create and manage FTP users and other system users.
For more detailed information on using CloudPanel, you can refer to the official CloudPanel Documentation.
Complete Installation Script
For a fully automated setup, you can use the following bash script. This script will update your server, install necessary packages, and run the CloudPanel installer.
#!/bin/bash
#
# CloudPanel v2 Installer for Ubuntu 22.04
#
# This script will update the server and install CloudPanel.
# It is intended for a fresh Ubuntu 22.04 installation.
# Ensure the script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root. Please use sudo." >&2
exit 1
fi
# Set frontend to noninteractive to avoid prompts
export DEBIAN_FRONTEND=noninteractive
# Update and upgrade the system
echo "--> Updating and upgrading the system..."
apt-get update && apt-get upgrade -y
# Install prerequisite packages
echo "--> Installing prerequisite packages..."
apt-get install -y curl wget unzip
# Run the CloudPanel installer
echo "--> Running the CloudPanel v2 installer..."
curl -sSL https://installer.cloudpanel.io/ce/v2/install.sh | bash
# Display completion message
echo "--> CloudPanel installation script has finished."
echo "You can now access CloudPanel at: https://your-server-ip:8443"
To use this script:
- Save the code to a file named
install_cloudpanel.sh
. - Make the script executable:
chmod +x install_cloudpanel.sh
. - Run the script with sudo:
sudo ./install_cloudpanel.sh
.
Ready to get started? Create a new server on VPS-SERVER HOST and install CloudPanel today!