
Caddy Has a Free API You've Never Heard Of
Caddy is a web server with automatic HTTPS. Unlike Nginx, it handles TLS certificates automatically and has a powerful REST API for dynamic configuration — no restarts needed. What Makes Caddy Special? Automatic HTTPS — Let's Encrypt certificates out of the box REST API — modify configuration without restarts Caddyfile — human-readable config format Zero-downtime config — hot-reload via API Single binary — no dependencies The Hidden API: Dynamic Configuration Caddy exposes a full REST API for live configuration: # Get current config curl localhost:2019/config/ | jq . # Add a new site dynamically — no restart! curl -X POST localhost:2019/config/apps/http/servers/srv0/routes \ -H 'Content-Type: application/json' \ -d '{ "match": [{"host": ["api.example.com"]}], "handle": [{ "handler": "reverse_proxy", "upstreams": [{"dial": "localhost:3000"}] }] }' # Update upstream without downtime curl -X PATCH localhost:2019/config/apps/http/servers/srv0/routes/0/handle/0/upstreams \ -H 'Content-Type:
Continue reading on Dev.to DevOps
Opens in a new tab


