Intended for automation of the certificate request process.
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;
}
}
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
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
Content type
Image
Digest
Size
56.3 MB
Last updated
about 9 years ago
docker pull paneidos/certbot