Build CyberPanel¶
Follow this guide to build a CyberPanel + OpenLiteSpeed image/template/snapshot.
Build Process¶
Launch a Server¶
Choose the Long Term Support version for the base image, e.g. Ubuntu 18.04.
Select a basic plan from the cloud platform.
Install CyberPanel¶
You can use a single command to install CyberPanel (with OpenLiteSpeed) easily. It is totally free and does not requires any kind of license.
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
CyberPanel
, OpenLiteSpeed
installation and then accept the default values for the rest of the questions. This installation may take around 8-12 minutes to finish.
Set up Welcome Banner¶
This is just a basic SSH console welcome message template. Update the content if you need to. This banner will do the following:
-
Check the public IP address
-
Show the CyberPanel URL
-
Display how to get panel login access
-
Display how to get SQL access
-
Check if the CyberPanel version is up to date.
For Ubuntu/Debian:
curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Banner/cyberpanel \
-o /etc/update-motd.d/99-one-click
chmod +x /etc/update-motd.d/99-one-click
For CentOS:
curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Banner/cyberpanel \
-o /etc/profile.d/99-one-click.sh
chmod +x /etc/update-motd.d/99-one-click.sh
systemctl restart sshd
Please verify the
MYIP
method captures the right IP for you
Install Upgrade Script¶
This script provides the system autoupdate function.
curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/domainsetup.sh \
-o /opt/domainsetup.sh
chmod +x /opt/domainsetup.sh
Install Launch script¶
This script will do the following:
-
Regenerate SSL Certificate
-
Regenerate Django secret key
-
Regenerate phpMyAdmin key
-
Regenerate SQL password
-
Regenerate CyberPanel password
-
Regenerate PowerDNS password
-
Regenerate pure-ftp password
-
Clean up passwords
-
Clean up SSH keys
-
Clean up logs
curl -s https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Cloud-init/launch.sh \
-o /opt/launch.sh
chmod +x /opt/launch.sh
/opt/launch.sh
This step may clean up all SSH access methods, which means once you exit the server, you will not be able to SSH back
Clean History Log¶
history -c
Remove Data (Optional)¶
Remove CyberPanel dummy data:
rm -f /home/cyberpanel.sh
rm -rf /home/install*
rm -rf /usr/local/CyberCP/.idea/
rm -f /etc/profile.d/cyberpanel.sh
To make the banner cleaner, you can remove some existing messages from it:
rm -f /etc/update-motd.d/00-header
rm -f /etc/update-motd.d/10-help-text
rm -f /etc/update-motd.d/50-landscape-sysinfo
rm -f /etc/update-motd.d/51-cloudguest
Test (Optional)¶
There are many functions on the CyberPanel image. You can try some basic tests to make sure the important functions are working fine. For example:
-
Build an image via the cloud platform's build function
-
Launch a new server with same image you just built
-
Check if both the
.db_password
and.litespeed_password
files generated on root or the/home/ubuntu
folder correctly -
Visit CyberPanel and try to access with the password found in the
.litespeed_password
file -
Create a domain and WordPress site
-
Try PHP parameter
-
Try to access phpMyAdmin
-
Try Mail Service
-
Try PowerDNS
-
Try FTP Service
-
Try Docker Service
-
Try Security Service
-
Try to switch OpenLiteSpeed to LiteSpeed Web Server
Maintenance¶
- Launch the server from the snapshot/template/image
- Upgrade system packages,
- For Ubuntu:
apt update apt -y upgrade apt -y dist-upgrade apt autoremove -y
- For CentOS:
yum update -y
- For Ubuntu:
- Upgrade CyberPanel
cd rm -f upgrade.py wget http://cyberpanel.net/upgrade.py python upgrade.py
- Install Launch script
- Clean history log
- Test (Optional)