caddyserver/caddy
Dependencies
Direct Go module dependencies of github.com/caddyserver/caddy/v2. Listed in go.mod (~178 lines including indirect deps); the table below covers the direct deps that meaningfully shape Caddy's behavior.
Networking and TLS
| Module | Used for |
|---|---|
github.com/caddyserver/certmagic |
The whole certificate-management story (cache, ACME, OCSP, locks). |
github.com/caddyserver/zerossl |
ZeroSSL EAB API client used by the zerossl issuer. |
github.com/mholt/acmez/v3 |
Lower-level ACME client used by certmagic. |
github.com/quic-go/quic-go |
HTTP/3 / QUIC transport (server and client). |
github.com/tailscale/tscert |
Tailscale-issued TLS certs (for the optional Tailscale cert manager). |
github.com/cloudflare/circl |
Post-quantum and exotic-curve crypto primitives. |
github.com/smallstep/certificates |
ACME server backend used by modules/caddypki/acmeserver. |
github.com/smallstep/nosql |
Storage abstraction used by smallstep/certificates. |
github.com/smallstep/truststore |
OS trust-store integration for caddy trust. |
github.com/libdns/libdns |
Common interface for DNS providers (used by ACME-DNS issuance). |
CLI
| Module | Used for |
|---|---|
github.com/spf13/cobra |
Subcommand framework (caddy run, caddy reload, etc.). |
github.com/spf13/pflag |
Cobra-compatible flag parsing. |
Logging and observability
| Module | Used for |
|---|---|
go.uber.org/zap |
Structured logging across the entire codebase. |
github.com/prometheus/client_golang |
Metrics (/metrics admin endpoint, internal counters). |
go.uber.org/automaxprocs |
Sets GOMAXPROCS from cgroup CPU quota. |
github.com/KimMachineGun/automemlimit |
Sets GOMEMLIMIT from cgroup memory limit. |
Configuration and parsing
| Module | Used for |
|---|---|
github.com/BurntSushi/toml |
TOML reading (Caddyfile import paths, plugin configs). |
github.com/google/cel-go |
The expression matcher's CEL runtime. |
github.com/google/uuid |
Request IDs ({http.request.uuid}). |
github.com/Masterminds/sprig/v3 |
Template helpers exposed in the templates handler. |
github.com/alecthomas/chroma/v2 |
Syntax highlighting in the file-server directory listing template. |
github.com/aryann/difflib |
Diff output (used in caddy adapt/caddy validate). |
File handling and compression
| Module | Used for |
|---|---|
github.com/klauspost/compress |
Fast compression backends for encode (gzip, zstd, …). |
github.com/klauspost/cpuid/v2 |
CPU-feature detection used by klauspost/compress. |
github.com/dustin/go-humanize |
Human-friendly byte/size formatting in the file-server listing. |
github.com/DeRuina/timberjack |
Log file rotation for caddy.logging.writers.file. |
Testing
| Module | Used for |
|---|---|
github.com/stretchr/testify |
Test assertions (assert, require). |
github.com/cespare/xxhash/v2 |
Hashing in tests and a few hot paths. |
What's not in go.mod
Caddy intentionally avoids adding dependencies. Per AGENTS.md:
Avoid new dependencies. Justify any additions; tiny deps can be inlined.
Two non-goals follow:
- No exported dependency types. Caddy must not expose types defined by external packages in its public API, so plugins don't break when Caddy bumps a dep.
- No vendor directory. The repo uses Go modules without vendoring; reproducible builds rely on
go.sum.
Maintaining go.mod
- Run
go mod tidybefore committing. - Dependabot is configured (
.github/dependabot.yml) to open weekly bump PRs for Go modules and GitHub Actions. cross-build.ymlexercisesxcaddy buildto confirm the public API stays plugin-buildable after dep changes.
Related pages
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.