Skip to content

LetsEncrypt SSL cert renewal using dedicated HTTP server and autorenewal script

License

Notifications You must be signed in to change notification settings

mihaellenic/letsencrypt-autorenew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

letsencrypt-autorenew

LetsEncrypt SSL cert renewal using dedicated HTTP server and autorenewal script

Quick Guide

  1. Run dedicated HTTP server
docker run --name letsencrypt-dedicated-http -v <path-to-challenge-folder>:/opt/challenge -p 80:80 -d mlenic/letsencrypt-dedicated-http
  1. Fetch SSL certificates
docker run -it --rm -v <path-to-letsencrypt>:/etc/letsencrypt -v <path-to-challenge>:/opt/challenge certbot/certbot certonly --webroot -w /opt/challenge -d <domain-name> --email <your-email> --agree-tos 
  1. Replace <path-to-letsencrypt> in renew.sh with LetsEncrypt path used in step #2
docker run -it --rm -v <path-to-letsencrypt>:/etc/letsencrypt certbot/certbot renew
  1. Setup automatic SSL certificates renewal (once a week)
$ crontab -e
* 10 * * 2 bash <path-to-renew.sh>

Notes

  • both challenge and letsencrypt folders should be empty before starting the steps
  • to fetch certificates for multiple domains just add another -d parameter in step #2
docker run -it --rm -v <path-to-letsencrypt>:/etc/letsencrypt -v <path-to-challenge>:/opt/challenge certbot/certbot certonly --webroot -w /opt/challenge -d <domain-name> -d <second-domain-name> -d <third-domain-name> --email <your-email> --agree-tos 
  • you can create your docker image with custom nginx configuration. Just update nginx.conf and build docker image from Dockerfile

Official CertBot documentation

https://certbot.eff.org/docs/

About

LetsEncrypt SSL cert renewal using dedicated HTTP server and autorenewal script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published