Forcing Certbot to Renew an SSL Certificate

I just had to renew the letsencrypt SSL cert on my web site. Since I moved the site, the certbot configuration on the new server was invalid and the standard certbot command didn’t work.

Here is the solution, in case you come across this problem.

$sudo certbot --force-renew --cert-name robertmunn.com

Certbot will take you through a few questions to verify the configuration you wish to update, then will issue a new certificate and configure your site with it. Don’t forget to restart your web server process to pick up the new configuration.

$ sudo systemctl restart nginx