Ubuntu: Updating Ubuntu and CloudPanel
Updated October 21, 2026
Overview
A PHP vulnerability has been reported that affects a number of servers. This guide will help update the Ubuntu VPS and the CloudPanel App.
Part 1: Ubuntu Update
Start the session
sudo apt install -y tmux
tmux new -s upgrade
Step 1: See what will change
sudo apt update
apt list --upgradable 2>/dev/null | wc -l
apt list --upgradable 2>/dev/null | grep -iE "php|nginx|openssh|linux-image|mysql|mariadb"
Step 2: Run the upgrade
sudo apt upgrade
If it asks about replacing a config file, choose to keep the currently installed version.
Step 3: Check whether a reboot is needed
ls /var/run/reboot-required 2>/dev/null && echo "reboot needed" || echo "no reboot needed"
If it says reboot needed:
sudo reboot
You can run the reboot from inside tmux; there is no need to detach first. The reboot ends your SSH connection and destroys the tmux session, which is fine because the upgrade has already finished. Wait a minute or two, then reconnect over SSH. Only reboot once apt upgrade has fully finished and returned to the prompt.
Step 4: Verify after the update
systemctl status nginx --no-pager
curl -sI https://yoursite.com/ | head -3
dpkg -l | grep -E "^ii\s+php[0-9.]+-cli"
A 522 from the site right after a reboot is normal for a minute or two while services start. Retry before worrying.
If your connection drops
Reconnect over SSH and reattach:
tmux attach -t upgrade
Useful tmux keys
- Detach without stopping the job: Ctrl+B, then D.
- Leave and close the session when done: type exit.
- List what is left if the session already ended: tmux ls.
Part 2: CloudPanel Update
Step 1: Start the session
tmux new -s clpupdate
If tmux is not installed, run sudo apt install -y tmux first.
Step 2: Run the update inside tmux
sudo clp-update
If it says "command not found", run ls /usr/local/bin | grep -i clp and check CloudPanel’s Update documentation.
Step 3: If your connection drops
tmux attach -t clpupdate
Step 4: When it finishes, check whether a reboot is needed
ls /var/run/reboot-required 2>/dev/null && echo "reboot needed" || echo "no reboot needed"
Reboot only if it says so (sudo reboot). Then close the session with exit.
Step 5: Verify afterwards
curl -sI https://yoursite.com/ | head -3
Then log in to the CloudPanel UI at https://your-server:8443 from your allowed IP and check that it loads.
