Skip to content

Caddy modules and plugins, how the ecosystem works

A practical map of the Caddy plugin landscape — DNS providers, storage backends, auth modules, handlers — and how an MSP picks which to install for a given workload.

Caddy ships as a single Go binary with a static module set baked in at build time. The standard distribution covers most workloads — file serving, reverse proxy, ACME with HTTP-01 and TLS-ALPN-01, file storage — but the ecosystem is much wider. DNS providers for the ACME DNS-01 challenge, alternative storage backends, auth modules, custom handlers, telemetry exporters: all are plugins, all are compiled in via xcaddy. This article is the map we use when picking which modules a client deployment actually needs.

How to verify

What is in the binary you are running:

caddy list-modules
caddy list-modules | grep -i dns
caddy list-modules | grep -i storage
caddy list-modules --versions
caddy version

list-modules enumerates every module compiled in. The output is your contract — if the module is not in this list, it cannot be referenced from a Caddyfile or JSON config. The --versions flag adds Go module versions next to each entry; useful for security review.

What’s happening

Caddy is built on a module system. Each handler (reverse_proxy, file_server, encode), each matcher (host, path), each issuer (acme), each storage backend (file_system, redis, consul), each DNS provider for DNS-01 — all are Go modules that implement a Caddy module interface. They are registered at process start and looked up by name when the config references them.

The “standard” binary is the one from the Cloudsmith repo or caddyserver/caddy Docker image. It includes the modules in the main repo. Anything outside the main repo (most DNS providers, most storage backends, all third-party handlers) must be added at build time via xcaddy. There is no runtime plugin loading — the modules are statically linked. Once built, the binary is self-contained.

This has two practical consequences:

  1. To add a single DNS provider for ACME DNS-01, you build a custom binary. There is no apt install caddy-route53.
  2. The binary you build is reproducible — the Go module checksums are pinned, so the same xcaddy command produces the same binary forever. Lock the command in CI; lock the binary hash in your config management.

The plugin ecosystem lives in three places: the caddyserver org on GitHub (official extensions), the caddy-dns org (DNS providers contributed by the community), and third-party repos (often via the Caddy Module Library listing on caddyserver.com). See xcaddy custom builds for the build mechanics.

What you might add

DNS providers for ACME DNS-01. Required when you need wildcard certs or when port 80 is unreachable. The convention is github.com/caddy-dns/<provider>. Common ones:

  • caddy-dns/cloudflare — Cloudflare API
  • caddy-dns/route53 — AWS Route 53
  • caddy-dns/digitalocean — DigitalOcean DNS
  • caddy-dns/googleclouddns — Google Cloud DNS
  • caddy-dns/azure — Azure DNS
  • caddy-dns/desec — deSEC.io (privacy-respecting public DNS)
  • caddy-dns/rfc2136 — generic dynamic DNS update (works with BIND9, PowerDNS, Knot)

Storage backends. Required for multi-node certificate state sharing. Common ones:

  • github.com/caddyserver/caddy-storage-redis — Redis (most popular for SaaS multi-tenancy)
  • github.com/pteich/caddy-tlsconsul — Consul KV
  • github.com/ss098/certmagic-s3 — S3-compatible (Minio, R2, Wasabi, etc.)
  • github.com/yroc92/postgres-storage — PostgreSQL
  • github.com/baldinof/caddy-supervisor — DynamoDB

Auth modules. Beyond basic auth (built in):

  • github.com/greenpau/caddy-security — multi-portal auth (OAuth2, OIDC, SAML, JWT)
  • github.com/caddyserver/transform-encoder — log transformers
  • github.com/abiosoft/caddy-exec — execute commands as a handler (use sparingly)

Telemetry and observability.

  • github.com/lucaslorentz/caddy-docker-proxy — Docker label-driven config (containers join Caddy automatically)
  • github.com/mholt/caddy-l4 — Layer 4 (TCP/UDP) proxying — see caddy layer4 tcp proxy
  • github.com/WeidiDeng/caddy-cloudflare-ip — Cloudflare IP range auto-update for trusted_proxies

Compression.

  • github.com/dunglas/mercure — Server-Sent Events server-side
  • github.com/ueffel/caddy-brotli — Brotli compression (zstd is built in) — see caddy brotli compression

The procedure

  1. Audit what you have. Before adding anything, list what is compiled in. Most “I need a plugin” requests are answered by a feature already present:

    caddy list-modules > /tmp/caddy-modules.txt
    grep -i route53 /tmp/caddy-modules.txt   # checking for DNS provider
    grep -i redis /tmp/caddy-modules.txt     # checking for storage backend
  2. Build with xcaddy. The standard pattern:

    go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
    
    xcaddy build \
      --with github.com/caddy-dns/cloudflare \
      --with github.com/caddyserver/caddy-storage-redis \
      --with github.com/ueffel/caddy-brotli \
      --output /usr/local/bin/caddy-custom

    The resulting binary is a drop-in replacement for the stock caddy binary.

  3. Replace the binary. Stop, swap, start:

    sudo systemctl stop caddy
    sudo mv /usr/local/bin/caddy-custom /usr/bin/caddy
    sudo caddy version
    sudo systemctl start caddy

    The systemd unit needs no change — it calls caddy by name.

  4. Pin the binary hash. In your config management or CI artifact store, record the SHA256 of the built binary. A change in the binary should be a config change reviewed by a human, not an unattended update:

    sha256sum /usr/bin/caddy
  5. Document which modules are present. A simple file in the deployment repo:

    # /etc/caddy/MODULES.txt
    # Built: 2026-06-02
    # Stock plus:
    #   - github.com/caddy-dns/cloudflare v1.0.0
    #   - github.com/caddyserver/caddy-storage-redis v1.1.2
    #   - github.com/ueffel/caddy-brotli v0.4.0

    When something doesn’t work, you read the file before you read the config.

Operational notes

  • A custom build does not auto-update via apt upgrade. Either commit to scripted rebuilds in CI, or use the stock binary and accept the standard module set.
  • Plugins from unmaintained repos still build but may break on Caddy minor version bumps. Pin each plugin’s commit hash in your build script and review before bumping Caddy.
  • The Caddy team maintains a “modules list” page on caddyserver.com — useful for discovering plugins, but the page does not validate maintenance status. Check the repo’s last commit before adopting.
  • The --with-replace flag of xcaddy lets you point at a local fork during plugin development. Useful for security review when you want to audit a plugin’s source before trusting it.
  • A binary built with xcaddy includes the Go runtime and the standard library; a typical custom binary lands at 40-60MB. Static linking means no shared library mismatches at runtime — a feature, not a problem.

Stack Harbor maintains custom Caddy binaries for clients whose workloads need the ecosystem — DNS providers wired to their actual registrars, storage backends shared across nodes, auth modules integrated with their identity provider — and we treat the build pipeline as code under review. If you are running a Caddy stack that needs more than the stock modules and you want the build/test/deploy of that binary operated for you, this is the kind of work covered by our Managed Operations practice.