Certbot and Let’s Encrypt can automate the process to obtain/create and maintain/update a certificate to activate and manage HTTPS with simple commands. Using Certbot and Let’s Encrypt is free.
Installation (Raspberry Pi)
sudo apt-get update
sudo apt-get install certbot
Create the certificate for the websites
certbot -w /var/www/folder_of_the_website
example:
certbot -w /mnt/SD64GB/websites/www
or
certbot --apache

Renew certificates
certbot renew
or
/usr/bin/certbot renew
Tip: install a Cron task to renew the certificates automatically, every week for example
crontab -e
@weekly certbot renew
