02 - Upgrading CyberPanel

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

2 Likes

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

Thanks very much. No need for you guys to fix it for me! Also, if we can post the solution here, it will help others in the future.

Looks like everything is untracked… perhaps it happened when I was trying to develop the restic incremental backup stuff.

Is it safe to remove it all and upgrade again? Or run the CyberPanel Install script? Or uninstall CyberPanel and Reinstall? Something else?

Well yes if you are doing dev on this server this could have caused the issue, you need to remove the untracked files for upgrade to work.

1 Like

As you instructed, I removed the entire /usr/local/CyberCP folder, since every file/folder in that directory was untracked. But I got this error when I upgraded

Traceback (most recent call last):
  File "upgrade.py", line 15, in <module>
    from CyberCP import settings
ModuleNotFoundError: No module named 'CyberCP'
above command failed...
root@vps:/usr/local#

What do you recommend I do now?

Not everything, honestly I don’t know why even the CyberCP folder shows untracked in your case. Because there is CyberCP/settings.py file which contained db logins for CyberPanel.

This can be fixed, but since you are using this server for dev I can not comment on what changed.

Ok, I think I’ve somewhat solved this now.

I deployed a new VPS with CP v2.3.1 and then made a tar.gz of the /usr/local/CyberCP folder and sent it to my other server with rclone sftp and extracted it.

At first, it didn’t work, but then I went into /usr/local/CyberCP/CyberCP/settings.py and updated the database password with what is found from cat /etc/cyberpanel/mysqlPassword and it loaded again.

I was missing some folders from the original install, namely these.

  • .vscode
  • configservercsf
  • CyberPanelDev.code-workspace
  • debug
  • static
  • tmp

Obviously the vscode ones and tmp are irrelevant. I restored configservercsf by uninstalling and reinstalling CSF. Looks like debug isn’t important.

What is /usr/local/CyberCP/static?

Are there any other CyberPanel config files that would be important to check? Database details, system users, etc…?

Hi! I am running two servers with Cyberpanel. One with Ubuntu which has been upgraded fine and another with Centos 7.9 and although shows as upgraded but I see this error under https://myserver:8090/base/versionManagment:

Note: Latest commit does not match, please upgrade.

Current Commit : Unknown option: -C usage: git [–version] [–help] [-c name=value] [–exec-path[=]] [–html-path] [–man-path] [–info-path] [-p|–paginate|–no-pager] [–no-replace-objects] [–bare] [–git-dir=] [–work-tree=] [–namespace=] []

Although it shows 2.3.1 version

/usr/local/CyberCP/static contains static assets of CyberPanel like css and JavaScript files.

You are good to go.

1 Like

It seems on your Centos 7.9 you have old versions of git, can you upgrade the git versions of your server.