Lego Certificate
@zts/lego-certificatev2026.11.01.1
01README
One ACME certificate (Let's Encrypt, ZeroSSL, Google Trust Services or any ACME CA), issued and renewed with the lego v5 CLI through any of lego's DNS-01 providers. Swamp keeps lego's state: each run restores the account and certificate into a fresh temporary directory, runs lego, saves what changed (the private key as a sensitive field in a vault) and deletes the directory, so nothing persists on the host. apply issues or renews when due, status reports validity, revoke revokes with the issuing CA. DNS credentials reach lego only through its environment. Needs lego 5 on the host.
02Behaviors
@zts/lego-certificatev2026.11.01.1lego_certificate.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| domains | array | Names the certificate covers; wildcards such as *.example.com allowed |
| certName? | string | lego's name for the certificate; default the first domain, * as _ |
| email? | ACME account contact; also the account id. Without it the id is 'swamp' | |
| server? | url | ACME directory URL (lego shortcodes are not accepted) |
| keyType? | enum | Key type of the certificate's private key |
| profile? | string | ACME profile to request, when the CA offers profiles |
| preferredChain? | string | Issuer common name of the chain to prefer |
| renewDays? | int | Renew when fewer days than this remain; default lego's dynamic window |
| eabKid? | string | External Account Binding key id, for CAs that require it |
| eabHmac? | string | External Account Binding HMAC key; from a vault |
| dnsProvider | string | lego DNS provider code, e.g. mythicbeasts, cloudflare, route53 |
| dnsEnv? | record | Non-secret provider settings, by environment variable name |
| dnsSecretEnv? | record | Provider credentials, by environment variable name; from a vault |
| dnsResolvers? | array | Resolvers for propagation checks, as host:port |
| dnsTimeout? | int | DNS query timeout in seconds |
| dnsPropagationWait? | string | Skip propagation checks and wait this long instead, e.g. 90s |
| dnsPropagationDisableAns? | boolean | Do not wait for the authoritative name servers |
| dnsPropagationDisableRns? | boolean | Do not wait for the recursive resolvers |
| ambientCredentials? | boolean | Give lego swamp's whole environment, for credential chains |
| legoPath? | string | The lego 5 binary, by path or name on PATH |
| timeoutSeconds? | int | How long one lego run may take |
fn apply(forceRenew?: boolean)
Issue the certificate, or renew it when lego says it is due, and
| Argument | Type | Description |
|---|---|---|
| forceRenew? | boolean | Renew now even when the certificate is not due |
fn status()
Log the stored certificate's validity; calls nothing
fn revoke(reason?: int)
Revoke the stored certificate with the CA that issued it
| Argument | Type | Description |
|---|---|---|
| reason? | int | RFC 5280 revocation reason code |
Resources
account(infinite)— An ACME account lego registered, one per CA and account id
certificate(infinite)— The current certificate, its key and lego's files for it
Files
log(text/plain)— lego's output from the last run
03Stats
A
100 / 100
Downloads
23
Archive size
24.1 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault1/1earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned
Repository
https://github.com/zts/swamp-extensionsdeno-command2 accepted
Spawns a subprocess with Deno.Command().
- models/lego_runner.ts:35 — no reason given
- models/lego_runner.ts:145 — no reason given
behavior-spelling1 accepted
- (extension) — New extension with no existing users; it targets swamp releases that load the behavior spelling.
05Platforms
06Labels