Skip to content

Installation

Video

See a video demonstration of Set Up LiteSpeed Web Server on DirectAdmin here.

Prepare for the Installation

Obtain a License

Visit the LiteSpeed store to obtain a license.

You can get a Free Starter License if you are planning to host only a single domain and have a server with less than 2GB RAM. Other Licenses can also be purchased from the same link. If you are looking for a trial license and have a server with more than 2GB RAM and multiple domains, you can skip this step.

If you need help with choosing a License, visit our Choosing A License page.

Verify SSH and sudo Permission on Server

LiteSpeed Web Server requires you to have full root access to the server for the installation.

Remove any Previous Apache Replacements or Reverse Proxies

The CustomBuild Plugin will disable all the other Webservers(Apache/Nginx) installed on the server. If you have a custom setup, please manually uninstall any reverse proxies like Nginx over Apache or Nginx/Varnish before installing LiteSpeed Web Server.

Ensure all Websites are Working Well on Apache

Before installing LiteSpeed, you should make sure that your DirectAdmin installation is working fine with Apache. If this is a brand new server, you can add a test domain and remove it later.

Ensure that TCP 80,443 and UDP 443 are open in Firewall Configuration

In addition to TCP 80 and TCP 443, LiteSpeed uses UDP 443 for QUIC, which is one of the most popular features of LiteSpeed, and it and provides great benefits to your websites.

TCP 7080 is also used by LiteSpeed for its WebAdmin Console, and it requires a username and password to log in, which you will set during the installation. You should keep this port open to Administrative IP's only.

Installation

There are two ways to install LiteSpeed Web Server on your system: Detailed installation, and quick/automated installation.

Detailed Installation

This method is recommended if you are installing LiteSpeed for the first time. We will discuss each and every option that is presented during the installation process in detail.

LiteSpeed installation is easy and straightforward. Log in to your SSH server and run the following command, replacing your_serial_no with your License key:

bash <( curl https://get.litespeed.sh ) your_serial_no

This script detects your environment and downloads only the required dependencies and installation data from our servers. Depending on the environment, the script asks you for input to various questions. Finally, it installs LiteSpeed Web Server.

Tip

To use this script with a trial license, just replace your_serial_no with the word TRIAL (in all capitals), like so:

bash <( curl https://get.litespeed.sh ) TRIAL
This will automatically request a trial license for your server and install LiteSpeed Web Server on it. If you see an error while using the Trial License, Please refer to the FAQ.

Once you've started the script, it will detect that your installation is using DirectAdmin and will ask your input with the following prompts:

Could not find an lsws.options file

Could not find an lsws.options file. We will ask you for your preferred settings instead, but for automated bulk provisioning, you may want to exit and create an lsws.options file. Continue Installer(Y/N) ?

This is expected since this is the detailed installation process. lsws.options is for quick/automatic installation.

Press Y and Enter to proceed.

Default PHP version

php_version_default. Available options are - 7.2, 7.1, 7.0, 5.6.

This will be the first and default PHP version on your server.

Second PHP version

php_version_second. Available options are - 7.2, 7.1, 7.0, 5.6, no.

This will be the second PHP version on your server. Just enter no(without caps) if you would like to not install a second PHP version.

Third PHP version

php_version_third Available options are - 7.2, 7.1, 7.0, 5.6, no.

This will be the thrid PHP version on your server. Just enter no(without caps) if you would like to not install a second PHP version.

Fourth PHP version

php_version_fourth. Available options are - 7.2, 7.1, 7.0, 5.6, no.

This will be the fourth PHP version on your server. Just enter no(without caps) if you would like to not install a second PHP version.

PHP Version

After all of the values have been entered, the script will install LiteSpeed Web Server on your DirectAdmin server.

Once the installation is complete, you should see the following success message with a randomly generated password. You should save this password in a safe place. You can also change it later.

Install Final

If you encounter any problems during the installation, feel free to create a ticket with us, and we will be happy to help.

Quick/Automated Installation

This method uses shortcuts to automate the installation and deployement of LiteSpeed in the fastest possible way on DirectAdmin servers.

In most situations, running the installer script manually is sufficient. However, it is possible to automate the process for bulk provisioning. To do this you can create a lsws.options file and upload it to your organization's internal repo. This will allow the installer to pick up installation options directly from the file and will not ask for input from the user.

A default lsws.options file will looks like this:

php_version_default="7.2"
php_version_second="7.1"
php_version_third="no"
php_version_fourth="no"
If you do not understand what the other options mean, please go through the detailed installation process once.

You can create lsws.options and keep it on your local network for bulk provisioning, at a URL like yourlink.com/yourinternalrepo/lsws.options and then run the following command:

curl -o lsws.options yourlink.com/yourinternalrepo/lsws.options && bash <( curl https://get.litespeed.sh ) your_serial_no

Note

yourlink.com/yourinternalrepo/lsws.options is the link to your personalized lsws.options file which should be accessible to your servers.

lsws.options is the location of the lsws.options file. If you're running the installer from the same directory as your lsws.options file, Its fine to leave it exactly like that.

your_serial_no is the license key for LiteSpeed Web Server. You can also use TRIAL if you want to request a Trial License. If you see an error while using the Trial license, Refer to the FAQ.

Verify is LiteSpeed Web Server is Running

Navigate to DirectAdmin's Service Manager to check if LSWS is running.

Verify Running


Last update: May 29, 2024