This guide will show you how to convert a server running DirectAdmin into an optimized high performance DirectAdmin + LiteSpeed Enterprise Web Server.
You will best use LiteSpeed Web Server, LiteSpeed Cache and LiteSpeed Cache Manager for DirectAdmin.
Install Litespeed enterprise for DirectAdmin
Setting Prepare for Installation License
Visit the LiteSpeed store to get the license.
You can get a Free Beginner License if you only host 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 Litespeed’s sales page .
Verify SSH and sudo permissions on the Server
LiteSpeed Web Server requires you to have root access to the settings on the server.
Remove any previous Apache Alternative or Reverse Proxy
The CustomBuild plugin will disable all other Website Servers (Apache/Nginx) installed on the server. If you have a custom setup, please manually uninstall Nginx via Apache or Nginx/Varnish before installing LiteSpeed Web Server.
Make sure all sites are working properly on Apache
Before installing LiteSpeed, you should make sure that your DirectAdmin installation is working properly with Apache. If this is a brand new server, you can add a test domain and remove it later.
Make sure 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 LiteSpeed’s most popular features, and it brings huge benefits to your web pages.
TCP 7080 is also used by LiteSpeed for its WebAdmin Control Panel and it requires a username and password for login which you will set during the installation process. You should keep this port open only to the Administrator’s IP.
Setting – Install Litespeed enterprise for DirectAdmin
There are two ways to install LiteSpeed Web Server on your system: Detailed installation and Quick and automatic installation.
Detailed settings – Install Litespeed enterprise for DirectAdmin
This method is recommended if you are installing LiteSpeed for the first time. We will discuss in detail each option presented during the installation process.
Installing LiteSpeed 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 required dependencies and installation data from our server. Depending on the environment, the script asks you to enter different questions. Finally, it installs LiteSpeed Web Server.
Tips
To use this script with a trial license, simply replace your_serial_no with the word TRIAL (all caps), like this:
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 get an error using the Trial License.
Once you have started the script, it will detect that your installation is using DirectAdmin and will ask for your input with the following prompts:
Cannot find file lsws.options
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 to be expected as this is a detailed installation process. lsws.options is for quick and automatic installation.
Press Y and Enter to continue.
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 type no (not capitalized) if you don’t want to 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 third PHP version on your server. Just type no (not capitalized) if you don’t want to 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 type no (not capitalized) if you don’t want to install a second PHP version.
Install Litespeed enterprise for DirectAdmin – After all values have been entered, the script will install LiteSpeed Web Server on your DirectAdmin server.
Once the installation is complete, you will 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.
If you encounter any problems during the installation, please create a ticket with us, and we will be happy to help.
Quick and automatic installation
This method uses keyboard shortcuts to automatically install and deploy LiteSpeed in the fastest way possible on the DirectAdmin server.
In most situations, manually running the installer script should suffice. However, it is possible to automate the bulk supply process. To do this, you can create an lsws.options file and upload it to your organization’s internal repo. This will allow the installer to get installation options directly from the file and will not require user input.
The default file lsws.options will look like this:
php_version_default="7.2" php_version_second="7.1" php_version_third="no" php_version_fourth="no"
If you don’t 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 mass licensing, 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 a link to your personalized lsws.options file, which is accessible to your server.
lsws.options is the location of the lsws.options file. If you are running the installer from the same directory as your lsws.options file, you should leave it as is.
your_serial_no is the license key for LiteSpeed Web Server. You can also use TRIAL if you want to request a Trial License.
Verify that LiteSpeed Web Server is running
Navigate to DirectAdmin’s Service Manager to check if LSWS is running.
In addition, you can refer to how to install Openlitespeed – a free but very effective webserver, and don’t forget to leave a comment below if you have any questions and troubles during the installation process.