Server configuration
Flags, environment variables, TLS, ACME accounts and backup.
Command-line flags
| Flag | Default | Purpose |
|---|---|---|
--addr |
:8080 |
Listen address for API + web console |
--db |
certclm.db |
SQLite database path (all state lives here + acme-accounts/ beside it) |
--interval |
1m |
Renewal evaluation scan interval |
--acme-email |
— | Contact email for ACME account registration |
--acme-staging |
false |
Use Let's Encrypt staging directory for end-to-end testing |
--tls |
false |
Serve HTTPS with an auto-generated self-signed certificate |
--tls-cert / --tls-key |
— | Serve HTTPS with real certificate files |
Environment variables
| Variable | Purpose |
|---|---|
CERTCLM_ADMIN_PASSWORD |
Initial admin password. If unset, a random one is generated and printed to the log on first boot |
CERTCLM_MASTER_KEY |
AES-256-GCM key for encrypting stored secrets (DNS credentials, channel tokens, push-target keys). Back it up — losing it destroys all stored credentials |
CERTCLM_JWT_SECRET |
Session token signing key. If unset, derived from the master key so sessions survive restarts; set this only when sharing a DB backup's master key is not an option |
CERTCLM_EGRESS_STRICT |
1 rejects private/loopback IPs in configured outbound endpoints (push target api_base, webhook URLs, DNS provider base_url). Default off: intranet installs legitimately point at LAN addresses; enable for internet-facing deployments |
CERTCLM_ZEROSSL_EAB_KID / CERTCLM_ZEROSSL_EAB_HMAC |
External Account Binding for ZeroSSL |
CERTCLM_GOOGLE_EAB_KID / CERTCLM_GOOGLE_EAB_HMAC |
External Account Binding for Google Trust Services |
CERTCLM_ENABLE_EST / CERTCLM_ENABLE_SCEP |
Opt-in enrollment protocols (default off). Enroll endpoints need CERTCLM_EST_TOKEN/CERTCLM_SCEP_TOKEN, optional CERTCLM_*_DOMAINS suffix allowlist and CERTCLM_*_CLIENT_AUTH=1. Known limitation: SCEP PKIOperation accepts a bare PKCS#10 — the full CMS pkiMessage envelope, transactionID, and challengePassword are not implemented; real SCEP clients should use EST until that lands |
HTTPS_PROXY / NO_PROXY |
Standard Go proxy variables — ACME and push-target calls honour them |
TLS for the control plane
# real certificate (production)
./certclm-server --tls-cert /etc/ssl/certclm.crt --tls-key /etc/ssl/certclm.key
# quick self-signed (localhost + 127.0.0.1/::1 SANs, acts as its own trust anchor)
./certclm-server --tlsAgents verify the control plane with --ca <pem> (certificate pinning) — the self-signed PEM printed by --tls doubles as that pin. --insecure exists for development only.
Data layout
/var/lib/certclm/
├── certclm.db # all state: certs, nodes, creds (encrypted), audit log
└── acme-accounts/ # ACME account keys per CAEverything else is in the binary. Backup = certclm.db + acme-accounts/ + your CERTCLM_MASTER_KEY.
Keep the master key off the database volume. When CERTCLM_MASTER_KEY is unset, master.key is generated next to certclm.db — a backup of the volume then carries both ciphertext and key. Prefer injecting CERTCLM_MASTER_KEY from your secret store, or relocate master.key to a separately-backed-up, permission-locked path and symlink it.
Backup and restore
certclm-server --db /var/lib/certclm/certclm.db --backup /backups/certclm-$(date +%F).db--backup writes a consistent snapshot via SQLite VACUUM INTO — safe against a live database — and exits without starting the server. The snapshot carries ciphertext only: restore requires the same master.key / CERTCLM_MASTER_KEY that sealed it, plus acme-accounts/ for ACME reissuance. At startup the server also prunes audit log, push results and run history older than 90 days.
Master key rotation. There is no in-place rekey today. To rotate: back up, stop the server, delete master.key (or unset CERTCLM_MASTER_KEY), and restart — a fresh key is generated and all stored secrets (credentials, private keys) become unreadable and must be re-entered. Rotate the session signing key at the same time by clearing CERTCLM_JWT_SECRET if you had set it.
ACME accounts and EAB
Let's Encrypt needs only --acme-email. ZeroSSL and Google Trust Services additionally require EAB credentials from their consoles — supplied via the environment variables above so secrets never appear on the command line or in the database. The internal-ca provider is CertCLM's built-in private CA and needs nothing external.