#Cube: certbot
Certbot runs from the bundled Python runtime; the cube only configures it and asks for certificates. DNS-01 challenges are answered by the BIND instance using the TSIG key the bind cube created.
In the panel: SSL, with the DNS-01 challenge answered through DNS Manager. Every write there is a task.
#Configuration
[certbot]config_dir = "/aegis/config/certbot"data_dir = "/aegis/data/certbot" # certbot --config-dirwork_dir = "/aegis/data/certbot/work"logs_dir = "/aegis/logs/certbot"email = "" # Let's Encrypt contact, asks at installpropagation_seconds = 30 # DNS-01 wait before validationrenew_days = 30 # renewal window used by keeper.cronrenew_interval = 21600 # how often the job checks (seconds)| Key | Default | Meaning |
|---|---|---|
config_dir | /aegis/config/certbot | cli.ini and rfc2136.ini |
data_dir | /aegis/data/certbot | lineages, live/<name>/ |
work_dir | …/work | temporary challenge files |
logs_dir | /aegis/logs/certbot | certbot logs |
email | empty | registration address; empty uses --register-unsafely-without-email |
propagation_seconds | 30 | pause before the DNS-01 validation |
renew_days | 30 | certificates with fewer days left are renewed |
renew_interval | 21600 | ssl-renew runs at most this often |
The TSIG key used for RFC 2136 updates comes from [dns] key_name in the bind section, not from here.
#Files
<certbot.config_dir>/├── cli.ini defaults: authenticator, dirs, key type, non-interactive└── rfc2136.ini RFC 2136 credentials (0600)<certbot.data_dir>/├── live/<name>/fullchain.pem, privkey.pem, cert.pem, chain.pem├── archive/└── renewal/#Commands
aegis cubes certbot configure # render cli.ini and rfc2136.ini, validateaegis cubes certbot issue example.comaegis cubes certbot issue example.com www.example.com shop.example.comaegis cubes certbot certificates#expose
aegis cubes certbot exposecube certbotinstalled /aegis/apps/tls/certbot/5.10cli.ini /aegis/config/certbot/cli.inicredentials /aegis/config/certbot/rfc2136.inicertificates 6published /aegis/bin/certbotconfigure reads the secret from <dns.config_dir>/keys/tsig.key; if the key is missing it says so instead of writing broken credentials.
issue accepts one or more names. All of them go to certbot as -d, so a single certificate covers the whole set. The certificate name is the first domain. Without certbot.email, issuance adds --register-unsafely-without-email.
The command prints the resulting names and path:
certificate for a.com, b.com, shop.b.com, www.a.com at/aegis/data/certbot/live/a.com/fullchain.pem#Prerequisites for issuance
bind is configured and running (aegis cubes bind configure, aegis keeper start);TSIG key;
_acme-challenge isdelegated to it).
#Full example
cd /etc/aegis./bin/aegis cubes bind configure./bin/aegis keeper start./bin/aegis cubes bind zone add example.com./bin/aegis cubes bind reload./bin/aegis cubes certbot configure./bin/aegis cubes certbot issue example.com www.example.com./bin/aegis cubes nginx configure./bin/aegis cubes nginx vhosts create --domain=example.com --domain=www.example.com --location=php-mvc./bin/aegis cubes nginx reloadVerification:
aegis cubes certbot certificatesecho | openssl s_client -connect 127.0.0.1:443 -servername example.com | openssl x509 -noout -subject -issuer -dates#Renewal
Renewal is not scheduled yet. Until keeper.cron exists:
./runtime/python/current/bin/certbot renew --config /aegis/config/certbot/cli.iniand reload whatever consumes the certificate (aegis cubes nginx reload, aegis cubes dovecot reload, …).