Caddy is a web server that automatically provisions HTTPS certificates. No configuration files needed — it just works.
What Is Caddy?
Caddy is the only web server that provisions and renews TLS certificates automatically via Let us Encrypt. Written in Go, single binary, zero dependencies.
Features:
- Automatic HTTPS (Let us Encrypt + ZeroSSL)
- HTTP/3 support
- Reverse proxy
- Load balancing
- API-first configuration
- Single binary
Quick Start
# Install
curl -fsSL https://getcaddy.com | bash
# Serve current directory with HTTPS
caddy file-server --domain yourdomain.com
# Reverse proxy
caddy reverse-proxy --from yourdomain.com --to localhost:3000
Admin API
# Get current config
curl localhost:2019/config/
# Set config
curl -X POST localhost:2019/config/ \
-H "Content-Type: application/json" \
-d '{"apps":{"http":{"servers":{"main":{"listen":[":443"],"routes":[{"match":[{"host":["example.com"]}],"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"localhost:3000"}]}]}]}}}}}'
# Add route dynamically
curl -X POST localhost:2019/config/apps/http/servers/main/routes \
-d '{"match":[{"host":["api.example.com"]}],"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":"localhost:8080"}]}]}'
Caddyfile (simpler config)
example.com {
reverse_proxy localhost:3000
}
api.example.com {
reverse_proxy localhost:8080
}
Use Cases
- HTTPS proxy — automatic SSL for any backend
- Static hosting — serve files with HTTPS
- Load balancer — distribute traffic
- API gateway — route and secure APIs
- Development — local HTTPS for testing
Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)