Aegis documentation

#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

toml
[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)
KeyDefaultMeaning
config_dir/aegis/config/certbotcli.ini and rfc2136.ini
data_dir/aegis/data/certbotlineages, live/<name>/
work_dir…/worktemporary challenge files
logs_dir/aegis/logs/certbotcertbot logs
emailemptyregistration address; empty uses --register-unsafely-without-email
propagation_seconds30pause before the DNS-01 validation
renew_days30certificates with fewer days left are renewed
renew_interval21600ssl-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

text
<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

bash
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

bash
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/certbot

configure 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:

text
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);
  • the zone of every requested name exists in BIND and allows updates with the
  • TSIG key;

  • the domain's NS records point to this server (or _acme-challenge is
  • delegated to it).

    #Full example

    bash
    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 reload

    Verification:

    bash
    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:

    bash
    ./runtime/python/current/bin/certbot renew   --config /aegis/config/certbot/cli.ini

    and reload whatever consumes the certificate (aegis cubes nginx reload, aegis cubes dovecot reload, …).