Last active
September 9, 2021 16:16
-
-
Save ramboldio/3bcc25e5e5192844670a757f2783f5ff to your computer and use it in GitHub Desktop.
Run Certbot in Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this folder needs to exist | |
mkdir ~/certs | |
# authenticate yourself (requires that nothing runs on ports 443 and 80) | |
docker run --rm -it -v ~/certs:/etc/letsencrypt -p 443:443 certbot/certbot certonly --authenticator standalone | |
# renewal | |
docker run --rm -it -v ~/certs:/etc/letsencrypt certbot/certbot renew |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for renew i need:
docker run --rm -it -p 443:443 -p 80:80 -v /etc/letsencrypt:/etc/letsencrypt certbot/certbot renew