Automatically renew Letsencrypt certificate with Certbot

https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache

Renew

$ sudo certbot renew

Generate wildcard certificate

$ sudo certbot certonly --manual --preferred-challenges=dns --email yourname@yourdomain.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.yourdomain.com