# Self-host Step CA

> A private certificate authority that issues and renews TLS and SSH certificates over ACME or a CLI. Apache-2.0 licensed. The CA password is generated for you and shown in the deployment variables.

- Page: https://levelrail.com/templates/step-ca/
- JSON: https://levelrail.com/templates/step-ca.json
- Category: Security
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/smallstep/certificates
- Upstream docs: https://github.com/smallstep/certificates

## Requirements
- Memory: about 128 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 0.30.2

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| step-ca | smallstep/step-ca | 0.30.2 | 9000 | step -> /home/step |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| step-ca | DOCKER_STEPCA_INIT_ACME | preset |
| step-ca | DOCKER_STEPCA_INIT_DNS_NAMES | preset |
| step-ca | DOCKER_STEPCA_INIT_NAME | preset |
| step-ca | DOCKER_STEPCA_INIT_PASSWORD | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy step-ca --name my-step-ca
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/step-ca/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Read the root certificate fingerprint from the deployment logs, then bootstrap clients with step ca bootstrap.

## Questions

### Can I deploy Step CA on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Step CA, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image smallstep/step-ca:0.30.2 is what you deploy there.

Self-host Step CA, Step CA docker compose file, deploy Step CA on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
