Install letsencrypt SSL certificate in Linux

 Install letsencrypt package in Ubuntu 22.04

Update the local package index

sudo apt update

Install certbot package for apache

sudo apt install python3-certbot-apache certbot 

Install certbot package for apache nginx

sudo apt-get install python3-certbot-nginx certbot

Command to generate letsencrypt SSL certificate for apache
sudo certbot --apache -d example.com -d www.example.com

Command to generate letsencrypt SSL certificate for nginx
sudo certbot --nginx -d example.com -d www.example.com

First, dry run to test SSL renwal
sudo certbot renew --dry-run

Renew lets encrypt SSL certificate
sudo certbot renew
sudo systemctl reload apache2
or,
sudo systemctl reload nginx

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment