A Caddy DNS provider for ACME DNS-01 challenges that use an HTTP API. It provides a generic HTTP client that can be configured to send requests with query parameters, form data, or JSON payloads.
tls {
dns http_acme {
endpoint https://myaddr.tools/update
method POST
body json
params {
key {env.MYADDR_KEY}
acme_challenge {http_acme.challenge}
}
result {
success_code "2xx"
success_body "OK"
}
}
}
The module provides these placeholders:
| Placeholder | Value | Example |
|---|---|---|
{http_acme.challenge} |
TXT value generated by ACME | gfj9Xq... |
{http_acme.zone} |
challenged zone, without trailing dot | example.com |
{http_acme.fqdn} |
full name of the TXT record, without trailing dot | _acme-challenge.example.com |
The placeholders work in params values and in endpoint, in Caddyfile and in
JSON config. Normal Caddy placeholders such as {env.MYADDR_KEY} also work.
The http_acme.* placeholders resolve when Caddy performs the challenge.
Unknown placeholders stay literal.
Breaking change (v0.2.0): the old
{challenge}and{domain}tokens are no longer replaced. Use{http_acme.challenge}and{http_acme.zone}.
| value | description | default |
|---|---|---|
endpoint |
URL of the update API (e.g. https://myaddr.tools/update) | (required) |
method |
HTTP method: GET, POST, or PUT |
POST |
body |
request body type: query, form, or json |
form (or query when GET) |
params |
request fields | (required) |
timeout |
request timeout | 30s |
result.success_code |
exact HTTP status code, or 2xx |
2xx |
result.success_body |
text that must occur in the response body | (optional) |
result.success_body_regex |
true treats success_body as a regular expression |
false |
The module ID is dns.providers.http_acme.
This provider is intended for an ACME DNS challenge configuration. It implements the libdns append and delete operations required by Caddy's ACME solver, but not the complete set of operations required by Caddy's global DNS provider configuration. Cleanup is a no-op because myaddr.tools expires ACME challenge values automatically and does not document an API to delete one value.
Install from caddyserver.com with caddy-http-acme module selected.
Or alternatively, build Caddy with the module using xcaddy:
xcaddy build --with github.com/SodaWithoutSparkles/caddy-http-acme@latestThis project is licensed under the Apache 2.0 License. See the LICENSE file for details.