Article

Table of Contents
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

One-Click OpenLiteSpeed

Last Updated: Tue, Jul 7, 2020
One-Click Apps Web Servers

Introduction

Vultr's One-Click OpenLiteSpeed application is a ready-to-run Open Source edition of LiteSpeed Web Server Enterprise. Select a server location, choose the instance size, and click Deploy Now. Your web server is ready to use in about a minute. One-Click OpenLiteSpeed is available on either Ubuntu or CentOS.

To configure the server, locate two sets of user credentials on the Server Information screen. The root login (1), is used for console access. The User login (2) is used for web administration.

App Info

The examples oneclick.example.com and 192.0.2.123 are used throughout this guide. Substitute your server's domain name or IP address.

Let's Encrypt SSL Certificate

Most administrators use a domain name and valid SSL certificate for their site. If you use a free Let's Encrypt certificate, the certbot utility manages your certificate requests and renewals. See the certbot website for complete details.

  1. Register a domain name and create a DNS record for the server's IP address. Consult your DNS provider for instructions, or see our guide if using Vultr's DNS.
  2. Verify the DNS has finished propagation, and the name is visible throughout the internet before proceeding. Propagation usually happens quickly, but could take up to 48 hours in some cases.
  3. Connect to your server, with the root login (1) from the Server Information screen.

  4. Install Certbot for your OS.

    CentOS: Install the EPEL repo, then install certbot.

    # yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    # yum install certbot
    

    Ubuntu: Update the apt package database, add the certbot repository, then install certbot.

    # sudo apt-get update
    # sudo apt-get install software-properties-common
    # sudo add-apt-repository universe
    # sudo add-apt-repository ppa:certbot/certbot
    # sudo apt-get update
    # apt-get install certbot
    
  5. Install the certificate with certbot. The webroot-path /usr/local/lsws/Example/html is the default for OpenLiteSpeed. Replace the domain name and email with your values.

    # certbot certonly --webroot --redirect --agree-tos --no-eff-email \
       --webroot-path /usr/local/lsws/Example/html -d oneclick.example.com -m admin@example.com 
    

    Certbot should report success when finished.

  6. Navigate to https://oneclick.example.com:7080/. Proceed past the certificate warning. Log in with your User login (2).

  7. Click Listeners on the left menu.
  8. Click the Defaultssl entry.
  9. Click the SSL tab.
  10. Edit SSL Private Key & Certificate.
  11. Set Private Key File to: /etc/letsencrypt/live/oneclick.example.com/privkey.pem
  12. Set Certificate File to: /etc/letsencrypt/live/oneclick.example.com/fullchain.pem
  13. Click Save.
  14. Click your server name in the top-left corner, then click Graceful Restart.

Commercial SSL Certificate

You can use a Commercial SSL Certificate instead of the free Let's Encrypt certificate.

  1. Obtain a certificate from a certificate authority for your domain.
  2. Connect to your server, with the root login (1) from the Server Information screen.
  3. Replace the server.crt and server.key files in /usr/local/lsws/conf/ with the commercial certificate. Refer to your certificate vendor's documentation for details.
  4. Reboot the server.

    # reboot
    

App Details

Admin Portal

The admin portal for OpenLiteSpeed is located at https://oneclick.example.com:7080/ Log in with the User login (2) credentials from the Server Information page.

Web Document Root

The default document root is /usr/local/lsws/Example/html. You can create .php or .html files in that directory. The PHP file /usr/local/lsws/Example/html/donut.php is accessible at https://oneclick.example.com/donut.php.

MySQL

There is a MySQL database server running on the VPS. You can connect to the database by executing the following:

# mysql -u root

The MySQL root password is saved on the VPS in /root/.my.cnf.

Software Version

For debugging purposes, our support team may ask for your OpenLiteSpeed and OS version. Run the version.sh script.

# /opt/vultr/version.sh
    OS: '18.04.4 LTS (Bionic Beaver)'
    OpenLightSpeed: 'LiteSpeed/1.6.13 Open'

About One-Click Apps

One-Click apps are updated regularly without notice. When launching a One-Click app, you'll receive our latest version. We do not update deployed instances, and you are responsible for keeping the instance up-do-date. If you design an infrastructure based on One-Click apps and need to ensure the same app version in the future, take a snapshot of the initial deployment and create new instances from the snapshot.

Want to contribute?

You could earn up to $300 by adding new articles