How to Install OpenLiteSpeed on Ubuntu 22.04

OpenLiteSpeed is a high-performance, open-source web server software designed to efficiently serve web content. It is the open-source version of LiteSpeed Web Server, which is a commercial web server known for its speed and performance. OpenLiteSpeed is a popular choice for web developers and administrators looking for a high-performance, open-source web server solution. It's particularly well-suited for websites and applications that require fast and efficient content delivery.

First, check for any pending system updates,

apt update

apt upgrade

Install OpenLiteSpeed

A shell script that will automatically carry out the necessary actions to add the Litespeed repository to Ubuntu's apt package manager is located on OpenLitespeed's server and can be fetched using wget. The | pipe is used to transfer the contents of the shell script to a fresh bash shell.

wget -O - | sudo bash


root@vps:~# wget -O - | sudo bash
--2023-08-19 19:28:07--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5591 (5.5K) [application/octet-stream]
Saving to: ‘STDOUT’

 -                                       100%[============================================================================>]   
5.46K  --.-KB/s    in 0.006s

2023-08-19 19:28:07 (883 KB/s) - written to stdout [5591/5591]

--2023-08-19 19:28:07--
Resolving (
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1198 (1.2K) [application/octet-stream]
Saving to: ‘/etc/apt/trusted.gpg.d/lst_debian_repo.gpg’

/etc/apt/trusted.gpg.d/lst_debian_repo. 100%[============================================================================>]   1.17K 
--.-KB/s    in 0s

2023-08-19 19:28:08 (124 MB/s) - ‘/etc/apt/trusted.gpg.d/lst_debian_repo.gpg’ saved [1198/1198]

--2023-08-19 19:28:08--
Resolving (
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2336 (2.3K) [application/octet-stream]
Saving to: ‘/etc/apt/trusted.gpg.d/lst_repo.gpg’

/etc/apt/trusted.gpg.d/lst_repo.gpg     100%[============================================================================>]   2.28K  --.-KB/s    in 0s

2023-08-19 19:28:08 (210 MB/s) - ‘/etc/apt/trusted.gpg.d/lst_repo.gpg’ saved [2336/2336]

LiteSpeed repository has been setup!

To make sure the recently added repository is checked out by the apt package manager, update the list of repositories

 apt update

Run the following command to install the OpenLitespeed server and related LiteSpeed PHP interpreter

apt install openlitespeed lsphp81

LSPHP 8.1 and the Openlitespeed server package are installed by this command. The LiteSpeed Server Application Programming Interface (LSAPI) is connected with the PHP interpreter known as LiteSpeed PHP (LSPHP).

You will safeguard the OpenLiteSpeed server by changing the default administrator account after it has been set up.

Setting the Administrative Password

Before testing the server, you should set a new password for OpenLiteSpeed Admin. The below command can help us with changing the password



root@vps:~# /usr/local/lsws/admin/misc/

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: Admin

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Retype password:
Administrator's username/password is updated successfully!

Status of Web Server

Use the following command to look up OpenLitespeed's status

systemctl status lsws


root@vps:~# systemctl status lsws
● lshttpd.service - OpenLiteSpeed HTTP Server
     Loaded: loaded (/etc/systemd/system/lshttpd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-08-19 19:29:06 UTC; 3min 23s ago
    Process: 29804 ExecStart=/usr/local/lsws/bin/lswsctrl start (code=exited, status=0/SUCCESS)
   Main PID: 29832 (litespeed)
     CGroup: /system.slice/lshttpd.service
             ├─29832 "openlitespeed (lshttpd - main)"
             ├─29841 "openlitespeed (lscgid)"
             └─29870 "openlitespeed (lshttpd - #01)"


You must first open specific ports on your firewall in order to access it through your browser. You may do this with the ufw command.

ufw allow 8088,7080,443,80/tcp


root@vps:~# ufw allow 8088,7080,443,80/tcp
Rules updated
Rules updated (v6)

Accessing OLS Dashboard

To access OpenLiteSpeed, open the URL from your web browser: http://server_domain_or_IP:8088


And to access OLS Dashboard, open the url http://server_domain_or_IP:7080

Username: Admin and Password would be the one set from previous step.