RSS

How to install Let’s Encrypt SSL with auto-renewal – Ubuntu Server

23 Mar
  1. SSH into the ubuntu server.
  2. install snapd
    ==> sudo apt update
    ==> sudo apt install snapd
    to test if snapd installed correctly, do this:
    ==> sudo snap install hello-world
    hello-world 6.4 from canonical installed.
    ==> hello-world
    Hello world!
  3. update snapd.
    ==> sudo snap install core; sudo snap refresh core
  4. Remove any pre installed versions of certbot.
    ==> sudo apt-get remove certbot
  5. Install classic certbot with snap
    ==> sudo snap install –classic certbot
  6. Check if certbot is installed correctly.
    ==> sudo ln -s /snap/bin/certbot /usr/bin/certbot
  7. Generate and install certificate.
    ==> sudo certbot –nginx
    now follow the instructions from certbot to complete the installation.
    when finished. it will add necessory stuff to ngnix config file.
    it will also create a kron job that will renew the ssl before expiry.
  8. If needed use this to test if the auto renewal is working.
    ==> sudo certbot renew –dry-run

 
Leave a comment

Posted by on March 23, 2023 in Linux

 

Tags: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: