Caddy: The Web Server That Just Works (With Automatic HTTPS)
Intro
If you've ever set up a web server, you know the pain: configuring Nginx or Apache, wrangling SSL certificates, and debugging reverse proxies. What if there was a server that handled all that for you—while being fast, extensible, and supporting modern protocols like HTTP/3?
Enter Caddy, a Go-based web server that’s gaining traction (65k+ GitHub stars) for its simplicity and powerful defaults.
What It Does
Caddy is a multi-platform HTTP/1.1, HTTP/2, and HTTP/3 server with a killer feature: automatic HTTPS. It fetches and renews TLS certificates via Let’s Encrypt by default, so your sites are secure without extra config. It also supports:
- Static file serving
- Reverse proxying
- Load balancing
- Dynamic configuration via API
Why It’s Cool
- Zero-Config HTTPS: Just point Caddy at your domain, and it handles the rest. No
certbot, no manual renewals. - HTTP/3 Out of the Box: Built-in support for QUIC and HTTP/3 means faster, more resilient connections.
- Extensible: Need middleware, logging, or auth? Caddy’s modular design lets you plug in features via its module system.
- Developer-Friendly: Configuration is a single
Caddyfile(or JSON), and it hot-reloads changes without downtime.
How to Try It
- Install Caddy (macOS/Linux):
brew install caddy # macOS sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list sudo apt update sudo apt install caddy - Run it:
Boom—you’ve got a static file server on
caddy file-server --listen :8080http://localhost:8080. For HTTPS, just add a domain to yourCaddyfile.
Final Thoughts
Caddy isn’t just another web server—it’s a productivity boost. If you’re tired of configuring the same old stack, give it a shot. It’s especially great for:
- Quick prototypes
- Internal tools
- Projects where HTTPS is non-negotiable
Downsides? It’s not as battle-tested as Nginx for ultra-high-scale use cases, but for 90% of projects, it’s a refreshing alternative.
Check it out and let the server handle the boring stuff. 🚀