Install Litespeed

Replace your web server with a better, faster one today.

LiteSpeed is a drop-in replacement for Apache.


If you don't know LiteSpeed, you can learn more here.

root@server ~ # bash <( curl https://get.litespeed.sh ) your_serial_no

FAQ


What exactly does this script do?

First, the script will ask for your input on several options, depending on your environment. Then, it will install LiteSpeed. If you are running cPanel or Plesk, you'll be offered the option of running LiteSpeed alongside your current web server, so you can switch between them, with no downtime. Otherwise, LiteSpeed will replace your current server.

Will this work with my control panel?

We have tested this installer with cPanel, Plesk, DirectAdmin, Hsphere, Interworx, Lxadmin, and ISPManager.

Will this work with my operating system?

LiteSpeed should work with any modern Linux distribution.

Automation


In most situations, running the installer script manually is sufficient. However, it is possible to automate the process for bulk provisioning. If you want to include the installer in your own scripts, you can provide a `lsws.options` file in the same folder as the installer. This will keep the installer from asking for user input when it runs. We've included some sample option files for popular control panels below.

root@server ~ # curl -o lsws.options www.your-link.com && bash <( curl https://get.litespeed.sh ) your_serial_no

lsws.options for cPanel


# This will register the server using the serial number specified and retrieve a license key. Inputting TRIAL will cause a trial key to be requested and installed.
serial_no="TRIAL"

# Available values are 0 (disable), 1 (enable), and 2 (user home directory only). Default value is 2.
php_suexec="2"

# Controls the Apache port offset. This allows you to run LiteSpeed in parallel with Apache to test it out. For example, if you set port offset to 1000, Apache will continue running on port 80 and LiteSpeed will run on port 1080. If port_offset is set to 0, LiteSpeed will be installed and set to use the same port Apache is currently using, but will not be automatically started after installation unless set to do so in a later parameter. When you are ready to replace Apache with LSWS as your main web server, simply stop Apache and start LiteSpeed (or use the Switch to LiteSpeed button in the WHM plugin). Default value is 1000.
port_offset="1000"

# Admin username for accessing the LiteSpeed WebAdmin Console. Default value is admin.
admin_user="admin"

# Admin password for accessing the LiteSpeed WebAdmin Console. Default value is a1234567.
admin_pass="a1234567"

# Admin email. This email address will receive important server notices, such as license expiration and server core dumps. Default value is root@localhost.
admin_email="root@localhost"

# EasyApache Integration, which is applied to EasyApache 3 only and is no longer applicable for EasyApache 4 as there is no need to “build a matching PHP” on EA4. For EasyApache 4, use the EA4 PHP rpms instead. Both 0 and 1 are valid values for EasyApache 4 LSWS installations. For EasyApache 3, easyapache_integration automatically rebuilds matching a PHP for LiteSpeed when you update EasyApache. Available values are 1 (enable) and 0 (disable). Default value is 1.
easyapache_integration="1"

#  Automatically switch to LiteSpeed Web Server at the end of the installation. This setting will only take effect if the port offset is set to 0. Available values are 1 (enable) and 0 (disable). Most users will need to test and verify before they switch, so the default value is 0 (disabled).
auto_switch_to_lsws="0"

#  Deploy LSCWP Automatically. Scans for Wordpress Websites on server and installs LSCache Plugin on them, Automatically sets up Cache Root. Available values are 1 (enable) and 0 (disable). Default value is 0.
deploy_lscwp="0"
Close example

lsws.options for Plesk


# This will register the server using the serial number specified and retrieve a license key. Inputting TRIAL will cause a trial key to be requested and installed.
serial_no="TRIAL"

# Available values are 0 (disable), 1 (enable), and 2 (user home directory only). Default value is 2.
php_suexec="1"

# Controls the Apache port offset. This allows you to run LiteSpeed in parallel with Apache to test it out. For example, if you set port offset to 1000, Apache will continue running on port 80 and LiteSpeed will run on port 1080. If port_offset is set to 0, LiteSpeed will be installed and set to use the same port Apache is currently using, but will not be automatically started after installation unless set to do so in a later parameter. When you are ready to replace Apache with LSWS as your main web server, simply stop Apache and start LiteSpeed (or use the Switch to LiteSpeed button in the WHM plugin). Default value is 1000.
port_offset="1000"

# Admin username for accessing the LiteSpeed WebAdmin Console. Default value is admin.
admin_user="admin"

# Admin password for accessing the LiteSpeed WebAdmin Console. Default value is a1234567.
admin_pass="a1234567"

# Admin email. This email address will receive important server notices, such as license expiration and server core dumps. Default value is root@localhost.
admin_email="root@localhost"

# Automatically switch PHP handlers for users and/or subscriptions inside of Plesk. 0 - Skip, don't change anything. 1 - Switch just the Users Handlers. 2 - Switch just the Subscriptions Default Handler. 3 - Switch both Users and Subscriptions Handlers.
auto_switch_php="0"

#  Automatically switch to LiteSpeed Web Server at the end of the installation. This setting will only take effect if the port offset is set to 0. Available values are 1 (enable) and 0 (disable). Most users will need to test and verify before they switch, so the default value is 0 (disabled).
auto_switch_to_lsws="0"
Close example

lsws.options for DirectAdmin


# This will register the server using the serial number specified and retrieve a license key. Inputting TRIAL will cause a trial key to be requested and installed.
serial_no="TRIAL"

# Default PHP version, this will be the first and default PHP version on your server. Available options are - 7.4, 8.0, 8.1.
php_version_default="8.1"

# Second PHP version, this will be the second PHP version on your server. Available options are - 7.4, 8.0, 8.1, no, Just enter no if you would like to not install a second PHP version.
php_version_second="no"

# Third PHP version, this will be the third PHP version on your server. Available options are - 7.4, 8.0, 8.1, no, Just enter no if you would like to not install a third PHP version.
php_version_third="no"

# Fourth PHP version, this will be the fourth PHP version on your server. Available options are - 7.4, 8.0, 8.1, no, Just enter no if you would like to not install a fourth PHP version.
php_version_fourth="no"
Close example