Caddy Labels¶
dnsweaver can extract hostnames from Docker containers that use caddy-docker-proxy style labels. This lets you keep a single source of truth for your reverse-proxy configuration and your DNS records.
Enabling Caddy¶
Add caddy to DNSWEAVER_SOURCES:
You can combine Caddy with other sources:
Label Format¶
dnsweaver recognises two label shapes used by caddy-docker-proxy:
Single hostname¶
Multiple hostnames¶
Either use indexed labels:
…or a comma- or space-separated list on a single label:
Caddy directive labels¶
Labels that describe Caddy directives (not hostnames) are ignored:
labels:
caddy: app.example.com
caddy.reverse_proxy: "{{upstreams 8080}}" # ignored
caddy.tls: internal # ignored
Only labels named exactly caddy or beginning with caddy_ are parsed.
Supported Record Types¶
Caddy labels only declare hostnames. dnsweaver pairs each hostname
with the default record type for the matching provider (typically A).
To override the record type, target, or TTL on a per-hostname basis,
use native dnsweaver labels alongside Caddy.
Caveats¶
- Caddyfile parsing is not supported. Only Docker labels are read.
If your Caddy configuration lives in a
Caddyfilerather than labels, use native dnsweaver labels on the Caddy container itself. - No reverse-proxy detection. dnsweaver only extracts hostnames; it does not verify that Caddy is actually configured to serve them.