Setup Let’s Encrypt SSL certificate using certbot on debian 9

Install certbot

"echo "deb http://ftp.debian.org/debian stretch-backports main" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install python-certbot-apache -t stretch-backports

Setup certbot

# setup certificate for chosen websites, force http to https
sudo certbot --apache

Simulate certificate renewal

sudo certbot renew --dry-run

Check if certbot cron entry is created

tail -1 /etc/cron.d/certbot