Securing Your Website: A Guide to Generating SSL Certificates with Certbot and Let's Encrypt"

Securing Your Website: A Guide to Generating SSL Certificates with Certbot and Let's Encrypt"

·

1 min read

Table of contents

No heading

No headings in the article.

how to achieve Certificate provided by letsencrypt.

You will be having a simple ubuntu webserver running

Here, let's install nginx in it.

first,

sudo apt update

install certbot

sudo apt install certbot python3-certbot-nginx

The following additional packages will be installed:

[python3-certbot-nginx]

python3-acme python3-certbot python3-configargparse python3-icu python3-josepy

python3-parsedatetime python3-requests-toolbelt python3-rfc3339

python3-zope.component python3-zope.event python3-zope.hookable

Suggested packages:

python-certbot-doc python3-certbot-apache python-acme-doc

python-certbot-nginx-doc

The following NEW packages will be installed:

certbot python3-acme python3-certbot python3-certbot-nginx

python3-configargparse python3-icu python3-josepy python3-parsedatetime

python3-requests-toolbelt python3-rfc333


Check the nginx running status,

sudo systemctl status nginx

If not enable and start the nginx server

sudo systemctl enable nginx && sudo systemctl start nginx

Now send request for certificate to issue from certbot

sudo certbot --nginx -d <domain name>

It’ll ask for email id, provide them, and agree! and that will send us the notification in email confirm it.

It’ll show a message in the cli itself as

Successfully received certificate, once we were provided with a certificate from letsencrypt.

Now edit the cron job of refreshing the certificate according to our need.with,

sudo crontab -e

Successfully deployed certificate for <domain name> to /etc/nginx/sites-enabled/def

Congratulations! You have successfully enabled HTTPS on https://<domain name>

Check now,