Skip to content

Upgrade or Downgrade OpenLiteSpeed

There are three different methods for upgrading or downgrading your version of OpenLiteSpeed:

  1. LiteSpeed repository
  2. lsup.sh script
  3. Binary install

To avoid complications, always upgrade or downgrade using the same method you used to install OpenLiteSpeed originally.

Warning

If you are using OLS on DirectAdmin, please don't use any of these methods. Please see How to Upgrade OLS on DirectAdmin.

Method 1: LiteSpeed Repository

Note

You will only have access to the stable versions of the software via the repository. For example, v1.8.x may be available on the edge branch, but you may only be able to access versions in the 1.7.x family from the repo until 1.8.x is considered stable.

If you wish to use a version from the edge branch, you will need to upgrade via lsup.sh.

If you installed OpenLiteSpeed through the LiteSpeed repository before, you should simply run the package update command.

Upgrade

 yum update openlitespeed
 apt-get upgrade openlitespeed

Downgrade

You can downgrade to any specific version that the repository supports.

  1. Find all of the available versions from the repository
    yum --showduplicates list openlitespeed
    
  2. Run the downgrade command with the version you need
    yum downgrade openlitespeed-1.7.16
    
  1. Find all of the installed available versions from apt
    apt-cache policy openlitespeed
    
  2. Run the downgrade command with the version you need
    apt install openlitespeed=1.7.16-3+bionic
    
  1. Search available OpenLitespeed versions from repository
  2. Download the specific version, for example, the openlitespeed_1.7.16-3+bionic_amd64.deb package
    wget https://rpms.litespeedtech.com/debian/pool/main/jammy/openlitespeed_1.7.16-3%2Bjammy_amd64.deb
    
  3. Install the package
    dpkg -i openlitespeed_1.7.16-3+jammy_amd64.deb
    

Method 2: lsup.sh Script

The lsup.sh script works similarly to the LiteSpeed Enterprise lsup.sh script, and allows you to upgrade or downgrade OLS to a particular version.

You can download the latest lsup.sh with the following command if /usr/local/lsws/admin/misc/lsup.sh does not exist:

wget https://raw.githubusercontent.com/litespeedtech/openlitespeed/master/dist/admin/misc/lsup.sh

Note

If you previously installed OLS through yum or apt-get, it's fine to upgrade to other versions with the lsup command.

Running ./lsup.sh will update to the latest stable version, and ./lsup.sh -d will update to the latest stable DEBUG version.

Additionally, these options are available:

Usage: lsup.sh [-t] | [-c] | [[-d] [-r] | [-v VERSION]] | [-e VERSION]
  -a
     Update web admin password
  -d
     Choose Debug version to upgrade or downgrade, will do clean like -c at the same time.
  -v VERSION
     If VERSION is given, this command will install the specified VERSION. Otherwise, it will get the latest version from /usr/local/lsws/autoupdate/release.
  -e VERSION 
     Upgrade/downgrade to specified VERSION without making any other changes. The version listed in /usr/local/lsws/VERSION does not change.
  -r 
     Restore the originally installed version which is in file VERSION.
  -p
     Restore the previously installed version which was renamed to .old files.
  -t
     To test openlitespeed running status.
  -c
     Do some cleanup and restart openlitespeed service.
  -h | --help     
     Display this help and exit.
  -g 
     Toggle DEBUG log

lsup.sh is not only a very powerful tool to upgrade/downgrade OLS, but also an installation tool if OLS has not yet been installed on the server.

Tip

To test a particular version temporarily, use the -e VERSION option, run your tests, and then use the -r option to restore the original version listed in /usr/local/lsws/VERSION.

Commonly used example:

/usr/local/lsws/admin/misc/lsup.sh -v 1.8.1

Method 3: Binary Install

If you installed OLS by downloading the package and running ./install.sh, you will need to do the same to upgrade. For example, you could upgrade from 1.5.x to 1.6.7 like so:

wget https://openlitespeed.org/packages/openlitespeed-1.6.7.tgz
tar -zxvf openlitespeed-*.tgz
cd openlitespeed
./install.sh

Note

Binary install should not be mixed with repository installation. If you'd like to switch to a different type of installation, see below.

Switch Method of Installation

Most of the time, you should upgrade or downgrade with the same method that you originally used to install OLS. If you need to switch to a different version for some reason, follow these steps:

  1. Back up your entire OLS configuration.
  2. Uninstall OLS using yum or apt-get, as appropriate for your OS, to avoid accidentally downgrading in the future.
  3. Copy the OLS configuration backup to /usr/local/lsws/conf/.
  4. Install OLS using your preferred method.

Last update: April 29, 2024