How to Install OpenLiteSpeed on Ubuntu 20.04 VPS
Are you looking to set up a fast and reliable web server? OpenLiteSpeed, the open source version of LiteSpeed Web Server, is a great choice because of its high performance and ease of use. This guide will show you how to install OpenLiteSpeed on Ubuntu 20.04 VPS, ensuring your server runs efficiently.
-
What is OpenLiteSpeed, and Why Should You Use It?
OpenLiteSpeed is the open-source version of LiteSpeed Web Server, known for its exceptional speed and efficiency. It is a lightweight, high-performance web server that offers easy management and advanced features, making it a preferred choice for developers and system administrators.
Key Advantages of OpenLiteSpeed:
- High Performance: Handles millions of simultaneous connections with remarkable speed.
- Built-in LiteSpeed Cache: Enhances page load times and optimizes website performance.
- HTTP/3 Support: Ensures faster data transfer compared to HTTP/2.
- Easy Configuration: Provides an intuitive and user-friendly interface for management.
- Free and Open Source: A cost-effective alternative to paid web servers.
With these features, OpenLiteSpeed is suitable for both small websites and large-scale systems requiring high-performance solutions.
Note: OpenLiteSpeed is configured to run under a non-root account by default. This ensures enhanced security by restricting excessive permissions for the service.
-
How to Install OpenLiteSpeed on Ubuntu 20.04 VPS
Follow these detailed steps to set up OpenLiteSpeed on your VPS:
Step 1: Log in to Your VPS
Access your Ubuntu 20.04 VPS using a non-root account with sudo privileges. If you don’t have a non-root user, create one and log in to proceed.
Don't have a VPS yet? Buy one from us - a trusted supplier.
Step 2: Update the System
Update your system to ensure compatibility and security before installation. Run:
sudo apt update && sudo apt upgrade -y
Step 3: Add the OpenLiteSpeed Repository
Add the official OpenLiteSpeed repository to your system since it’s not available in Ubuntu’s default repositories:
wget -O - https://repo.litespeed.sh | sudo bash
Step 4: Install OpenLiteSpeed
Install OpenLiteSpeed with the following command:
sudo apt install openlitespeed -y
Step 5: Set Admin Panel Credentials
Configure the username and password for OpenLiteSpeed’s admin panel:
sudo /usr/local/lsws/admin/misc/admpass.sh
- Choose a secure username and password (minimum 6 characters).
Step 6: Open Firewall Ports
By default, OpenLiteSpeed uses port 8088 for web traffic and port 7080 for the admin panel. Open these ports:
sudo ufw allow 8088
sudo ufw allow 7080
sudo ufw reload
Step 7: Verify OpenLiteSpeed Installation
Check if OpenLiteSpeed is running by accessing these URLs in your browser:
- Default Website: http://<your-vps-ip>:8088
- Admin Panel: http://<your-vps-ip>:7080
Log in using the credentials set in Step 5.
Step 8: Install PHP and MySQL (Optional)
If you need to run popular web applications like WordPress, install PHP and MySQL:
- Install PHP:
sudo apt install lsphp81 lsphp81-mysql -y
Configure OpenLiteSpeed to use this PHP version in the admin panel.
- Install MySQL:
sudo apt install mysql-server -y
Secure and configure MySQL as needed.
Step 9: Deploy Your Website
Upload your website files to the default directory:
/usr/local/lsws/Example/
-
How to Verify Installation and Check Version
-
Check Service Status:
Confirm OpenLiteSpeed is running with:
sudo systemctl status lsws
-
-
If OpenLiteSpeed is installed and running, you will see an active (running) status.
-
-
-
If not installed or the service has not started, the status will say error or not found.
-
If the service is not already running, you can start it with the command
sudo systemctl start lsws
- Check Version:
To verify the installed version, use:
sudo /usr/local/lsws/bin/openlitespeed -v
This command will display the current version of OpenLiteSpeed.
Conclusion
OpenLiteSpeed is a robust and efficient web server solution for Ubuntu 20.04. With this step-by-step guide, you can quickly install OpenLiteSpeed on Ubuntu 20.04 VPS.
If you encounter any issues or need assistance with your VPS, feel free to contact us for support. Start leveraging the power of OpenLiteSpeed today