This guide walks you through the full Certplane setup: running the broker, defining a certificate policy, enrolling a host with its identity certificate, and starting the agent renewal loop. By the end, your host will have a publicly trusted TLS certificate that renews automatically.Documentation Index
Fetch the complete documentation index at: https://certplane.kippel.org/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following in place:
- step-ca — A running step-ca instance reachable by your hosts. This is the internal CA that issues agent identity certificates.
- Let’s Encrypt access — The broker uses ACME to obtain public certificates. You need a valid email address for the ACME account.
- Cloudflare DNS token — Certplane uses the
dns-01challenge to prove domain ownership. Create an API token in your Cloudflare dashboard withZone:DNS:Editpermission for the relevant zone. - The Certplane binaries —
certplane-brokeron your broker host andcertplane-agenton each managed host.
Deploy the broker
The broker is the central server that enforces policy and obtains certificates from your public CA. Create Place your broker’s TLS certificate and key at the paths listed under The broker listens on
/etc/certplane/broker.yml:broker.yml
server.tls. The server.mtls.agent_ca_bundle must be the CA certificate bundle that signed (or will sign) your agent identity certificates — this is the step-ca root.Once the config file is in place, start the broker::8443 by default and requires mTLS from every connecting agent. For a full configuration reference, see Broker Setup.Create a policy file
The policy file defines which certificate profiles exist and which hosts are allowed to request each one. Create
/etc/certplane/policy.yml:policy.yml
- profiles — Each named profile sets the certificate type (
cert_type: wildcardorcert_type: multi), the DNS names to include, and the ACME challenge method (acme_challenge: dns-01oracme_challenge: http-01). - hosts — Each host entry maps a human-readable key to a host identity (the CN of the identity certificate issued by step-ca) and lists which profiles that host may request. The broker rejects any request for a profile not listed here.
Enroll your first host
Enrollment gives a host its identity certificate. The agent contacts step-ca once using a short-lived bootstrap token, generates a key pair locally, and stores the resulting Write the token to the host at the path you will reference in the agent config (e.g., Run enrollment:The agent generates
identity.crt.Generate a bootstrap token on your step-ca instance:/etc/certplane/agent/bootstrap-token).Create the agent config at /etc/certplane/agent.yml:agent.yml
identity.key locally, creates a CSR, and submits it to step-ca along with the bootstrap token. On success, identity.crt is written to the path defined in identity.cert.The bootstrap token is consumed during enrollment and cannot be reused. If enrollment fails and you need to retry, generate a new token from step-ca. See Agent Enrollment for troubleshooting.
Run the agent
Once the host is enrolled, start the renewal loop:On startup the agent:
- Generates a fresh
service.keyfor each certificate entry. - Constructs a CSR with the DNS names from your config.
- Connects to the broker over mTLS, presenting
identity.crtas the client certificate. - The broker verifies the identity, checks the policy, and either returns a cached certificate or requests a new one from Let’s Encrypt via ACME.
- The agent writes the certificate, chain, and full chain to the configured paths, then executes any
reload_commandyou specified.
renew_before time remains (default: 720 hours). For details on the renewal loop and systemd integration, see Running the Agent.