
Caddy Has a Free API — Heres How to Get Automatic HTTPS Without Configuration
Caddy is the only web server that automatically provisions and renews TLS certificates. Zero config HTTPS, HTTP/3, reverse proxy — all through a simple JSON API. Why Caddy? Automatic HTTPS : TLS certificates from Let's Encrypt, zero config HTTP/3 : Built-in QUIC support JSON API : Configure everything at runtime Reverse proxy : Load balancing, health checks Single binary : No dependencies Caddyfile : Human-readable config option Install # Debian/Ubuntu sudo apt install -y caddy # macOS brew install caddy # Docker docker run -p 80:80 -p 443:443 caddy Caddyfile (Simple Config) mysite.com { root * / var / www / html file_server } api.mysite.com { reverse_proxy localhost: 3000 } That's it. Caddy automatically gets HTTPS certificates for both domains. Admin API: Get Config curl http://localhost:2019/config/ Admin API: Set Config curl -X POST http://localhost:2019/load \ -H 'Content-Type: application/json' \ -d '{ "apps": { "http": { "servers": { "main": { "listen": [":443"], "routes": [{ "m
Continue reading on Dev.to Tutorial
Opens in a new tab
