Step-CA Certificate Authority
Step-CA private certificate authority for internal TLS certificates.
[i]Overview
Step-CA is an open-source certificate authority server developed by Smallstep Labs that provides a modern, API-driven approach to managing X.509 certificates and SSH certificates. Unlike traditional heavyweight PKI solutions, Step-CA offers a lightweight, cloud-native certificate authority that supports ACME protocol, OAuth/OIDC integration, and programmatic certificate management through REST APIs. The platform was designed to address the complexity and operational overhead of traditional certificate authorities while providing enterprise-grade security features.
This Docker deployment creates a private certificate authority using Step-CA with ACME protocol support enabled, allowing automated certificate issuance and renewal for internal infrastructure. The configuration includes remote management capabilities through the Step CLI and web interface, making it suitable for organizations that need to manage TLS certificates across multiple services without relying on public certificate authorities. The ACME integration enables compatibility with tools like cert-manager, Traefik, and other automated certificate management systems.
This stack is ideal for DevOps teams, security engineers, and organizations requiring internal PKI infrastructure with modern management capabilities. Companies with microservices architectures, Kubernetes clusters, or internal web services will benefit from Step-CA's automated certificate provisioning and short-lived certificate approach, which reduces the risk associated with long-lived certificates and manual certificate management processes.
[*]Key Features
- [+]ACME protocol support for automated certificate issuance and renewal compatible with Let's Encrypt clients
- [+]REST API and CLI-based certificate management with support for X.509 and SSH certificates
- [+]OAuth/OIDC integration for identity-based certificate authentication and authorization
- [+]Configurable certificate templates and policies for controlling certificate attributes and validity periods
- [+]Built-in support for short-lived certificates with automatic renewal workflows
- [+]Remote management capabilities through Step CLI and web-based administrative interface
- [+]Hardware Security Module (HSM) and cloud KMS integration for root key protection
- [+]Certificate revocation lists (CRL) and Online Certificate Status Protocol (OCSP) support
[#]Common Use Cases
- [1]Internal PKI infrastructure for Kubernetes clusters requiring automatic TLS certificate management
- [2]Microservices environments needing mutual TLS authentication between service components
- [3]Development and staging environments requiring trusted certificates without public CA dependencies
- [4]Organizations implementing zero-trust network architectures with certificate-based authentication
- [5]Homelab and self-hosted service deployments requiring proper TLS certificates for internal domains
- [6]CI/CD pipelines requiring temporary certificates for testing and deployment automation
- [7]Enterprise environments replacing manual certificate processes with automated PKI workflows
[!]Prerequisites
- [!]Minimum 512MB RAM and 1GB disk space for certificate storage and CA operations
- [!]Port 9000 available for Step-CA HTTPS API and web interface access
- [!]Step CLI installed on management workstations for CA administration and certificate operations
- [!]Basic understanding of PKI concepts including certificate chains, root CAs, and ACME protocol
- [!]DNS resolution configured for CA hostname to ensure proper certificate validation
- [!]Backup strategy planned for CA private keys and certificate database in step_ca_data volume
[!]
WARNING: For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
[$]docker-compose.yml
[docker-compose.yml]
1services: 2 step-ca: 3 image: smallstep/step-ca:latest4 container_name: step-ca5 volumes: 6 - step_ca_data:/home/step7 ports: 8 - "9000:9000"9 environment: 10 - DOCKER_STEPCA_INIT_NAME=${CA_NAME}11 - DOCKER_STEPCA_INIT_DNS_NAMES=localhost,step-ca12 - DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT=true13 - DOCKER_STEPCA_INIT_ACME=true14 restart: unless-stopped15 networks: 16 - step-ca-network1718volumes: 19 step_ca_data: 2021networks: 22 step-ca-network: 23 driver: bridge[$].env Template
[.env]
1# Step-CA2CA_NAME=My Private CA[i]Usage Notes
- [1]CA at https://localhost:9000
- [2]Get root CA: docker exec step-ca step ca root
- [3]ACME enabled for auto-renewal
- [4]Use step CLI for management
- [5]Install root CA on clients
[>]Quick Start
[terminal]
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 step-ca:5 image: smallstep/step-ca:latest6 container_name: step-ca7 volumes:8 - step_ca_data:/home/step9 ports:10 - "9000:9000"11 environment:12 - DOCKER_STEPCA_INIT_NAME=${CA_NAME}13 - DOCKER_STEPCA_INIT_DNS_NAMES=localhost,step-ca14 - DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT=true15 - DOCKER_STEPCA_INIT_ACME=true16 restart: unless-stopped17 networks:18 - step-ca-network1920volumes:21 step_ca_data:2223networks:24 step-ca-network:25 driver: bridge26EOF2728# 2. Create the .env file29cat > .env << 'EOF'30# Step-CA31CA_NAME=My Private CA32EOF3334# 3. Start the services35docker compose up -d3637# 4. View logs38docker compose logs -f[>]One-Liner
Run this command to download and set up the recipe in one step:
[terminal]
1curl -fsSL https://docker.recipes/api/recipes/step-ca-certificates/run | bash[?]Troubleshooting
- [!]Certificate validation fails with 'x509: certificate signed by unknown authority': Install the root CA certificate on client systems using 'step ca root' command output
- [!]ACME client fails with '404 directory not found': Verify ACME is enabled and access the directory at https://localhost:9000/acme/acme/directory
- [!]Step-CA container exits with 'no configuration found': Initialize the CA properly by ensuring DOCKER_STEPCA_INIT_NAME environment variable is set on first run
- [!]Remote management returns 'connection refused': Check that port 9000 is accessible and DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT is set to true
- [!]Certificate requests fail with 'provisioner not found': Verify the ACME provisioner is configured correctly and check available provisioners with 'step ca provisioner list'
Community Notes
Loading...
Loading notes...
## Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Shortcuts: C CopyF FavoriteD Download