Skip to content

Joomla!

The OpenLiteSpeed Joomla One-Click app is based on a standard Joomla image. Once you complete the setup, this Joomla + OpenLiteSpeed + LSCache image tends to be much faster than a regular Joomla image!

OpenLiteSpeed Joomla One-Click automatically installs OpenLiteSpeed, Joomla! and any dependences. It also automates initial setup for components like PHP OPCache to reduce the time it takes to optimize a web server.

Quick Start


Step 1.

Use the OpenLiteSpeed Joomla 1-Click App to create a Droplet with any plan you want. Click here to create an account and get a $100 Digital Ocean credit.

Use the "OpenLiteSpeed Joomla app" to create a server with any plan you want. Click here to create an account and get a $100 Vultr credit.

Use the "Deploy OpenLiteSpeed Joomla" to create a server with any plan you want. Click here to create an account

  1. Login to the Google Cloud Platform and click Launch a VM instance on Compute Engine. !gcp 1
Method 1. Through Subscribe
  1. Subscribe to Joomla
  2. Click Continue to Launch and Launch
Method 2. Through EC2 console
  1. Open the Amazon EC2 console
  2. Locate the product by searching for "Joomla With OpenLiteSpeed" from AWS Marketplace
  3. Click Select,Continue,Preview and launch (the default is the most recent version)
  1. Login to the Azure Portal and click Image Link.
  2. Click the GET IT NOW and Create buttons
  3. Choose any server plan you'd like to use, and create the server

Use the "Deploy OpenLiteSpeed Joomla" Simply go to hPanel and navigate to your VPS dashboard, select the Applications tab to create a VPS template with the desired CMS.

Step 2.

From a terminal on your local computer, connect to the server as root, like so:

ssh root@use_your_server_ip
ssh username@192.0.2.0

# Instead of using "username" to SSH with, you can find the right username here: 
# Google Cloud Platform > Project > Compute Engine > Metadata > SSH Keys > Username
ssh ubuntu@192.0.2.0
ssh azureuser@192.0.2.0

Be sure to substitute the server’s public IP address for 192.0.2.0. You can also use Cloud Console if the platform is supported.

Step 3.

An interactive script that runs will prompt you for your domain or subdomain:

Please input a valid domain:
Please verify it is correct. [y/N]

Enter your root domain only. The system will automatically add the www subdomain as well.

Note

You can press CTRL+C and continue to SSH, but the prompt will open again the next time you log in. It will continue to do so until you finish the whole setup.

If your domain is already pointed to this server, you will have the option of automatically applying Let's Encrypt SSL. Enter y and your email address to complete the process:

Do you wish to issue a Let's encrypt certificate for this domain? [y/N]
Please enter your E-mail:
Please verify it is correct: [y/N]

Once finished, you should see Certificate has been successfully installed...

You can force HTTPS rules to be applied:

Do you wish to force HTTPS rewrite rule for this domain? [y/N]

Complete the process by pressing Y:

Do you wish to update the system which include the web server? [Y/n]

You should not be prompted to initiate this setup again.

Step 4.

Visit the Server’s IP or Domain in your browser to finish the Joomla installation Enter the name of your Joomla site, then click the Setup Login Data > button

!joomla1

Enter the real name, username and password, then click the Setup Database Connection > button !joomla2

Enter the DB username and password which you can get from the SSH console, then click the Install Joomla > button !joomla3

Congratulations! Your Joomla site is ready. !joomla4

We recommend using the LSCache plugin. Please see Install LSCache for Joomla when you're ready to get started with that.

Tip

OpenLiteSpeed and LSCache are a powerful combination for your Joomla site, right out of the box. Learn more about the LSCache plugin's settings.

Components


The CyberPanel One-Click Image installs several packages.

System Package Installation

Component Version
Linux Ubuntu 24.04
OpenLiteSpeed Latest from LiteSpeedTech Repo
Joomla! Latest from Official
MariaDB Latest from APT
PHP Latest from LiteSpeedTech Repo
phpMyAdmin Latest from phpMyAdmin
Certbot Latest from Certbot
Postfix Latest from APT

Other Actions

  • Enables the UFW firewall to allow only SSH (port 22, rate limited), HTTP (port 80) and HTTPS (port 443) access.
  • Sets the MySQL root password, runs mysql_secure_installation, and creates a Joomla user with the necessary permissions.
  • Modifies some PHP settings to increase the maximum filesize and execution time.
  • Enables the OpenLitespeed context to rewrite the .htaccess file so the Joomla permalink feature will work.

How to Access the Installed Software


SSH Access

From a terminal on your local computer, connect to the server as root, like so:

ssh root@use_your_server_ip
ssh username@192.0.2.0

# Instead of using "username" to SSH with, you can find the right username here: 
# Google Cloud Platform > Project > Compute Engine > Metadata > SSH Keys > Username
ssh ubuntu@192.0.2.0
ssh azureuser@192.0.2.0

Be sure to substitute the server’s public IP address for 192.0.2.0. You can also use Cloud Console if the platform is supported.

phpMyAdmin Access

!wpapp 3

Connect to phpMyAdmin at the following URL:

https://example.com/phpmyadmin

Get the MySQL root password:

sudo sed -n 1p .db_password
sudo sed -n 1p /home/ubuntu/.db_password
sudo sed -n 1p /home/ubuntu/.db_password

Get the MySQL joomla user password:

sudo sed -n 2p .db_password
sudo sed -n 2p /home/ubuntu/.db_password
sudo sed -n 2p /home/ubuntu/.db_password

Benchmark

Use the following command to test from a $5 plan server(ab) to a $5 plan server(DOMAIN)

ab -n 10000 -k -H "Accept-Encoding: gzip,deflate" -c 10 http://DOMAIN/

Requests per Second (The larger the number, the better)

Openlitespeed+LSCache
6892

Optional Setup


Install LSCache for Joomla

  1. From the Joomla Administration menu, navigate to System > Install > Extensions. !joomlag
  2. Add the following URL to the Install from URL tab, and press the Check & Install button to begin installation.
    https://github.com/litespeedtech/lscache-joomla/raw/master/Joomla4/package/lscache-latest.zip
    
    !joomlai
  3. The plugin will be installed and automatically enabled.

Enable HTTPS

Setting up an SSL certificate enables HTTPS on the web server, which secures the traffic between the server and the clients connecting to it. Certbot is a free and automated way to set up SSL certificates on a server.

Step 1. Register Domain

To use Certbot, you’ll need a registered domain name and DNS records:

  • An A record from the domain (e.g., example.com) to the server’s IP address

  • An A record from the domain prefaced with www (e.g., www.example.com) to the server’s IP address.

Step 2. Add Domain to Listener

Navigate to OpenLiteSpeed WebAdmin Console > Listeners, and add Your Domain to HTTP/HTTPS. !listener 1

Step 3. Certbot

Once the DNS records are set up, you can generate the SSL certificate. Be sure to substitute the correct domain name in the following command:

certbot certonly --webroot -w /var/www/html/ -d example.com -d www.example.com
If certificate verification is a success, you should find your certificate files stored in /etc/letsencrypt/

Step 4. Set SSL for HTTPS

!wpapp 7

Navigate to OpenLiteSpeed WebAdmin Console > Listeners > SSL, and edit the following three items:

  • Private Key File = /etc/letsencrypt/live/example.com/privkey.pem
  • Certificate File = /etc/letsencrypt/live/example.com/fullchain.pem
  • Chained Certificate = Yes

Save and perform a Graceful Restart.

Now your server should support TLS1.1, TLS 1.2, and TLS 1.3.

Step 5. Redirect HTTP to HTTPS

!wpapp 8

HTTPS traffic on port 443 is already allowed through the firewall. After you set up HTTPS, you can optionally rewrite all HTTP traffic to HTTPS.

Add the following rules to OpenLiteSpeed WebAdmin Console > Virtual Hosts > Rewrite > Rewrite Rules

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]

Frequently Asked Questions

How do I Reset my Web Server WebAdmin Password?

If you forget your password, you may run the following command to reset it:

/usr/local/lsws/admin/misc/admpass.sh

It will ask for the WebAdmin username, which should be admin. Then, enter your new password.

How do I Create Additional Virtual Hosts?

This method will automatically set up Listener/VirtualHost/Force SSL/Let's Encrypt.

Interactive mode

wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh
chmod +x vhsetup.sh
bash vhsetup.sh
Or just run the script without downloading it:
/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh )

CLI mode

wget https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh
chmod +x vhsetup.sh
bash vhsetup.sh -d www.example.com -le admin@example.com -f
Or just run the script without downloading it:
/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/vhsetup.sh ) -d www.example.com -le admin@example.com -f

  • Please be sure that your domain is already pointing to the server when using -le YOUR_EMAIL

By default, OpenLiteSpeed has an example virtual host already created. You can create more virtual hosts if you like. See Create Virtual Hosts on OpenLiteSpeed.

How do I upgrade OpenLiteSpeed to latest stable version?

OpenLiteSpeed was installed from the LiteSpeed repository, so you can simply use the system update to update OpenLiteSpeed to the latest stable version.

$ sudo apt update && sudo apt upgrade openlitespeed -y

How do I upgrade to LiteSpeed Enterprise?

This script will:

  1. Generate LiteSpeed Enterprise config file from OpenLiteSpeed config

  2. Backup OpenLiteSpeed config and uninstall OpenLiteSpeed

  3. Install LiteSpeed and load the config file

/bin/bash <( curl -sk https://raw.githubusercontent.com/litespeedtech/ls-cloud-image/master/Setup/ols2ent-v2.sh )

Note

We recommend you to run and test this script on a test server first. Get help by using the -H parameter for more information including how to revert back to OpenLiteSpeed if needed.

How do I Migrate Joomla?

Please see Joomla's official doc for migrating Joomla!.

How do I Verify if Cache is Working?

There's a simple way to see if a URL is cached by LiteSpeed: the LSCache Check Tool.

Or visit your website using Chrome. Navigate to Chrome menu > More tools > Developer tools > Network, or simply use the shortcut Ctrl+Shift+I to bring it up. The test page may contain many requests, but you can just click your main domain to check the header. You might see X-LiteSpeed-Cache: miss or X-LiteSpeed-Cache: hit. Normally the first visit to a page is a miss, but subsequent visits should be a hit.

How Does Certbot's Auto Renew Script Work?

The image comes with automatic certificate renewal by default in /etc/cron.d/certbot. An example of the cron job is:

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew

Once you finish the Let's Encrypt apply by prompt script, it will auto apply the server hook to the cronjob rule. An example of the cron job is:

0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --deploy-hook "systemctl restart lsws"

This cron job is triggered twice every day to renew the certificate. The certbot -q renew command will check if the certificate is expiring in the next 30 days. If it is, then certbot will auto renew the certificate quietly without generating output, and auto restart the web server by hook. If the certificate is not expiring, then no action will be performed. When renewing the certificate, the same information provided during certificate creation (such as email address, domain name, web server root path etc.) will be used.

What if the Certbot Deploy Hook is not Triggered?

If your certificate renewal is successful, but for some reason the deploy hook is not being triggered, you can run the following command. This will insert a restart lsws command into the Certbot cronjobs.

echo '0 0 * * 3 root systemctl restart lsws' | sudo tee -a /etc/cron.d/certbot > /dev/null

This particular example triggers a web server restart every Wednesday at Midnight. You can modify the 0 0 * * 3 part of the command to adjust the schedule, if needed.

How do I Fix a Too Many Open Files Issue?

The default system value is 1024. To increase the value to e.g. 65535, please append following content to the /etc/security/limits.conf file:

* soft     nproc          65535    
* hard     nproc          65535   
* soft     nofile         65535   
* hard     nofile         65535
root soft     nproc          65535    
root hard     nproc          65535   
root soft     nofile         65535   
root hard     nofile         65535
Then, add the following to the /etc/pam.d/common-session file:
session required pam_limits.so
To verify, run the ulimit -n command. Output should read 65535.

NOTE: 65535 is an example. Feel free to use a different value.

How do I use lsphp81?

Install PHP 8.1 and commonly used PHP extensions:

apt install lsphp81 lsphp81-common lsphp81-mysql lsphp81-memcached lsphp81-redis lsphp81-opcache lsphp81-curl lsphp81-imagick -y

Navigate to WebAdmin Console > Server Configuration > External App > lsphp, then update the following value:

  • Command: lsphp81/bin/lsphp

OpenLiteSpeed comes with PHP detached mode enabled by default. Restart PHP with command killall -9 lsphp to make these settings take effect.

How do I Set Up Virtual-Host-Specific PHP?

By default virtual hosts inherit the version of PHP that is set at the server level. You may wish to use a different PHP version for certain virtual hosts. Follow the steps below to set up virtual-host-level PHP. Here we will use the PHP version 7.4 as an example.

Install PHP 7.4 and commonly used PHP extensions:

apt install lsphp74 lsphp74-common lsphp74-curl lsphp74-imagick lsphp74-imap lsphp74-json lsphp74-memcached lsphp74-mysql lsphp74-opcache lsphp74-redis -y

Navigate to WebAdmin console > Server Configuration > External App > Add > Type > LiteSpeed SAPI App to set up a server-level external application. Set the following values:

  • Name: lsphp74
  • Address: uds://tmp/lshttpd/lsphp74.sock
  • Max Connections: 35
  • Environment: LSAPI_AVOID_FORK=200M
  • Initial Request Timeout (secs): 60
  • Retry Timeout (secs): 0
  • Command: /usr/local/lsws/lsphp74/bin/lsphp
  • Instances: 1

Navigate to WebAdmin console > Virtual Hosts > your vhost > Script Handler > Add to add a virtual-host-level PHP handler. Set the following values:

  • Suffixes: php
  • Handler Type: LiteSpeed SAPI
  • Handler Name: [Server Level]:lsphp74

OpenLiteSpeed comes with PHP detached mode enabled by default. Restart PHP with command killall -9 lsphp to make these settings take effect.

How do I get the Database Username and Password?

For first-time installation, you should see similar output from the SSH console, and the database username and password will be displayed there.

!joomlah

Once installation is complete this display will be gone. In this case, please see #logging-in-to-phpmyadmin

How do I Install VirtueMart?

  1. Download the official VirtueMart package, and choose the VirtueMart component, since we already have Joomla! installed.
  2. Unzip the downloaded file
  3. Go to Joomla Administration > Extensions > Manage > Install and install the following packages in this order:
    1. VirtueMart core component (com_virtuemart.w.x.y.zip)
    2. VirtueMart AIO component (com_virtuemart_ext_aio.w.x.y.zip)
    3. TCPDF component (com_tcpdf_x.y.z.zip)
  4. To display VirtueMart on the front page, navigate to Joomla Administration > Menus > Main Menu. Edit the Home page and change its type to VirtueMart. Save the changes and check the result.

API Creation

In addition to creating a Droplet from the Joomla 1-Click application using the control panel, you can also use the DigitalOcean API.

The following example creates an Joomla 20.04 Droplet called “My-Droplet” in the NYC3 datacenter, with 1 GB RAM:

curl -X POST "https://api.digitalocean.com/v2/droplets" \
        -d'{"name":"My-Droplet","region":"nyc3","size":"s-1vcpu-1gb","image":"litespeedtechnol-openlitespeedjoo-20-04"}' \
        -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json"

In addition to creating an instance from the WordPress with LiteSpeed Cache using the AWS Management Console, you can also use the AWS Command Line Interface.

The following example creates an t2.micro Instance with Drupal AMI:

aws ec2 run-instances --image-id ami-0d0c7877b76163063 \
                        --subnet-id subnet-XXXXXXX \
                        --security-group-ids sg-XXXXXXXXXXXXXX \
                        --count 1 \
                        --instance-type t2.micro \
                        --key-name XXXXXX \
                        --query "Instances[0].InstanceId"
Please replace XXX to your own settings.

Get the exact name of the Drupal image from LiteSpeed's project, gc-image-pub:

gcloud compute images list --project=gc-image-pub --filter="name ~ 'drupal'"

Create an instance, replacing INSTANCE_NAME with the name of your choice, and IMAGE_NAME with the name obtained from the previous command:

gcloud compute instances create INSTANCE_NAME --image-project=gc-image-pub --image=IMAGE_NAME