– A guide for non-technical users
What is a VPS?
A VPS, or Virtual Private Server, is like having a condo in a building. Even though you share the building with others, you have your own space that you can decorate and use however you like. Similarly, a VPS shares a physical computer with other VPSs, but you get your own portion of that computer that no one else can touch. This gives you more control and room to do things compared to sharing a space, like in shared hosting, which is more like living in a crowded dorm room.
Typically, this does not come with a control panel like cPanel. You will have to install and set up everything from scratch, including control panels like cPanel or CyberPanel.
Most VPS providers offer CentOS as the default operating system installed on their servers. When you receive your VPS, it will already be running CentOS within a Linux environment. This setup is where you’ll need to install applications like CyberPanel.
This is a fresh VPS account with CentOS installed
What is a CyberPanel?
CyberPanel is a web hosting control panel, much like a dashboard that helps you manage websites on your server easily, without needing to use complex command lines. Think of it as a remote control for your TV, but instead of controlling a TV, it controls your server.
With CyberPanel, you can create and manage websites, set up and manage email accounts, handle domains, secure your websites with free SSL certificates, and more, all through a simple, user-friendly interface. This makes it an excellent tool for people who aren’t very technical but need to manage web hosting or servers.
If you look at the screenshot in the previous section, you can see there is no control panel to manage or create websites. Therefore, we will need to install CyberPanel.
Why CyberPanel? Not cPanel?
Choosing between CyberPanel and cPanel for managing a VPS can be compared to choosing between different types of remote controls based on what features they offer and how easy they are to use. Here’s a simplified explanation focusing on CyberPanel, especially considering its compatibility with LiteSpeed, Linux, and VPS:
CyberPanel:
- Compatible with LiteSpeed: CyberPanel is designed to work seamlessly with LiteSpeed Web Server. LiteSpeed is known for its speed and efficiency in delivering web pages, which can enhance the performance of your websites. This integration allows CyberPanel to take full advantage of LiteSpeed’s capabilities to serve web pages faster than traditional servers.
- Cost-Effective: Unlike cPanel, CyberPanel has a free version that is quite powerful and includes many features that are sufficient for most users. This makes it a budget-friendly option, especially for those just starting with VPS hosting.
- User-Friendly: CyberPanel is also designed with simplicity in mind. It has a modern, easy-to-navigate interface that makes it simpler for someone who may not be very technical. Users can manage their websites, databases, and email accounts without needing to delve into complex configurations.
- Runs on Linux: CyberPanel is built for Linux, which is the operating system most commonly used on VPS. Linux is known for its stability and security, which makes it a preferred choice for hosting environments.
cPanel:
- While cPanel is incredibly popular and widely used, it typically requires a license purchase, which can be quite expensive compared to free alternatives like CyberPanel. It also works well with LiteSpeed but doesn’t have as tight an integration as CyberPanel does specifically with LiteSpeed.
In summary, if you are using a VPS with Linux and LiteSpeed, CyberPanel offers a cost-effective, user-friendly, and well-integrated solution for managing your server and websites, making it a compelling choice over cPanel for many users, especially those looking for a budget-friendly option.
What is LiteSpeed?
LiteSpeed is a type of web server software, which is a program that helps deliver content from websites to your browser. Think of it like a waiter at a restaurant. When you order a dish, the waiter goes to the kitchen to get it and then brings it to your table. Similarly, when you request a webpage, LiteSpeed retrieves the website’s data (like text, pictures, and videos) and sends it to your internet browser so you can see the website.
LiteSpeed is known for being very fast and efficient, which means it can serve up web pages quicker than some other web servers. It’s particularly good at handling lots of visitors at the same time, making it a popular choice for websites that expect a lot of traffic or want to load quickly for their visitors.
For setting up CyberPanel on a VPS with Ubuntu and LiteSpeed, you’ll need to have a few prerequisites in place. Here’s a detailed list of what you should have ready before starting the installation process:
Prerequisites for Installing CyberPanel in LiteSpeed Server:
- A VPS with an Operating System Installed:
- Litespeed server can be installed on Linux kernels 3.0 or higher, CentOS 7 or later, Ubuntu 18.04 or later, Debian 9 or later, and FreeBSD 12.04 or later. However, the latest version of CyberPanel does not support CentOS 7 (as of the time I am writing this, Apr 2024). Therefore, for compatibility with both LiteSpeed and the latest CyberPanel, I am installing Ubuntu as my operating system for the VPS. You can refer to the following links for more information on the system requirements:
LiteSpeed requirements: https://docs.litespeedtech.com/lsws/#operating-system
CyberPanel requirements: https://community.cyberpanel.net/docs?topic=82
- Choose an operating system that is supported by both LiteSpeed and CyberPanel. Installing an OS in VPS hosting will not take much time as almost all the VPS plan backends have an option to install an OS with one click.
Option to install an OS in a famous VPS hosting plan backend
- Root Access:
- You will need root access to your VPS. This allows you to perform administrative tasks and install software. You should have the root username and password ready. You can find that in the email that you received during your VPS purchase.
- SSH Client:
- For Windows Users: Download and install an SSH client like PuTTY. This will allow you to securely connect to your VPS from your Windows computer. You can download PuTTY from https://www.putty.org/, but I will be using MobaXterm throughout this tutorial, which is available at https://mobaxterm.mobatek.net/. The Bash commands are the same for both.
- For macOS Users: macOS comes with a Terminal application that can be used to SSH directly into your VPS.
- Stable Internet Connection:
- A reliable internet connection is necessary to download CyberPanel and other necessary software updates during the installation process.
- LiteSpeed License (Optional):
- If you plan to use the enterprise version of LiteSpeed Web Server, you need to purchase a license. However, CyberPanel works with both OpenLiteSpeed, which is free, and the enterprise version of LiteSpeed.
- At least 2 GB of RAM:
- Your VPS should have a minimum of 2 GB of RAM to run CyberPanel effectively, although more may be recommended based on your expected server load and the number of websites you plan to host.
- Minimum 10 GB of Disk Space:
- Ensure that your VPS has at least 10 GB of available disk space. This is necessary to install CyberPanel and any websites or applications you want to host.
Once these prerequisites are in place, you can proceed with the installation of CyberPanel, setting up a stable and powerful hosting environment on your VPS.
Step 1: Connect to Your VPS
- For Windows Users: Use an SSH client like PuTTY or MobaXterm to connect to your VPS. Enter your VPS’s IP address and port, typically port 22 for SSH.
Start Local terminal in MobaXterm
- For macOS/Linux Users: Open the Terminal and use the SSH command:
ssh root@your_vps_ipssh root@your_vps_ip
- Replace your_vps_ip with the actual IP address of your VPS. So it will look something like this: ssh root@123.12.12.17
- Enter and it will ask for the password enter your password as well (these were the credentials you received during your VPS purchasing welcome email). It will ask if you want to save the password for this connection. Normally I do not save.
- After the successful connection, you will see it like this:
Step 2: Update the Packages
- For Ubuntu: Run this command: sudo apt update && sudo apt upgrade -y
- For Alma/Rocky:
yum check-update
yum update
Wait until the system finishes updating the packages. During this process, it may prompt you for confirmations and ask you to choose ‘yes’ or ‘no.’ Simply type ‘Y’ or ‘N’ and press the Enter key when prompted
Step 3: Run the Installation Script
Now that you are logged in to your server and updated the necessary packages you can install CyberPanel and LiteSpeed.
Type in the command below. It will start an automatic installation process. You’ll be asked some questions about which LiteSpeed version and extras you want to install. This command checks if curl is installed; if not, it tries wget to download and run the CyberPanel installation script.
sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)
Step 4: LiteSpeed Version
Choose the LiteSpeed version you want to install. If you choose LiteSpeed Enterprise, make sure you have a license key. While it’s free for one domain, you still need to get the key. Check the pricing table to decide on your preferred plan: https://litespeedtech.com/products
If you choose LiteSpeed Enterprise, you will be prompted to enter your serial number. If you don’t have a license, you can use a trial license by typing ‘TRIAL’ if the server hasn’t used one before.
I’m choosing OpenLiteSpeed because it’s sufficient for demonstrating the tutorial steps and is ideal for beginners.
Step 5: Select Options and Add-ons
You will be presented with a series of prompts for different options and add-ons that are available. These include:
- Full Service (default Y)
- PowerDNS: an open-source DNS server: https://www.powerdns.com/
- Postfix: an open-source mail transfer agent: https://www.postfix.org/
- Pure-FTPd: an open-source FTP server: https://www.pureftpd.org/project/pure-ftpd/
For all subsequent prompts, you can choose the ‘Default’ option. When prompted for the CyberPanel version, simply press the ‘Enter’ key to install the latest version. You don’t need to specify a particular version unless you have a specific requirement.
Step 6: Installation
The installation process will kick off automatically and will take approximately 5-10 minutes. The speed of your server will determine how quickly this will be completed.
By the end of the installation process, you will get the details to log in to your CyberPanel including your randomly generated Cyber Panel password.
Let’s say your IP address of the VPS is 12.12.12.21then your CyberPanel login URL will be 12.12.12.21:8090
You can log in there using the panel username and panel password that you get in the last step of the installation.
Step 7: Restart the Server
After entering the login details, you’ll be prompted:
Would you like to restart your server now? [y/N]:
Enter ‘y’ to restart immediately. Alternatively, you can enter ‘reboot’ later after completing any other desired operations.
Step 8: How to Confirm LiteSpeed was installed correctly or not.
- Log in to the cyber panel using the credentials you got by the end of the installation
- Scroll down to the section Server > Server Status
- Click on LiteSpeed Staus
- You can see your LiteSpeed server status there
If you’re still connected to SSH and want to use another one-liner of Bash code to check this, run the following command:
/usr/local/lsws/bin/lswsctrl status
This command will display the current status of the LiteSpeed web server. If LiteSpeed is running, it will show as “running”; if it’s stopped, it will show as “stopped”.
If you see any of these messages that means your VPS has LiteSpeed webserver now.
Congratulations! You have successfully installed CyberPanel on your Ubuntu or on the the OS you’ve selected with LiteSpeed. You are now ready to host your websites, set up email accounts, and much more. CyberPanel makes web hosting easy and efficient, even for non-technical users, while LiteSpeed helps deliver website resources faster.
Step 9: How to make the most from LiteSpeed Web Server?
Once you’ve successfully installed the LiteSpeed webserver along with CyberPanel, there are several steps you can take to ensure that you are making the most out of its capabilities. LiteSpeed is known for its performance and efficiency, especially in handling high traffic and reducing server load. Here are some recommendations to optimize and secure your setup. These steps may require further explanation for better understanding. I plan to create additional blog posts and tutorials soon to explain these concepts in an easier way for non-technical users
1. Enable LSCache
LiteSpeed’s caching solution, LSCache, is one of the most effective tools to enhance your website’s loading speed. If you are using CMSs like WordPress, Joomla, or Drupal, make sure to install the respective LSCache plugins for those applications.
You can read more here: https://docs.litespeedtech.com/lscache/
2. Optimize PHP Settings
Adjust the PHP settings through CyberPanel to match the needs of your applications:
- Increase memory_limit and upload_max_filesize if you’re running large applications or uploading big files.
- Adjust max_execution_time as per the requirement of your scripts.
3. Configure SSL/TLS
Securing your website with HTTPS is crucial. LiteSpeed makes it easy to set up SSL/TLS:
- Use the AutoSSL feature in CyberPanel which provides free SSL certificates from Let’s Encrypt.
- Ensure that all traffic is redirected from HTTP to HTTPS to secure all connections.
4. Set Up HTTP/3
LiteSpeed supports HTTP/3, the latest version of the HTTP protocol, which provides improved performance. Make sure it’s enabled to enhance the loading times for users on supported browsers.
5. Utilize Web Server Security Features
LiteSpeed has built-in security features that help protect your server:
- Configure ModSecurity, a web application firewall, to protect your websites from various attacks.
- Use the built-in anti-DDoS settings to mitigate the impact of distributed denial-of-service attacks.
6. Implement Content Delivery Network (CDN)
Integrating a CDN can significantly reduce the load on your LiteSpeed server and improve global access speeds:
- Set up a CDN like Quic Cloud or Cloudflare to serve static content (images, CSS, JavaScript) from locations closer to your users.
You can read further here: https://www.quic.cloud/
7. Enable GZIP/Brotli Compression
LiteSpeed supports both GZIP and Brotli compression. Enabling these can reduce the size of the data sent from your server to the user, which improves load times and reduces bandwidth usage.
8. Monitor Server Performance
Regular monitoring of your server’s performance can help identify potential issues before they become serious problems:
- Use LiteSpeed’s built-in monitoring tools to keep an eye on traffic, server load, and resource usage.
9. Keep Software Up to Date
Ensure that your LiteSpeed server, CyberPanel, and all applications (especially CMSs) are regularly updated to the latest versions. This helps in maintaining security and performance.
10. Configure Backups
Set up regular backups for your server to prevent data loss in case of hardware failure or security breaches. CyberPanel offers easy options for scheduling backups.
Implementing these steps will help you maximize the efficiency, performance, and security of your LiteSpeed webserver. Each step contributes to a robust and responsive web hosting environment, providing a better experience for both you and your visitors.
Ps:
If you’re interested in my expertise for your business or projects, or if you would like to hire me full-time or part-time you can reach me using the contact form located at the bottom of this site.