Close Menu
  • Home
  • Life style
    • Beauty tips
    • Exercise & Training
    • Fashion
    • Healthline
  • Exploration
    • Celebrities
    • Business
    • Travel guides
    • Technology
  • Web tutorials
    • Hosting & Servers
    • Blogger guides
    • WordPress guides
  • English
    • Tiếng Việt
    • Hmong
    • English
Facebook YouTube X (Twitter) Instagram
Trending
  • Search Profile or Preferred Sources: Choose the Right Tool for Your Website
  • Set Up Brevo for WordPress: Verify Senders and Test SMTP Email
  • Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions
  • How to Create a Better-Looking Blogger Comment Box with CSS
  • Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort
  • How to Check Whether Yandex Has Indexed an Article
  • Set Yandex Site Region and Check How Your Website Appears
  • What to Prepare Before Connecting a Website to Yandex Webmaster
Facebook YouTube X (Twitter) Instagram
SaibABCSaibABC
Chú thích cho quảng cáo
  • Home
  • Life style
    1. Beauty tips
    2. Exercise & Training
    3. Fashion
    4. Healthline
    5. View All

    Build a Simple Skincare Routine Without Buying Too Many Products

    30/08/2026

    How to choose mineral sunscreen that does not leave a white cast

    30/08/2026

    What Does PDRN in Cosmetics Do? How to Read Advertising

    30/08/2026

    Skincare While Losing Weight: Keep Skin More Hydrated, Healthy, and Firm

    30/08/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Five-Minute Office Exercises: A Snack-Sized Movement Schedule

    30/08/2026

    Strengthen Your Core with 12 Exercises from Beginner to Advanced

    30/08/2026

    Fashion Digital Product Passport: What Can You Read?

    30/08/2026

    Build a Minimalist Wardrobe in 2026: Buy Less, Wear Longer

    30/08/2026

    Winter Travel Fashion: Stylish Outfits for Men and Women

    22/12/2023

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026

    Amazfit’s Lactate Threshold Update: Use the Data to Run at the Right Effort

    28/09/2026

    Running in Hot Weather: Read WBGT and Know When to Stop

    19/09/2026

    Exercise With Atrial Fibrillation: How to Start and Progress Safely

    19/09/2026

    Suunto Run Heart-Rate Tracking After an Update: Check Your Zones Before Running

    19/09/2026
  • Exploration
    1. Celebrities
    2. Business
    3. Travel guides
    4. Technology
    Featured

    Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions

    By Nuj Coom29/09/2026
    Recent

    Samsung Galaxy S27 Ultra: 5,700mAh Battery, 60W Charging and Open Questions

    29/09/2026

    Samsung Galaxy S26 Ultra Review: What Makes It Worth Buying—and What Doesn’t

    16/09/2026

    iPhone 18 Pro Max vs Galaxy S26 Ultra: Which One Should You Choose?

    16/09/2026
  • Web tutorials
    1. Hosting & Servers
    2. Blogger guides
    3. WordPress guides
    4. View All

    Let’s Encrypt on Vultr: Enable HTTPS and Automatic Renewal

    09/09/2026

    Install WordPress on Vultr Manually: From Ubuntu to HTTPS

    08/09/2026

    Point Your Domain to a Vultr VPS and Verify the DNS Connection

    08/09/2026

    Set Up an Ubuntu VPS on Vultr: From Account Creation to SSH

    07/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    A 90-Day Blog Growth Plan: Write, Measure, and Improve

    26/09/2026

    Blogspot Maintenance: Fix Broken Links, Images, and Slow Pages

    26/09/2026

    How Does Google Find a Blog? The 3 Key Stages Explained

    26/09/2026

    Set Up Brevo for WordPress: Verify Senders and Test SMTP Email

    29/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026

    Set Yandex Site Region and Check How Your Website Appears

    26/09/2026

    What to Prepare Before Connecting a Website to Yandex Webmaster

    26/09/2026

    Search Profile or Preferred Sources: Choose the Right Tool for Your Website

    14/10/2026

    Set Up Brevo for WordPress: Verify Senders and Test SMTP Email

    29/09/2026

    How to Create a Better-Looking Blogger Comment Box with CSS

    28/09/2026

    How to Check Whether Yandex Has Indexed an Article

    26/09/2026
  • English
    • Tiếng Việt
    • Hmong
    • English
SaibABCSaibABC
Home»Web tutorials»Hosting & Servers»Install Let’s Encrypt on Ubuntu with OpenLiteSpeed
Hosting & Servers 6 Mins ReadNo Comments

Install Let’s Encrypt on Ubuntu with OpenLiteSpeed

Nuj CoomBy Nuj CoomUpdated:02/09/2026
Facebook Twitter Pinterest LinkedIn Tumblr Email
Chú thích cho quảng cáo

Contents

  1. Introduction to Let’s Encrypt
  2. Prerequisites
  3. Install Certbot on Ubuntu
  4. Obtain a Certificate Using the Webroot Method
  5. Configure the Certificate in OpenLiteSpeed
  6. Redirect HTTP to HTTPS
  7. Checking automatic Let’s Encrypt renewal
  8. Reloading OpenLiteSpeed after renewal
  9. Verifying that HTTPS is working
  10. Reference source

Introduction to Let’s Encrypt

Let’s Encrypt is an automated, open, and free certificate authority (CA) operated by the Internet Security Research Group (ISRG). Let’s Encrypt certificates currently have a default validity period of 90 days, so servers should be configured for automatic renewal rather than waiting for a certificate to expire (according to letsencrypt.org).

This article explains how to install a Let’s Encrypt TLS/SSL certificate on an Ubuntu server running OpenLiteSpeed with Certbot. You will obtain the certificate using the webroot, configure OpenLiteSpeed to use the certificate files, set up an HTTP-to-HTTPS redirect, and test automatic renewal.

Prerequisites

  • A supported Ubuntu server and an account with sudo.
  • OpenLiteSpeed installed and serving a website.
  • The domain and any subdomains for which you need certificates, such as example.com and www.example.com, pointing to the correct server IP address.
  • TCP ports 80 and 443 must be open in the firewall or your VPS provider’s security group. Let’s Encrypt must be able to reach the server to verify control of the domain.
  • The exact document root of the website, for example /var/www/html/example.com.

OpenLiteSpeed also now includes built-in ACME support for issuing and renewing certificates automatically. However, if you manage certificates with Certbot or want to retain your current workflow, Certbot can still be used independently (according to the OpenLiteSpeed ACME documentation).

Install Certbot on Ubuntu

Certbot recommends installing the software through Snap. If Certbot was previously installed from apt or a certbot-autopackage, remove the older version to avoid invoking the wrong program during renewal (according to the Certbot installation instructions).

sudo apt-get remove certbot
sudo snap install core
sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/local/bin/certbot

If the server does not have snapd, install and enable Snap by following the instructions for the Ubuntu version in use before running the commands above.

Chú thích cho quảng cáo

Obtain a Certificate Using the Webroot Method

With OpenLiteSpeed running on port 80, the webroot method is usually more suitable standalone because it does not require stopping the web server. Certbot creates a challenge file in the .well-known/acme-challengedirectory; Let’s Encrypt accesses this file over HTTP to verify the domain.

sudo certbot certonly --webroot 
  -w /var/www/html/example.com 
  -d example.com 
  -d www.example.com

Replace example.com and the -w path with your actual values. If the website has multiple domains that use different document roots, specify the -w option before each corresponding group of domains.

Do not block or incorrectly redirect the /.well-known/acme-challenge/path. Check the document root permissions and ensure that OpenLiteSpeed can serve files from this directory over port 80.

Important note

If port 80 cannot serve the website, you can use the standalonemethod, but you must stop OpenLiteSpeed first so that Certbot can temporarily use the port:

sudo systemctl stop lsws
sudo certbot certonly --standalone -d example.com -d www.example.com
sudo systemctl start lsws

Configure the Certificate in OpenLiteSpeed

After successful issuance, Certbot typically stores the certificate in the /etc/letsencrypt/live/example.com/directory. In the OpenLiteSpeed WebAdmin Console, go to Listeners > HTTPS > SSL or the virtual host’s SSL section, and set the following:

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

Ensure that the HTTPS listener is listening on port 443 and that the virtual host is mapped to the correct domain name. OpenLiteSpeed supports certificate configuration at either the listener or virtual-host level; virtual-host configuration takes precedence (according to the OpenLiteSpeed SSL documentation).

Save the configuration, then restart OpenLiteSpeed:

sudo systemctl restart lsws

Redirect HTTP to HTTPS

The certbot certonly command only obtains the certificate; it does not modify the OpenLiteSpeed configuration or enable an HTTP-to-HTTPS redirect automatically. You must configure the redirect at the virtual-host level or in the rewrite file loaded by OpenLiteSpeed.

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

To preserve the domain name originally requested by the user, you can use the appropriate server variable in your configuration instead of hard-coding example.com. After changing a rewrite rule, restart or gracefully restart OpenLiteSpeed to apply the configuration (according to the OpenLiteSpeed rewrite rule documentation).

Checking automatic Let’s Encrypt renewal

Certbot installed via Snap includes an automatic mechanism for checking and renewing certificates. The command renew handles certificates that are nearing expiration and can run periodically without forcing a renewal every time.

sudo certbot renew --dry-run

If the test command succeeds, check Certbot’s timer:

systemctl list-timers --all | grep -i certbot
sudo snap services certbot

Certbot typically uses a systemd timer or the scheduling mechanism provided by its package. You should not edit files directly in /etc/letsencrypt/renewal/ unless you have backed them up and verified the configuration with --dry-run.

Reloading OpenLiteSpeed after renewal

OpenLiteSpeed points to fixed paths in the directory /etc/letsencrypt/live/. After Certbot issues a new certificate, the server typically needs to be reloaded to use it. You can create a deploy hook that runs only after a successful renewal:

sudo tee /etc/letsencrypt/renewal-hooks/deploy/reload-openlitespeed.sh > /dev/null <<'EOF'
#!/bin/sh
systemctl reload lsws
EOF
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-openlitespeed.sh

If the system does not support reload for your service, use the restart command documented by OpenLiteSpeed:

sudo systemctl restart lsws

The deploy hook runs only after the certificate has actually been renewed. You can test the hook with certbot renew --dry-run; when you need to test the hook separately on a Certbot version that supports this option, add --run-deploy-hooks (see the Certbot User Guide).

Verifying that HTTPS is working

Check the website in a browser at https://example.com/. You should also verify the subdomain, redirect status, and certificate expiration date:

curl -I http://example.com
curl -I https://example.com
sudo certbot certificates

The expected result is that HTTP requests are redirected to HTTPS, while HTTPS requests return a normal response with a certificate matching the domain name. If the browser displays a certificate warning, recheck the paths fullchain.pem, privkey.pem, the virtual-host mapping, and when OpenLiteSpeed was last reloaded.

You have completed the installation of a Let’s Encrypt certificate on Ubuntu with OpenLiteSpeed and configured an automatic renewal process.

Read more: Improve Security and Performance with Ubuntu Server: Installation Guide

Reference source

  • Certbot Instructions
  • User Guide — Certbot 5.8.0 documentation
  • SSL | Security | OpenLiteSpeed Documentation | OpenLiteSpeed Documentation
  • Rewrite Rules | Configuration | OpenLiteSpeed Documentation | OpenLiteSpeed Documentation
  • Automatic SSL Certificates (ACME) | Advanced Configuration | OpenLiteSpeed Documentation | OpenLiteSpeed Documentation
  • Certificate Lifetime Rationale and Plans

Chú thích cho quảng cáo
Featured Let’s Encrypt OpenLiteSpeed Ubuntu
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticlePilot AI in 30 Days and Measure the ROI for Your Small Business
Next Article Protecting WordPress Against AI Bots and Unknown Crawlers
Nuj Coom
  • Website
  • Facebook
  • X (Twitter)
  • Instagram

I'm a doctor, for sure. But I also love writing and sharing knowledge, life experiences, web tricks, and useful lectures. Let's cheer for your passion.

Related Posts

The Blogger Roadmap, A to Z: From Empty Blog to a Platform Ready to Grow

23/09/2026

Bing Webmaster Tools for Beginners: Where to Start and How to Improve Your Website

23/09/2026

Let’s Encrypt on Vultr: Enable HTTPS and Automatic Renewal

09/09/2026
Add A Comment
Leave A Reply Cancel Reply

Latest posts

WHOOP Strength Training Detection: When to Trust It and When to Edit It?

Ubuntu Server 26.04: Initial Security Configuration Guide

Yandex Recrawling: When Should You Use IndexNow?

WebMCP for Websites: Turn an HTML Form into an AI Agent Tool

What Is LAMP Stack? Components, How It Works, and Alternatives

Advertisement
Chú thích cho quảng cáo

SUBSCRIBE TO UPDATES

Get the latest creative news from SaibABC.Com on web tips, design, and business.

Copyright © 2024. Designed by NujCoom.
  • Home
  • Contact
  • Privacy
  • Tiếng Việt
  • Hmong

Type above and press Enter to search. Press Esc to cancel.