I can’t remember how many times I searched for how to get certbot get certificate with docker and its always somewhere hard to find :-D

Here it is in more convenient place stashed so one can copy paste

docker run -it — rm — name certbot -v “/etc/letsencrypt:/etc/letsencrypt” -v “/var/lib/letsencrypt:/var/lib/letsencrypt” -p 443:443 -p 80:80 certbot/certbot certonly — standalone — preferred-challenges http -d mysite.com

This will put certificates in local drive and wont require intervention from command line.

computer user

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store