Caddy 2 is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Caddy simplifies your infrastructure. It takes care of TLS certificate renewals, OCSP stapling, static file serving, reverse proxying, Kubernetes ingress, and more.
Its modular architecture means you can do more with a single, static binary that compiles for any platform.
Caddy runs great in containers because it has no dependencies—not even libc. Run Caddy practically anywhere.
Caddy does the work of your WAF, web server, ingress, reverse proxy, TLS terminator, logging, caching, and TLS certificate management.
Caddy is the only web server to use HTTPS automatically and by default.
Caddy obtains and renews TLS certificates for your sites automatically. It even staples OCSP responses. Its novel certificate management features are the most mature and reliable in its class.
Written in Go, Caddy offers greater memory safety than servers written in C. A hardened TLS stack powered by the Go standard library serves a significant portion of all Internet traffic.
Caddy is the only server to use HTTPS automatically and by default
Ardan Labs is the trusted partner of the Caddy Web Server open source project, providing enterprise-grade support to our clients.
Together, we consult and train, as well as develop, install, and maintain Caddy and its plugins to ensure your infrastructure runs smoothly and efficiently. Contact us to get started!
Caddy is both a flexible, efficient static file server and a powerful, scalable reverse proxy.
Use it to serve your static site with compression, template evaluation, Markdown rendering, and more.
Or use it as a dynamic reverse proxy to any number of backends, complete with active and passive health checks, load balancing, circuit breaking, caching, and more.
3-LINERS
These commands are production-ready. When given a domain name, Caddy will use HTTPS by default, which provisions and renews certificates for you.*
Requires domain’s public A/AAAA DNS records pointed at your machine.
$ caddy file-server
$ caddy file-server --domain example.com
$ caddy reverse-proxy --from example.com --to localhost:9000
$ caddy run
A config file that’s human-readable and easy to write by hand. Perfect for most common and manual configurations.
localhost
templates
file_server
example.com # Your site's domain name
# Load balance between three backends with custom health checks
reverse_proxy 10.0.0.1:9000 10.0.0.2:9000 10.0.0.3:9000 {
lb_policy random_choose 2
health_path /ok
health_interval 10s
}
example.com
# Templates give static sites some dynamic features
templates
# Compress responses according to Accept-Encoding headers
encode gzip zstd
# Make HTML file extension optional
try_files {path}.html {path}
# Send API requests to backend
reverse_proxy /api/* localhost:9005
# Serve everything else from the file system
file_server
Caddy is dynamically configurable with a RESTful JSON API. Config updates are graceful, even on Windows.
Using JSON gives you absolute control over the edge of your compute platform, and is perfect for dynamic and automated deployments.
POST /config/
{
"apps": {
"http": {
"servers": {
"example": {
"listen": ["127.0.0.1:2080"],
"routes": [{
"@id": "demo",
"handle": [{
"handler": "file_server",
"browse": {}
}]
}]
}
}
}
}
}
GET /config/
PUT /id/demo/handle/0
{"handler": "templates"}