CloudPanel on a VPS: a website panel without a cPanel licence
cPanel and Plesk are convenient, but the licence costs money every month, often more than the VPS itself. For most small and medium sites there is a free alternative: CloudPanel. It is light and fast, and it does the common jobs from the browser: sites, databases, SSL, PHP versions, cron and backups. Here is what we learned while turning it into a ready-made environment for our clients.
What you get
- nginx + PHP-FPM, with a separate PHP version per site if you want
- MySQL or MariaDB, plus phpMyAdmin
- ready templates for WordPress, Laravel, Node.js, Python, static sites and reverse proxy
- free Let's Encrypt certificates in one click
- file manager, a separate SFTP/SSH user per site, cron jobs, logs
- the
clpctlcommand line, so everything can be automated without clicking
Requirements
- A clean OS: Debian 12 or Ubuntu 22.04/24.04. CloudPanel installs its own nginx, PHP and database, so don't install it on a server that already runs sites.
- At least 1 core, 2 GB RAM, 10 GB disk. 2 GB is fine for a few sites. For a busy shop, take more RAM.
- Ports 80, 443 and 8443 (the panel).
Installation
First make sure the server's hostname resolves. The installer stops if it is missing from /etc/hosts:
Code: Select all
hostname
grep "$(hostname)" /etc/hosts || echo "127.0.1.1 $(hostname)" | sudo tee -a /etc/hostsCode: Select all
curl -sS https://installer.cloudpanel.io/ce/v2/install.sh -o install.sh
sha256sum install.sh # compare with the hash in the docs
sudo DB_ENGINE=MARIADB_11.4 bash install.shMARIADB_11.4: the default database is not supported on every Ubuntu release. MariaDB 11.4 works everywhere and gave us no trouble. On a 2-core / 2 GB server the install took about 9 minutes.
Create the administrator RIGHT AWAY
This is the most important step, and many people skip it. After the install the panel is at https://SERVER-IP:8443. The browser will warn about the certificate. That is normal, the certificate is self-signed.Code: Select all
sudo clpctl user:add --userName=admin --email=you@example.com \
--firstName=First --lastName=Last --password='LONG-PASSWORD' \
--role=admin --timezone=Europe/Sofia --status=1
The first site
In the panel: Add Site → pick the type (WordPress, PHP, Node.js…) → domain → PHP version. CloudPanel creates a separate user for the site, its folder, the nginx config and the PHP-FPM pool. The same from the command line:
Code: Select all
sudo clpctl site:add:php --domainName=example.com --phpVersion=8.3 \
--vhostTemplate=Generic --siteUser=example --siteUserPassword='ANOTHER-PASSWORD'
sudo clpctl db:add --domainName=example.com --databaseName=example \
--databaseUserName=example --databaseUserPassword='THIRD-PASSWORD'
Three security tips
- Don't leave 8443 open to the whole world. Restrict it to your IP in the firewall, or use an SSH tunnel:
ssh -L 8443:localhost:8443 user@server, then openhttps://localhost:8443. - Turn on two-factor authentication for the admin (in your profile in the panel).
- One user per site. CloudPanel does this by itself, don't work around it. That way a hacked plugin on one site can't reach the others.
CloudPanel or plain nginx?
- CloudPanel: if you have several sites, want SSL, databases and PHP versions in a click, or will give access to a client or colleague.
- By hand (LEMP/LAMP): if you have one site, want full control and minimal overhead, or run an unusual setup.
With us it is ready when you order
When you order a Linux VPS (Debian or Ubuntu), pick the free CloudPanel environment. You get a server with CloudPanel installed and the administrator already created, so nobody can "steal" the first login. The first site works right away at <name>.vpsstorages.com with HTTPS, and the panel opens at <name>-panel.vpsstorages.com, no port and no tunnel. The passwords arrive in the order email.Do you use CloudPanel or another panel? Post here in the topic