certbot Guide

This is a guide for using the certbot tool. certbot will allow you to enable HTTPS in a simple way.

Requirements

To enable HTTPS you will need :

In this guide we will use nginx as our server.

Installation

To install certbot run the following script :

sudo apt-get update
sudo apt-get install certbot
sudo apt-get install python3-certbot-nginx

The certbot website will recomend you to use snap but this is not necesarry.

Usage

To use certbot you just need to do

sudo certbot --nginx

and follow the instructions.

Add subdomains

To add a subdomain (www, mail, …) you will need to use the -d (domains) option and the --expand option.

So to add the subdomains you do the following

sudo certbot -d (Comma-separated list of domains all your domains)  --expand

Example with the domain example.org:

sudo certbot -d example.org,www.example.org,sub.example.org --expand