Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1.08 KB

letsencrypt.md

File metadata and controls

48 lines (30 loc) · 1.08 KB

Let's Encrypt and Certbot

How to deploy Let's Encrypt SSL certificates with Certbot.

Our infras have Certbot installed and auto renewal setup with Crontab.

Links

Commands

Note! We assume Certbot is installed to /opt/certbot and that Nginx is used.

List current certificates:

$ /opt/certbot/certbot-auto certificates

Create a new certificate:

$ /opt/certbot/certbot-auto certonly --webroot -w /var/www/example/ -d www.example.com

Renew a certificate:

$ /opt/certbot/certbot-auto renew --nginx

Create certificates without webserver (standalone)

$ systemctl stop nginx
$ /opt/certbot/certbot-auto certonly --noninteractive --standalone -d www.example.com -d api.example.com --expand

Known issues

When using basic auth, Certbot calls back to your server might get Access denied.

Solution is to let Certbot calls pass without basic auth:

You need to allow path ${webroot-path}/.well-known/acme-challenge with http (port 80) to pass always without basic auth.