Sign inSign up

paneidos/certbot

By paneidos

Updated about 9 years ago

Certbot, automated

Image
0

440

paneidos/certbot repository overview

Intended for automation of the certificate request process.

  • Keep all challenges separate from your document root: /var/www/certbot
  • Store all config in a specified folder: /srv/certbot
  • Store all logs in a specified folder: /var/log/certbot

nginx config

server {
        # your own config
        location /.well-known/acme-challenge {
                root /var/www/certbot/$host/;
                # If you want a certificate with multiple domains, replace $host with something else
                # And use the same thing in the request command below
        }
        # if you need to redirect to the https version, you have to use a location block:
        location / {
                return 301 https://$host$request_uri;
        }
}

Request certificate

docker run --rm -v /var/www/certbot:/var/www/certbot -v /srv/certbot:/etc/letsencrypt -v /var/log/certbot:/var/log/letsencrypt paneidos/certbot certonly -q --agree-tos --webroot -w /var/www/certbot/your.domain.tld -m [email protected] -d your.domain.tld

Renew

test -f /srv/certbot/restart.txt && rm /srv/certbot/restart.txt
docker run --rm -v /var/www/certbot:/var/www/certbot -v /srv/certbot:/etc/letsencrypt -v /var/log/certbot:/var/log/letsencrypt paneidos/certbot renew -q --post-hook "touch /etc/letsencrypt/restart.txt"
test -f /srv/certbot/restart.txt && YOUR_WEBSERVER_RESTART_COMMAND

Tag summary

Content type

Image

Digest

Size

56.3 MB

Last updated

about 9 years ago

docker pull paneidos/certbot