
Caddy Has a Free API: The Web Server with Automatic HTTPS
Why Caddy Caddy is a web server that gets HTTPS automatically — Let's Encrypt certificates provisioned and renewed without any configuration. Zero-downtime reloads, HTTP/3, reverse proxy — all built-in. Install brew install caddy # or curl -fsSL https://github.com/caddyserver/caddy/releases/latest/download/caddy_linux_amd64 -o /usr/local/bin/caddy Serve a Static Site (Automatic HTTPS) # Caddyfile mysite.com { root * / var / www / mysite file_server } That is it. Caddy automatically gets a TLS certificate from Let's Encrypt. Reverse Proxy api.mysite.com { reverse_proxy localhost: 8080 } app.mysite.com { reverse_proxy localhost: 3000 } Load Balancing api.mysite.com { reverse_proxy { to localhost: 8001 localhost: 8002 localhost: 8003 lb_policy round_robin health_uri / health health_interval 10s } } Caddy Admin API # Get current config curl http://localhost:2019/config/ # Update config without restart curl -X PATCH http://localhost:2019/config/apps/http/servers/srv0/routes \ -H 'Content-Ty
Continue reading on Dev.to DevOps
Opens in a new tab

