Skip to content

bxp acme renew

Get a new certificate for the names of one that is due.

Usage

Get a new certificate for the same names as an existing one, proving
the names again as "bxp acme issue" does.

It asks the CA when to renew (ACME Renewal Information, RFC 9773):
BastionXP CA says when a third of the lifetime is left, or at once for a
revoked certificate. A CA that does not say: when a third is left. So
run it every hour from a timer: it renews at the right moment by itself
(BastionXP CA's certificates last 24 hours by default, so daily is not
often enough). A certificate that has expired is renewed too.

A new key is made, of the same kind as the old one, and the key and
certificate files are replaced (keeping their owner and permissions).

Usage:
  bxp acme renew [flags]

Examples:
  sudo bxp acme renew --cert web.example.com.crt --key web.example.com.key \
      --exec "systemctl reload nginx"

Flags:
      --account-key string    file with the ACME account key; created if missing (default: acme-account.key next to --cert)
      --cert string           the certificate to renew
      --challenge string      how to prove the names: http-01 (port 80) or tls-alpn-01 (port 443) (default "http-01")
      --exec string           a command to run after a renewal, e.g. "systemctl reload nginx"
      --force                 renew now, whatever the CA suggests
  -h, --help                  help for renew
      --http-address string   where to listen for http-01. The CA always asks on port 80,
                              so another port only works if something forwards port 80 to it (default ":80")
      --key string            its private key
      --tls-address string    where to listen for tls-alpn-01. The CA always connects to port 443,
                              so another port only works if something forwards port 443 to it (default ":443")

Global Flags:
      --ca-url string      address of the CA server, e.g. https://ca.example.com:8443
                           (or BXP_CA_URL; default: the one saved by "bxp trust")
      --config string      path to the configuration file (default "bastionxp-ca.yaml")
      --directory string   address of the ACME directory of another CA, e.g. https://acme-v02.api.letsencrypt.org/directory
                           (default: the one of the server given with --ca-url). The CA's certificate is
                           checked against --root, or against the system's roots
      --root string        path of the CA's root certificate, root.crt
                           (or BXP_ROOT; default: the one saved by "bxp trust")

Parent command: bxp acme