![]() |
|
Guide Upgrade CyberPanel Safely: What the Upgrade Changed on Our Server (Tested) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Security Guides (https://adminsforum.com/Forum-cyberpanel-security-guides) +----- Thread: Guide Upgrade CyberPanel Safely: What the Upgrade Changed on Our Server (Tested) (/Thread-guide-upgrade-cyberpanel-safely-what-the-upgrade-changed-on-our-server-tested) |
Upgrade CyberPanel Safely: What the Upgrade Changed on Our Server (Tested) - JAY - 10-27-2026 Upgrade CyberPanel Safely: What the Upgrade Changed on Our Server (Tested) Sooner or later CyberPanel shows a yellow note on Version Management: Latest commit does not match, please upgrade CyberPanel. Ours said that even though both sides showed version 3.0, build 8: the code on GitHub had simply moved on. The upgrade itself is one command, but it rebuilds a lot: OpenLiteSpeed, ModSecurity, the panel's Python packages. So we did it properly on our test server (CyberPanel 3.0, Ubuntu 24.04, 4 websites, mail, fail2ban and lots of hand-made config changes from our other guides) and compared everything before and after. Short version: it took about 4.5 minutes, all sites came back, and none of our own config edits were overwritten. But the upgrade opened a new port (4190) to the whole internet, added two cron jobs and replaced the panel's SSL certificate. Details below. Step 1: Check what you have In the panel: Code: https://YOUR-SERVER-IP:8090/base/versionManagmentCode: git -C /usr/local/CyberCP log -1 --format='%h %cd'
git -C /usr/local/CyberCP branch
df -h /Code: v3.0.8Code: 324f18adCode: 12a529eeCode: b36940aadStep 2: Back up first The best backup is a snapshot of the whole VPS at your provider, if they offer it. That's the only "undo button" that really covers everything. On top of that (or if you have no snapshots), save the panel, the web server config and all databases: Code: mkdir -p /root/pre-upgrade && cd /root/pre-upgrade
tar czf cybercp.tgz /usr/local/CyberCP /usr/local/lsws/conf /etc/cyberpanel
mysqldump -uroot -p"$(cat /etc/cyberpanel/mysqlPassword)" --all-databases --single-transaction | gzip > all-db.sql.gz
ls -lhCode: /etc/cyberpanel/mysqlPasswordCode: $(cat ...)Step 3: Take a "before" picture This is the step most people skip, and the only way to know afterwards what the upgrade changed. Checksums of all config files that matter, plus cron, firewall and running services: Code: mkdir -p /root/pre
D='/usr/local/lsws/conf /etc/postfix /etc/dovecot /etc/fail2ban /etc/ssh'
find $D -type f -exec md5sum {} + | sort -k2 > /root/pre/conf.md5
md5sum /usr/local/lsws/lsphp*/etc/php/*/litespeed/php.ini >> /root/pre/conf.md5
crontab -l > /root/pre/cron.txt
firewall-cmd --list-all > /root/pre/fw.txt
systemctl list-units --type=service --state=running --no-legend | awk '{print $1}' > /root/pre/svc.txtCode: curl -s -o /dev/null -w '%{http_code}\n' https://yourdomain.com/Step 4: Run the upgrade The official command, as root: Code: sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
The end of the output: Step 5: Check that everything still works Right after the upgrade, same check as before: All 4 sites and the panel: 200. Code: lshttpd -vCode: openlitespeedCode: lscpdStep 6: What the upgrade changed 1. Config files: our edits survived. Code: mkdir -p /root/post
find $D -type f -exec md5sum {} + | sort -k2 > /root/post/conf.md5
md5sum /usr/local/lsws/lsphp*/etc/php/*/litespeed/php.ini >> /root/post/conf.md5
diff <(sort -k2 /root/pre/conf.md5) <(sort -k2 /root/post/conf.md5)Only side files changed: new Code: vhost.conf.txtCode: vhost.confCode: .txtCode: httpd_config.conf.dpkgCode: httpd_config.confCode: vhost.conf2. Services, cron and firewall: three surprises. Code: for f in svc cron fw; do echo "== $f"; diff /root/pre/$f.txt /root/post/$f.txt; done
3. Port 4190 (ManageSieve). Port 4190 is ManageSieve, part of the Dovecot mail server: Code: ss -ltnp | grep ':4190 '
grep -n 4190 /root/upgrade.logCode: P='port port="4190" protocol="tcp" accept'
firewall-cmd --permanent --remove-rich-rule="rule family=ipv4 source address=0.0.0.0/0 $P"
firewall-cmd --permanent --remove-rich-rule="rule family=ipv6 $P"
firewall-cmd --reload
firewall-cmd --list-all | grep -c 4190means the rule is gone. Dovecot still listens, so webmail on the same server can still use it locally. You can also delete the rule on the panel's firewall page (firewall guide). Check again after the next upgrade, it may add the rule back. 4. A new certificate for the panel. The panel itself also got a new certificate: Code: ls -l /usr/local/lscp/conf/*.pem
echo | openssl s_client -connect 127.0.0.1:8090 2>/dev/null | openssl x509 -noout -issuer -datesCode: cert.pemCode: key.pemCode: CN = www.example.comIf something breaks We didn't need it, but this is what the backups from Step 2 are for. A provider snapshot is the fastest way back. Without one: first read the end of Code: /root/upgrade.logCode: tarCode: all-db.sql.gzChecklist
More CyberPanel guides
Tested upgrading CyberPanel 3.0 (branch v3.0.8) on Ubuntu 24.04 with OpenLiteSpeed, October 2026. What an upgrade changes depends on the version you come from and the one you get; run the before/after check on yours. |