Join our Newsletter — 33% off our NHI Course
Home› Guides› step-ca Guide: Running a Private ACME CA for…
Guide Cloud & Workload Identity

step-ca Guide: Running a Private ACME CA for Internal TLS and SSH Certificates

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

A private ACME certificate authority can give every internal service and host a short-lived certificate without a ticket, but only if the CA itself is built and run as a tier zero system. step-ca is Smallstep's open source online CA: it issues X.509 certificates for TLS and mTLS and SSH certificates for users and hosts, and it speaks ACME (RFC 8555) so the same clients used with public CAs can request internal certificates. This guide covers how to deploy step-ca securely: root and intermediate key protection, choosing and restricting provisioners, certificate lifetimes and renewal, SSH certificates, database and high availability, and logging. It is written for platform, PKI and infrastructure engineers. For the wider design of an internal PKI, see the Private CA Design and Operations Guide; for the ACME protocol itself, see the ACME and Automated Certificate Management Guide.

This is an independent guide from NHI Mgmt Group, based on Smallstep's public documentation as of November 2026. It is not sponsored or reviewed by Smallstep. Product features change, so confirm settings against Smallstep's current documentation.

Key takeaways

  • Keep the root offline. Smallstep's production guidance says the root key is not needed for daily operation and should be stored offline, in at least two copies in separate locations, with the intermediate key in an HSM or KMS doing the routine signing.
  • Every provisioner is a door into the CA. step-ca authenticates requests through provisioners (JWK, OIDC, X5C, ACME, SCEP, K8sSA, AWS, GCP, Azure and others); remove the ones you do not use and restrict the rest with issuance policy.
  • ACME issues to anyone who passes a challenge. The docs warn that ACME provisioners issue to any client that completes a challenge by default, so pair them with an authority policy that limits names to your internal domains.
  • Short lifetimes replace revocation. step-ca's leaf default is 24 hours and its default revocation is passive (a revoked certificate cannot be renewed), so automated renewal at about two thirds of the lifetime is a hard requirement.
  • Use a shared SQL database for more than one instance. The default Badger database is not for multiple instances; production HA uses MySQL or PostgreSQL with synchronised configuration.

What step-ca provides

step-ca is an online intermediate CA with an HTTPS API. Clients authenticate to a provisioner, the CA checks the request against its claims and policy, then signs. It is designed for short-lived certificates, which is why its revocation model is different from a traditional enterprise CA such as AD CS (see the AD CS Security Guide for that model).

CapabilityWhat it doesTypical consumers
X.509 issuanceSigns TLS server, client and mTLS certificates from an online intermediateInternal web services, service meshes, databases, proxies
ACME serverExposes an RFC 8555 directory per ACME provisioner at https://<ca-host>/acme/<provisioner-name>/directoryStandard ACME clients, reverse proxies, Kubernetes cert-manager
SSH CASigns SSH user and host certificates when enableSSHCA is set (default false)Engineers, bastions, fleet hosts
Cloud and platform identityIssues certificates against AWS instance identity documents, GCP and Azure identity tokens, or Kubernetes service account tokensWorkloads that already hold a platform identity
Issuance policyAllow and deny rules for DNS, IP, email, URI and CN names, and for SSH principalsThe PKI owner, to cap what any provisioner can mint

Smallstep's documented defaults are worth knowing before you change anything: 24 hour leaf validity, a root with 10 year validity and path length 1, an intermediate with path length 0, ECDSA P-256 keys, one-time JWT tokens with a 5 minute lifespan, and TLS 1.2 to 1.3 on the CA's own listener. Each certificate issued is a machine credential: treat it within your machine identity programme, not as a networking detail.

Architecture and root key protection

The root signs the intermediate once; the intermediate signs every leaf. That split is the most important security decision in the deployment.

  1. Generate the root on an HSM or air-gapped device. Smallstep recommends exactly this. Keep at least two copies offline in separate locations, and consider Shamir's Secret Sharing to split the root password among trusted parties. Follow a witnessed ceremony as described in the Private CA Design and Operations Guide.
  2. Put the intermediate key in a cloud HSM or KMS. The intermediate is online by design, so its key should be non-exportable. See the HSM Deployment and Operations Guide.
  3. Change the intermediate password after initialisation with step crypto change-pass, and pass it to the service with --password-file, not on the command line.
  4. Keep secrets out of environment variables. The docs note that systemd exposes unit environments over D-Bus and docker inspect reveals container environments.
  5. Run as a dedicated user. Create a step system user that alone can read the configuration, keys and password file. To bind port 443 without root, grant CAP_NET_BIND_SERVICE with setcap. Smallstep's sample systemd unit runs as User=step with NoNewPrivileges=yes, ProtectSystem=full, ProtectHome=true, MemoryDenyWriteExecute=true and SystemCallFilter=@system-service (systemd 245 or later).
  6. Constrain names at the authority. Set authority.policy.x509.allow.dns to your internal suffixes and leave allowWildcardNames false unless you need wildcards. An allow rule for one name type denies the other types, so add ip or uri rules explicitly if you need them.
  7. Do not expose the CA to the internet. If remote clients must reach it, put only the needed endpoints (for example /1.0/sign or renew) behind a reverse proxy, and consider federation instead.

Distribute the root certificate to relying parties through device management or configuration management, never by asking users to accept it. The Certificate trust stores and root CA management guide covers that step.

Provisioners including ACME

A provisioner defines who may ask for a certificate and how they prove it. The choice should follow the identity the requester already holds.

ProvisionerAuthenticates withUse it forMain risk to control
JWK (default type)Short-lived JWT signed by the provisioner keyAutomation that can hold a provisioner password, one-off issuanceProvisioner password becomes a powerful secret; delete the default JWK provisioner if unused
OIDCIdentity provider login (for example Google, Okta, Microsoft Entra ID)User certificates, SSH user certificatesRestrict allowed domains or groups and admin emails
X5CAn existing certificate chaining to a configured rootDevices or services with a manufacturer or bootstrap certificateTrusting a root that also signs things you do not control
ACMERFC 8555 challenges (http-01, dns-01, tls-alpn-01; device-attest-01 when enabled)Servers and proxies with standard ACME clientsIssues to any client that passes a challenge
SCEPSCEP challengeNetwork equipment and MDM enrolmentNo challenge secret by default; legacy encryption default (DES-CBC)
K8sSAKubernetes service account tokenPods and in-cluster workloadsOver-broad service account token access
AWS, GCP, AzureInstance identity documents or identity tokensCloud VMsAll accounts or projects are valid if none are listed; custom SANs allowed unless disableCustomSANs is set
SSHPOPAn existing SSH certificateRenewing, rekeying or revoking SSH host certificatesLong-lived hosts that never rekey

Hardening the ACME provisioner

  • Limit names: apply the authority policy above. In self-hosted step-ca, policy applies at authority level; per-provisioner and per-ACME-account policy is described for Smallstep's hosted product.
  • Choose challenges deliberately: set challenges to only those you use. http-01 checks a value under /.well-known/acme-challenge on port 80, so anyone who can serve content on that name can pass it; dns-01 moves the trust to whoever can write TXT records, which makes DNS API credentials as sensitive as the CA. See the ACME vs EST vs SCEP comparison for protocol choice.
  • Use unguessable provisioner names where the directory is reachable from wider networks, as the production guidance suggests.
  • Device attestation needs scoping: enabling device-attest-01 with the apple or step formats creates trust in Apple or Yubico CAs; the docs warn it may issue for any such device unless policy restricts it to yours.
  • Account binding: as of November 2026 the ACME basics page describes External Account Binding as available in Smallstep's commercial CA software. In open source step-ca, rely on network reachability and name policy.
  • Concurrency: use an ephemeral account key per order or serialise orders on one account, as the docs recommend for HA deployments.

Kubernetes users typically point cert-manager at the step-ca ACME directory; secure that side with the cert-manager security guide.

Short-lived certificates and renewal

step-ca's model is that certificates expire before revocation matters. The revocation docs explain that revoking a certificate stops the CA renewing it, and the certificate stays valid until it expires, so lifetime is the exposure window.

Certificate typeDocumented default or guidanceConfigured where
X.509 leaf24 hours default; default maximum 24 hoursclaims: minTLSCertDuration, maxTLSCertDuration, defaultTLSCertDuration
User certificatesProduction guidance: about a day or lessProvisioner or authority claims
Host and service account certificatesProduction guidance: one month or lessProvisioner or authority claims
SSH host certificatesExpire in a month by defaultSSH host duration claims
Root CA10 yearsSet at step ca init
RenewaldisableRenewal false and allowRenewalAfterExpiry false by defaultClaims
  • Renew at two thirds: Smallstep recommends automated renewal at roughly two thirds of the lifetime. step ca renew authenticates with the existing key over mTLS; expired certificates are not renewed, so a host that is down past expiry must re-enrol through its provisioner.
  • Proxies: pass --mtls=false to step ca renew when a reverse proxy terminates TLS.
  • Active revocation when needed: enable the built-in CRL ("crl": {"enabled": true} with an idpURL), served on the insecureAddress at /1.0/crl, and add crlDistributionPoints to the intermediate and leaf templates. The docs warn this adds a dependency and handshake latency. Background on CRL and OCSP is in the Certificate Revocation Guide.

Decision guidance: keep passive revocation for workloads that renew daily. Turn on CRLs when certificates live longer than your tolerance for a stolen key (for example month-long host certificates), or when relying parties already check CRLs. Small teams with a single instance can run 24 hour leaves from day one; large estates often stage lifetimes down (30 days, then 7, then 1) as renewal automation proves itself.

SSH certificates

With enableSSHCA set, step-ca holds SSH user and host signing keys. Hosts trust user certificates through TrustedUserCAKeys in sshd_config, and clients trust host certificates through an @cert-authority line in known_hosts, which removes trust-on-first-use prompts. The protocol background is in the SSH Protocol and Certificate Authority Guide.

  • User certificates through OIDC: engineers log in to the identity provider and receive a certificate valid for hours, so offboarding in the IdP ends SSH access at the next expiry.
  • Always set principals: the docs state that if the list of principals is empty, sshd will allow authentication as anyone on the host. Map principals to role accounts and use policy.ssh.user.allow to cap them.
  • Write both policy halves: if user rules exist without host rules (or the reverse), the type without rules is always denied, so define policy.ssh.host.allow with your dns and ip ranges at the same time.
  • Renew host certificates: Smallstep shows a weekly scheduled step ssh renew --force for host certificates, with SSHPOP authenticating the renewal.

Moving from static keys is covered in SSH Keys vs SSH Certificates.

Operating and monitoring

Database and high availability

  • Single instance: the default Badger database is fine; back up its directory with the configuration.
  • Several instances: the docs say not to use Badger for multiple instances. Use "db": {"type": "postgresql"} or "mysql" with TLS in the DSN (for example sslmode or tls=true), enable remote provisioner management so instances share provisioner configuration, and keep ca.json identical across nodes (changes take effect after SIGHUP or restart).
  • Kubernetes: Smallstep documents horizontal scaling with its Helm chart. Keep the intermediate key in KMS so pods never hold it on disk.

Logging and audit

Set the logger format to json (the default is text) and ship the service log to your SIEM. Combine it with the database record of issued certificates, host audit logs for the step user and configuration change history. Treat CA administrators as privileged users under the Privileged Access Management Guide.

SignalWhy it matters
Issuance by provisioner, per hourA spike from one provisioner can mean a stolen provisioner credential or a runaway client
Names refused by policyRequests for names outside your suffixes show misconfiguration or probing
Changes to ca.json, provisioners or templatesAny change alters who can get what; route through change control
Renewal failures and certificates near expiryWith 24 hour leaves, a broken renewer becomes an outage within a day
Access to key, password file and KMS keyDirect evidence of attempts on the signing key (ATT&CK T1552.004 Private Keys, T1649 Steal or Forge Authentication Certificates)

Metrics: share of internal certificates issued through step-ca versus manual; median leaf lifetime; renewal success rate; number of active provisioners with a named owner; certificates issued outside policy (target zero); time to rotate the intermediate in a drill.

Common failure patterns

  • Leaving the default JWK provisioner and its password in place on a production CA.
  • An ACME provisioner with no authority policy, reachable from user networks.
  • Copying sample durations into production without checking they suit the renewal tooling.
  • Empty SSH principals lists, granting login as any user.
  • Running several instances on local Badger databases that drift apart.
  • Template edits that pass untrusted .Insecure values; the docs advise restricting templates and applying toJson to data.

Framework mapping

Control areaNIST SP 800-53 Rev 5NIST CSF 2.0
Root and intermediate key protectionSC-12 Cryptographic Key Establishment and ManagementPR.DS-02
Certificate issuance and trustSC-17 Public Key Infrastructure CertificatesPR.AA-02
Certificate and SSH credential lifecycleIA-5 Authenticator ManagementPR.AA-02
CA administrator rolesAC-5 Separation of DutiesPR.AA-02
Issuance and change loggingAU-2 Event LoggingPR.PS-04

Practitioner checklist

  • Root generated on an HSM or air-gapped device, two offline copies, password split among custodians.
  • Intermediate key in a KMS or HSM; password changed after init and supplied by file.
  • CA runs as the step user under a hardened systemd unit, not as root.
  • Default JWK provisioner removed or given its own password; every provisioner has an owner.
  • Authority policy restricts X.509 names to internal suffixes, wildcards off, SSH user and host rules both set.
  • ACME challenges limited to those in use; DNS API credentials for dns-01 treated as CA-grade secrets.
  • Leaf lifetimes set deliberately, renewal automated at two thirds, CRL enabled where lifetimes are long.
  • PostgreSQL or MySQL with TLS for any multi-instance deployment; configuration kept in version control.
  • JSON logs in the SIEM with alerts on issuance spikes, policy refusals and configuration changes.
  • Intermediate rotation and root restore rehearsed at least once a year.

Standards and references

Related NHI Mgmt Group resources: Private CA Design and Operations Guide, ACME and Automated Certificate Management Guide, Enterprise PKI Design and CA Hierarchy Guide, mTLS Guide, SSH Key Management Guide.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.