How to upgrade CyberPanel?

I was exploring the logs in CyberPanel and noticed these lines:
[NOTICE] [468614] [!!!UPDATE!!!] new stable version 1.7.16.0 is available.
[NOTICE] [468614] [!!!UPDATE!!!] current branch new version 1.7.16.0 is available.

From CyberPanel’s doc on upgrading, it says to do:

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

What does “sh <” do? the the commands inside () just a 2-line script?

But I am not sure if that’s all I the command I need to do… like should I “sudo -” and change to my home directory first like in @vasileios’s LMS tutorial 24?

Also, should I do a apt update/upgrade before upgrading CyberPanel?

Still so much to learn about Linux, scared to do this without understanding…

2 Likes

Hey @Ai!
Apologies for the delay. The last days toward the deadline were brutal. Hopefully, the storm has passed now. :slight_smile:

First things first, always do a sudo apt update && sudo apt upgrade -y prior to any installation. That’s to avoid any kind of dependency version mismatching.

The sh command executes a script that is not automatically set as executable. The way you found is basically the fastest one. Alternatively, you could just download the file with only the curl command, then turn it into an executable with the chmod +x command and then run it without the sh command.

The < symbol basically directs the curl command to throw the downloaded script back to the sh - so that it immediately triggers the execution.

And yes, before you execute the sh command, you will need to be root via the sudo su - command.

2 Likes

Thank you, @vasileios, especially when you have a deadline. :pray: Always appreciate the detail explanation!

Will give this a try on the less active web server first. :crossed_fingers:

1 Like

You are most welcome, @Ai! Have fun and ask if you need anything.

1 Like