Deployment guide

step-ca

Overview

Smallstep step-ca is an open-source online certificate authority for secure, automated X.509 and ACME certificate management. It lets you run your own private PKI: a certificate authority that issues short-lived TLS certificates to your services, devices and workloads. Full ACME support means any ACME client can request and renew certificates automatically.

This SecureAnyCloud image delivers step-ca as a ready-to-use certificate authority appliance on Azure. Every VM bootstraps its own unique certificate authority the first time it boots, so the CA is already running and healthy when you connect over SSH.

What you get:

  • A headless certificate authority service with no web interface
  • The step-ca daemon, managed by step-ca.service, which is enabled and started on boot. It runs as a long-lived process under the dedicated unprivileged step user and serves the CA's X.509 and ACME API over TLS
  • The matching step command-line tool, installed for bootstrapping clients, inspecting certificates and issuing certificates from the provisioner
  • A certificate authority that listens on the loopback address only, at 127.0.0.1:8443
  • The CA configuration, the root and intermediate certificates and the encrypted signing keys on a dedicated, independently resizable Azure data disk mounted at /var/lib/step-ca, which is the CA's STEPPATH. You can resize and snapshot this disk independently of the operating system disk.
  • 24/7 SecureAnyCloud support

Prerequisites

Before you deploy this image, you need:

  • A Microsoft Azure subscription where you can create virtual machines
  • Permissions to create VMs, virtual networks, network security groups and public IP addresses
  • An SSH key pair for access to the VM (the Azure CLI can generate one)
  • A virtual network and subnet in the target region, with a network security group that allows inbound port 22 from your management network
  • The Azure CLI installed locally, if you plan to deploy from the command line
1

Launch the VM from the Azure Marketplace

Sign in to the Azure portal, select Create a resource and search the Marketplace for step-ca by SecureAnyCloud. Select the SecureAnyCloud listing and choose Create.

On the Basics tab, pick your subscription, resource group and region, and a VM size of Standard_B2s or larger. Under Administrator account, select SSH public key, set the username to azureuser and supply your public key. Under Inbound port rules, allow SSH (22) only. On the Networking tab, choose your virtual network and subnet. Then select Review + create and Create.

First-boot initialization generates the VM's own unique certificate authority. It takes a short moment after the VM state becomes Running. step-ca.service is serving its API by the time you can connect.

2

Launch the VM from the Azure CLI

The following command launches a VM from the SecureAnyCloud step-ca image into an existing resource group. Replace the values in angle brackets with your own. The image reference comes from the Usage information of the Marketplace listing.

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:step-ca-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-resource-group> \
  --name step-ca \
  --image sac1647283583153:step-ca-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_rsa.pub \
  --public-ip-sku Standard

When the VM reaches the Running state, note its public IP address from the portal or with az vm list-ip-addresses.

3

Connect to your VM

Connect over SSH as azureuser with your key pair.

ssh azureuser@<vm-ip>

The login banner lists the most useful commands. The CA is already running and healthy.

4

Confirm the step-ca service and version

Confirm the installed step-ca and step versions, and that the certificate authority daemon is active. step-ca is the CA server, and step is the client command-line tool.

step-ca version step version systemctl is-active step-ca

The service is active. The version is the pinned 0.30.2 release of step-ca, with the matching 0.30.6 step CLI.

5

Check the certificate authority health

step-ca serves its X.509 and ACME API over TLS on the loopback address 127.0.0.1:8443. The API uses the CA's own certificate chain, which is rooted in this VM's unique CA root rather than a public PKI. Query the health endpoint with curl -k.

curl -k https://127.0.0.1:8443/health
sudo ss -tln | grep 8443

The health endpoint returns {"status":"ok"}. The listener is bound to 127.0.0.1:8443 only, so the CA is not exposed on any external interface.

6

Read the per-VM credentials

On its first boot, this VM generated its own random certificate authority key password and provisioner password, and initialized a new certificate authority unique to this VM. The generated passwords, the provisioner name and the root certificate fingerprint are written to a root-only file. Read them as follows.

sudo cat /root/step-ca-credentials.txt

Keep these values safe. The provisioner password authorizes certificate issuance, and clients pin the root fingerprint when they bootstrap against your CA.

7

Issue a certificate from the provisioner

The CA has a password-protected JWK provisioner named admin. Bootstrap a local client against the CA with the root fingerprint, then issue a short-lived leaf certificate. The following command reads the provisioner password and the root fingerprint from the credentials file, so it runs end to end without prompting.

export STEPPATH="$HOME/.step-demo"
FP=$(sudo grep '^stepca.root.fingerprint=' /root/step-ca-credentials.txt | cut -d= -f2-) printf '%s' "<STEPCA_PROVISIONER_PASSWORD>" > /tmp/prov.pass chmod 600 /tmp/prov.pass step ca bootstrap --ca-url https://127.0.0.1:8443 --fingerprint "$FP" --force step ca certificate web.internal /tmp/web.crt /tmp/web.key \
  --provisioner admin --provisioner-password-file /tmp/prov.pass --not-after 24h --force rm -f /tmp/prov.pass

The step tool prints the provisioner, the CA URL and the paths of the issued certificate and private key. You now have a short-lived TLS certificate signed by your private CA.

8

Inspect the root certificate

The root certificate is public material that clients trust. Inspect it and read its fingerprint with the step tool.

sudo -u step env STEPPATH=/var/lib/step-ca step certificate inspect /var/lib/step-ca/certs/root_ca.crt --short sudo -u step env STEPPATH=/var/lib/step-ca step certificate fingerprint /var/lib/step-ca/certs/root_ca.crt

The root certificate is an ECDSA P-256 CA certificate, valid for ten years and self-signed by this VM's own certificate authority.

9

Open the CA port for remote clients

By default the CA listens on loopback only, so only the VM itself can reach it. To let other hosts request certificates, do two things. Open the CA port in this VM's network security group, and make the CA reachable on a routable address.

To reach the running CA from your workstation without changing its binding, open an SSH tunnel.

ssh -L 8443:127.0.0.1:8443 azureuser@<vm-ip>

With the tunnel up, point a client at https://127.0.0.1:8443 from your workstation and bootstrap it with the root fingerprint shown in the credentials file.

To expose the CA to your network directly, add an inbound NSG rule for TCP 8443 from the client networks that need certificates. Then re-initialize or reconfigure the CA so that its address and DNS names match the routable address. Never open 8443 to the public internet without restricting the source ranges to the clients that need it.

10

Use the ACME provisioner

A default ACME provisioner is configured, so standard ACME clients can request and renew certificates automatically. Point any ACME client at the CA's ACME directory.

https://<ca-host>:8443/acme/acme/directory

Give the client the CA root certificate as its trust anchor. The public root_ca.crt is under /var/lib/step-ca/certs. ACME clients then request and renew short-lived certificates against your private CA with no manual steps.

11

Find the CA material

The certificate authority reads its configuration from a single JSON file. All CA material lives on the dedicated data disk mounted at /var/lib/step-ca.

  • /var/lib/step-ca/config/ca.json is the main configuration. Use it to add and remove provisioners, adjust certificate lifetimes and templates, enable SSH certificates and point ACME clients at the directory.
  • /var/lib/step-ca/certs/ holds the public root and intermediate certificates.
  • /var/lib/step-ca/secrets/ holds the encrypted signing keys, readable only by the step user.

After you edit ca.json, reload the CA so that it picks up the change.

sudo systemctl reload step-ca systemctl is-active step-ca

The CA material sits on an independently resizable Azure data disk that is separate from the operating system disk. You can grow the disk and snapshot it without touching the OS volume.

Support

SecureAnyCloud maintains this image and provides 24/7 technical support by email and chat. Contact the team at sales@secureanycloud.com for help with PKI design, provisioner configuration, ACME automation, certificate templates and lifetimes, SSH certificates, client bootstrapping, renewal and upgrade planning.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Deploy on Azure

Launch Smallstep step-ca on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure