Last active
November 4, 2017 12:00
-
-
Save markshust/ac5ddb553bb09b2d8e67967be34bc152 to your computer and use it in GitHub Desktop.
Let's Encrypt SSL certificate generation with Certbot and Docker
This file contains hidden or 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
| #replace foo.com and info@foo.com with your domain and email | |
| docker run --rm -p 80:80 -p 443:443 -v $(pwd)/certs:/etc/letsencrypt certbot/certbot certonly -d foo.com --standalone -m info@foo.com --agree-tos | |
| #create this cronjob to renew certificates | |
| @daily docker run --rm -v $(pwd)/certs:/etc/letsencrypt certbot/certbot renew | |
| #setup symlinks for use with nginx-proxy | |
| ln -s ~/certs/live/foo.com/privkey.pem ~/certs/foo.com.key | |
| ln -s ~/certs/live/foo.com/fullchain.pem ~/certs/foo.com.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment