An embeddable Rust ACME client and CLI for account management, DNS and HTTP validation, and recoverable certificate issuance.
Explicit protocol states, durable checkpoints, and certificate files you can deploy.
AsterACME manages the certificate lifecycle with saved request state, fixed keys and CSRs, and explicit recovery after interruption. Use the CLI interactively or in scripts, or embed the Rust services with your own storage, signer, and validation adapters.
CLI source builds include Cloudflare, Alibaba Cloud DNS, Tencent Cloud DNSPod, and Huawei Cloud DNS by default. Huawei Cloud RRset updates cannot guarantee atomic isolation from external writers. Embedded applications select provider features explicitly. DNS provider setup
Available now: AsterACME 0.1.0-alpha.4 is published on crates.io. This is a pre-release; Rust APIs and local formats may still change. It includes native Cloudflare and ADPP backends behind a unified DNS solver. Live DNS/public-CA acceptance is separate.
- Named CA accounts: registration, recovery, contacts, key rotation, and deactivation.
- Single-domain, multi-SAN, wildcard, and IP-address (RFC 8738) certificates; independent account and certificate key choices.
- CA certificate profiles (draft-ietf-acme-profiles): discover advertised profiles, set an account default, or select per issuance — Let's Encrypt IP identifiers require the
shortlivedprofile. - Alternate certificate chains (RFC 8555 §7.4.2): choose a chain for this issuance with
--chain, save its name as a soft renewal preference with--preferred-chain, or follow the CA default with--default-chain. Interactive issuance separates following the CA default from selecting its current concrete chain, and asks separately whether to retain any concrete selection; a missing or ambiguous soft preference falls back to the CA default with a warning. - Saved issuance recovery, ARI refresh, foreground single/batch renewal, and unattended maintenance for supported validation methods.
- Multiple deployment targets per certificate, automatic deployment after renewal, and bounded reload commands with stdout/stderr output.
- Interactive input, structured JSON, offline inspection, and optional debug diagnostics.
| Validation | Implementation |
|---|---|
| DNS-01 | dns_provider --provider NAME: native DNS or ADPP automation; manual_dns: publish TXT records yourself; supports wildcards |
| DNS-PERSIST-01 (draft -02) | dns_persist: provision persistent TXT records manually, then reuse them for renewal; supports wildcards |
| HTTP-01 | manual_http, webroot, or temporary standalone listener on port 80; validates DNS and IP identifiers |
| TLS-ALPN-01 | Temporary tls_alpn listener on port 443; validates DNS and IP identifiers |
dns_persist requires a CA implementing the same draft revision. Keep its TXT records for renewal. DNS provider writes and public-CA acceptance are separate capabilities.
Install the CLI from Homebrew:
brew install astercommunity/tap/aster-acmeInstall the published 0.1.0-alpha.4 CLI from crates.io. cargo-binstall uses a matching prebuilt binary when available and otherwise falls back to a Cargo source build:
cargo binstall aster_acme_cli@0.1.0-alpha.4Without cargo-binstall, install the same CLI through Cargo:
cargo install aster_acme_cli --version 0.1.0-alpha.4Build from the checkout with Rust 1.99+:
git clone https://github.com/AsterCommunity/AsterACME.git
cd AsterACME
cargo install --path crates/aster_acme_cli --lockedTo embed the library, run the shipped end-to-end example — CA discovery, account registration, an embedder-owned HTTP-01 webroot solver, and artifacts — against Let's Encrypt staging with a temporary data directory:
cargo run -p aster_acme --example embedded_issuance -- --domain example.com --webroot /srv/wwwThe example source is the embedding entry point: the ChallengeSolver implementation, storage adapters, and the AccountService/Workflow wiring are yours. The example's adapters are volatile; a real embedder supplies durable storage for restart recovery.
Run the published container image instead of installing (multi-arch; latest tracks stable releases):
docker run -d --name aster-acme -v aster-acme-config:/data ghcr.io/astercommunity/aster-acme:latestThe container runs the maintenance daemon by default; one-off commands run as docker exec aster-acme cert list. See containers.
Register an account, review the CA terms, then request a certificate. The default CA is Let's Encrypt production.
aster-acme account register default --contact admin@example.com
aster-acme cert issue -n example-cert -a default -d example.com -c manual_dnsFor unattended renewal, explicitly delegate future CA terms updates during registration:
aster-acme account register default --auto-accept-new-termsThis also accepts the currently advertised terms. The exact accepted URL remains in the account record; account show reports whether the future-update delegation is enabled. --yes, JSON mode, and implicit issuance account checks never enable it. A normal account register without the flag keeps an existing delegation so routine recovery cannot revoke unattended renewal trust.
Change the delegation later with account update (combinable with contacts/profile changes in one invocation; the report lists every applied scope):
aster-acme account update default --auto-accept-new-terms --yes # accept current terms and delegate
aster-acme account update default --clear-auto-accept-new-terms --yes # revoke; keep the accepted URLEnabling reads the live directory to record the exact current terms URL; if the directory cannot be read it fails instead of delegating silently, and a CA that publishes no terms still records the delegation with an explicit notice. Revoking alone is local and sends nothing. It keeps the saved accepted URL even when combined with contact/profile changes that access the CA. Clearing a profile and revoking delegation together also work offline. A concurrent conflicting change to the accepted URL stops the terms update and preserves earlier applied scopes. Neither change sends a CA account request. An interactive terminal asks for separate terms confirmation; only an explicit terms flag together with --yes skips it. The scope menu still asks even with --yes, and confirming contacts never grants terms consent.
Publish the requested TXT values and confirm. If interrupted, continue the saved request; renewal keeps the saved validation method:
aster-acme cert issue --resume example-cert
aster-acme cert show example-cert
aster-acme cert renew example-cert
aster-acme cert renew --alldaemon run stays in the foreground, checks immediately, then starts another maintenance cycle after the configured delay (default 60 seconds). It refreshes ARI suggestions, renews due certificates using webroot, standalone, tls_alpn, dns_provider, or already provisioned dns_persist, and retries configured deployments. Manual validation methods are skipped. Ctrl-C or Unix SIGTERM stops it after started work is retained. Use a service manager to start and restart the process; daemon run-once remains available for cron.
The resident daemon holds an exclusive lock for its data directory. Set daemon_interval = 60 in config.toml or override it with daemon run --interval 60. Human logs use the same timestamped levels as issuance; --json streams one JSON object per line.
renew runs when due; add --now to renew early. Use resident daemon run or cron with daemon run-once for unattended maintenance using supported validation methods. For other validation methods and script confirmation rules, see the CLI contract.
aster-acme cert revoke example-cert --sign-with certificate-key --reason key-compromise --yesUse the selected managed generation's certificate private key without the original ACME account or CSR. The default --sign-with account uses the issuing account. Both modes retain local and deployed files and do not rotate keys or reload services. See the revocation contract.
Configure your service to read from an existing target directory, then bind it to the certificate:
aster-acme cert deploy add example-cert -n nginx \
--target /etc/nginx/certs/example \
--reload-cmd "systemctl reload nginx"
aster-acme cert deploy show example-cert nginxAdding a binding deploys immediately; later successful renewals use it automatically. Files are fully prepared before individual replacements, and reload runs only after publication succeeds. Deployment uses regular files at stable directory paths. Manage bindings, file permissions, exact paths, and retries through cert deploy.
Publish a PKCS#12 (.p12) bundle containing the chain and private key with an exact path. Unix permissions follow --key-mode (0600 by default). For the daemon, use a user-managed 0600 password file:
aster-acme cert deploy add example-cert -n java \
--p12-path /etc/myservice/certificate.p12 \
--p12-password-file /etc/myservice/p12-passwordAlternatively, use --p12-password-env ENV_VAR (the daemon needs it in its startup environment). Bindings store source references only. Without a source, only an interactive cert deploy run prompts for a hidden, one-time password; add, JSON and automatic deployment fail without prompting. Directory mode still publishes the four PEM files only.
The user and operations documentation is published with Astro Starlight at acme.docs.astercosm.com.
- Quick start
- Installation
- Choosing a validation method
- Accounts
- Issuance and recovery
- Renewal and ARI
- Deployment and reload
- DNS provider automation
- Resident daemon and cron
- Running the container
- CLI reference
- Developer guide: project contract, task routing, architecture, crate ownership, and tests
- RFC reference and changelog
State is stored in the platform directory for com.astercosm.acme; use --data-dir PATH or ASTER_ACME_DATA_DIR to select another root (--data-dir takes precedence). list and show are offline by default. --json disables prompts and emits one structured result.
- Report vulnerabilities privately through GitHub Security Advisories or
report@esaps.net— see SECURITY.md for the full policy - Published advisories: github.com/AsterCommunity/AsterACME/security/advisories
MIT OR Apache-2.0, at your option. Contributions are dual-licensed under the same terms unless explicitly stated otherwise.
External DNS profile setup, sensitive custom values, CNAME delegation, propagation, and cleanup: DNS providers.