There are three different methods for upgrading or downgrading your version of OpenLiteSpeed:
- LiteSpeed repository
- lsup.sh script
- Binary install
In order to avoid complications, always upgrade or downgrade using the same method you used to install OpenLiteSpeed originally.
**NOTE**: If you are using OLS on DirectAdmin, please don’t use any of these methods. Please see How to Upgrade OLS on DirectAdmin.
When installing OpenLiteSpeed through LiteSpeed repository, it is generally available in two branches: the stable branch, and the edge branch. The normal LiteSpeed repository only keeps versions of the stable branch available. For example, at the time of this writing, the latest OpenLiteSpeed version is 1.6.7, but only versions in the 1.5.x branch are available in the LiteSpeed repository. In order to upgrade to the latest version in the edge branch, you will need to enable the LiteSpeed edge tier repository. Otherwise, OpenLiteSpeed might be accidentally downgraded to the latest 1.5.x version if 1.6.x was previously installed through the binary install. (Reminder: binary install should not be mixed with repository installation, but it does sometimes happen accidentally).
Method 1: LiteSpeed Repository
If you installed OpenLiteSpeed through the LiteSpeed repository before, you should simply run the package update command.
yum update OpenLiteSpeed
You can downgrade to any specific version that the repository supports.
- Find all of the available versions from repository
yum --showduplicates list openlitespeed
- Run downgrade command with the version you need
yum downgrade openlitespeed-1.6.7
Debian & Ubuntu Upgrade
apt-get upgrade OpenLiteSpeed
Note: If you previously installed the OLS stable tier, and you wish to upgrade to the edge tier, please enable the LiteSpeed edge repo.
Debian & Ubuntu Downgrade
Downgrade to a version from the history list
- Find all of the installed available versions from apt
apt-cache policy openlitespeed
- Run downgrade command with the version you need
apt install openlitespeed=1.6.7-1+bionic
Downgrade to any specific version that the repository supports
- Search available OpenLitespeed versions from repository
- Download the specific version, e.g. openlitespeed_1.6.7-1+bionic_amd64.deb package
- Install the package
dpkg -i openlitespeed_1.6.7-1+bionic_amd64.deb
Method 2: lsup.sh Script
Note: Please don’t use the
lsup.sh script if you installed OLS through the LiteSpeed repository. In that case, you should continue to use package management commands to upgrade OLS.
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 through:
Note: If you wish to use lsup,sh, you must have installed OpenLiteSpeed via binary install or source code install. It cannot have been installed through
apt-get. If you did install OLS through
apt-get, you will need to uninstall it through package management, and reinstall through binary or source code installation before using lsup.sh.
./lsup.sh will update to the lastest stable version, and
./lsup.sh -d will update to the lastest 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.
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
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
Switch from Repo to Binary Installation
Most of the time, you should not need to switch from repo installation to binary or lsup.sh script installation, or vice versa. If you wish to do so for some reason, please do the following:
- Back up your entire OLS configuration.
- Uninstall OLS through
apt-get, as appropriate, to avoid accidentally downgrading in the future.
- Copy the OLS configuration backup to
- Download the latest binary package from https://openlitespeed.org/downloads/, unpack, and run
./install.sh. Alternately, you can use the