caddyserver/caddy
Caddy
Caddy is an extensible HTTPS server platform written in Go. It serves HTTP/1.1, HTTP/2, and HTTP/3, manages TLS certificates automatically through ACME issuers like ZeroSSL and Let's Encrypt, and runs anywhere with no external dependencies.

What Caddy is
At its core, Caddy is a Go program that loads a JSON configuration document and runs zero or more "apps" (top-level modules). Two apps ship in the standard distribution:
http— a configurable HTTP server with routing, matchers, and a middleware-style handler chain (modules/caddyhttp/app.go).tls— TLS certificate management built on top of CertMagic (modules/caddytls/tls.go).
Two more apps ride along in the default build: pki for an internal certificate authority (modules/caddypki/pki.go) and events for a small pub/sub event system (modules/caddyevents/app.go).
Most users never touch the JSON. They write a Caddyfile and let the caddyfile adapter convert it to JSON before Caddy loads it (caddyconfig/httpcaddyfile/). Other adapters (NGINX, YAML, JSON 5, TOML) live as separate plugins.
Who uses it
Caddy is used as a public-facing web server, a reverse proxy, an API gateway, a static file server, and an embedded HTTP platform inside other Go programs. It is in production at scale — the project notes cover trillions of requests and millions of managed certificates.
The repo also exposes a developer-facing surface:
- A library API (
github.com/caddyserver/caddy/v2) that other Go programs can import to embed Caddy or build custom binaries. - A plugin system via
xcaddyfor compiling Caddy with third-party modules. - An admin HTTP API for live configuration, defaulting to
localhost:2019.
Quick links
- Architecture — apps, modules, and the request lifecycle
- Getting started — build, run, and serve a hello-world site
- Glossary — Caddy-specific terms (App, Module, Provisioner, Replacer, etc.)
- How to contribute — workflow, tests, and conventions
- Apps —
http,tls,pki,events - Systems — module registry, admin API, listeners, replacer, storage, logging
- Features — automatic HTTPS, reverse proxy, file server, Caddyfile
- Reference — config, dependencies, environment variables
Repository at a glance
| Path | Role |
|---|---|
caddy.go, admin.go, modules.go, context.go, replacer.go, logging.go, storage.go, listeners.go |
Core platform (the caddy package) |
cmd/ |
CLI surface (caddy run, caddy reload, caddy adapt, …) |
cmd/caddy/main.go |
Default binary entry point |
caddyconfig/ |
Config adapter framework + Caddyfile parser + HTTP Caddyfile adapter |
modules/caddyhttp/ |
HTTP app, matchers, handlers, routes |
modules/caddytls/ |
TLS app, issuers, loaders, connection policies |
modules/caddypki/ |
Internal certificate authority + ACME server |
modules/caddyevents/ |
Event app |
modules/logging/ |
Log encoders and writers |
modules/metrics/ |
Prometheus admin endpoint |
modules/filestorage/ |
File-based storage backend |
modules/standard/imports.go |
Default module registry — controls what ships in the standard binary |
caddytest/ |
Integration test harness and fixtures |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.