02 - Upgrading CyberPanel

Upgrading CyberPanel

The following command can be used to upgrade to the latest version.

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

If using a sudo user rather than root, try this:

sudo su - -c "sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)"

Upgrading CyberPanel to a specific version

wget https://raw.githubusercontent.com/usmannasir/cyberpanel/<branch name>/cyberpanel_upgrade.sh
chmod +x cyberpanel_upgrade.sh
./cyberpanel_upgrade.sh

Replace with actual branch name from Github, branching schemes are described in our contribution docs.

During the installation process, you will be prompted to specify the version to which you wish to upgrade. Please enter the desired version in the following format: 2.3.3 for stable releases, or 2.3.4-dev for the development branch. Replace “version” with the specific version you intend to upgrade to.


Updates between official versions

Even when there hasn’t been a new version of CyberPanel officially released, there are always minor updates happening behind the scenes. In order to take advantage of these, you can upgrade CyberPanel at any time.

To see a list of updates, you can visit the CyberPanel github repo’s commit log: Commits · usmannasir/cyberpanel (github.com)

12 Likes

Should the OS/OLS be upgraded before/after Upgrading CyberPanel or does the sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh) command take care of everything?

Cyberpanel upgrade does take care of OLS update but not the OS updates automatically or via upgrade script. You will need to update your OS manually from SSH whenever you wish.

2 Likes

Please kindly help me

After upgrading with the above command,

I got the following error

x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -O0 -g3 -I. -I/usr/include/python3.8 -I. -I/usr/include/python3.8 -c -o main.o main.c
Cannot create temporary file in /tmp/: No space left on device
make: *** [: main.o] Aborted
cp: cannot stat ‘lswsgi’: No such file or directory
ln: failed to create symbolic link ‘/usr/sbin/ipset’: File exists
chown: cannot access ‘/usr/local/CyberCP/lib64’: No such file or directory
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 1247 0 0 0 0 0 0 --:–:-- 0:00:08 --:–:-- 0

now i have 503 ## Service Unavailable error.

what do I do

This is because your server has run out of space. Please check the server storage space left.

1 Like

Hello, I am trying to upgrade to 2.1 build 2 from 2.1 build 1 and I get this error

sudo sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
sh: 0: Can’t open /dev/fd/63
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0ub100 396 100 396 0 0 1903 0 --:–:-- --:–:-- --:–:-- 1903
(23) Failed writing body

Any suggestions please?
Cyberpanel from AWS market place

First run this command

sudo su - 

And after this command, run the Cyberpanel upgrade command and this should work.

2 Likes

When I ran the update command, it reported an error as in the attached image

How do I fix this error?

From where are you trying to execute this code?

You should login to server via SSH programs like Putty and run as root

to run as root, use this command

sudo su -

Then try the upgrade command mentioned here.

Hi, right now im getting “this site cant be reached” error when i am trying to login my cyberpanel. and when i am trying to upgrade
Traceback (most recent call last):
File “upgrade.py”, line 2684, in
main()
File “upgrade.py”, line 2680, in main
Upgrade.upgrade(args.branch)
File “upgrade.py”, line 2591, in upgrade
Upgrade.applyLoginSystemMigrations()
File “upgrade.py”, line 693, in applyLoginSystemMigrations
import sleep
ModuleNotFoundError: No module named ‘sleep’

this error occurs.
what is the issue? why cant i upgrade it?

Please try again and take screenshot of the error

Hi
In ubuntu 20.04 I got this error .

Even I used this document for upgarding : https://cyberpanel.net/docs/how-to-upgrade-your-cyberpanel-using-cyberpanel-cloud/#:~:text=To%20upgrade%20your%20cyberpanel%3A,which%20you%20want%20to%20upgrade.&text=On%20the%20Upgrade%20page%20just,update%20to%20and%20press%20upgrade.
But got error again

How can help me?

Any idea?
No one?

Não estou conseguindo atualizar
IMAGEM DO PUTY 2


meu cyberpanel alguem pode ajudar ?

If you are using AWS EC2 to host CyberPanel here are the steps you need to take to upgrade CyberPanel and OLS:

00: Log into your terminal using the PEM key you set up when creating the EC2 instance. (do not use the terminal within cyberpanel)

01: apt-get --with-new-pkgs upgrade
02: apt-get update
03: wget https://raw.githubusercontent.com/litespeedtech/openlitespeed/master/dist/admin/misc/lsup.sh
04: sudo su
05: sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)
06: reboot instance and all changes take effect
07: reissue SSL for host

1 Like

How do we automate this upgrade script over crontab? Thanks

1 Like

I am getting this error while trying to upgrade to 2.3.1, but my server has 50GB of space…

WatchDog for Pure-FTPd is gone , restarting...

WatchDog for Pure-FTPd has been started...
chown: cannot access '/usr/local/CyberCP/lib64': No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 14028    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
###################################################################
                CyberPanel Upgraded
###################################################################
root@vps:~#

Here is what is in the /usr/local/CyberCP folder:

I also found lib64 in /lib64 and /usr/lib64, though they’re surely different than what CP is looking for.

What can I do to diagnose and fix this issue?

1 Like

This directory is not needed, you can ignore.

1 Like

Thanks. So then what should I do to diagnose the fact that CyberPanel isn’t upgrading? I have run the upgrade script a few times, restarted the server etc… and it stays on 2.1.2

cd /usr/local/CyberCP
git status

do you see any files that are not tracked by git? if so remove those files and run upgrade again. Otherwise please contact our support will upgrade free for you as you have given much to this community.

1 Like