Tools: Caddy Server Is Free — Auto-HTTPS Reverse Proxy in One Line (2026)
Nginx Is Powerful. Caddy Is Simple.
Install
Reverse Proxy in One Line
Caddyfile (Multiple Services)
Caddy API
Caddy vs Nginx vs Traefik Caddy automatically provisions and renews SSL certificates. No certbot, no cron, no manual renewal. One line of config gives you HTTPS. That is it. Auto-HTTPS. Auto-renewal. Zero configuration files. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse
# Ubuntu/Debian
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https
-weight: 500;">curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/gpg.key | -weight: 600;">sudo -weight: 500;">apt-key add -
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # Or just download the binary
-weight: 500;">curl -o caddy https://caddyserver.com/api/download?os=linux&arch=amd64
# Ubuntu/Debian
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https
-weight: 500;">curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/gpg.key | -weight: 600;">sudo -weight: 500;">apt-key add -
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # Or just download the binary
-weight: 500;">curl -o caddy https://caddyserver.com/api/download?os=linux&arch=amd64
# Ubuntu/Debian
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install -y debian-keyring debian-archive-keyring -weight: 500;">apt-transport-https
-weight: 500;">curl -1sLf https://dl.cloudsmith.io/public/caddy/stable/gpg.key | -weight: 600;">sudo -weight: 500;">apt-key add -
-weight: 600;">sudo -weight: 500;">apt -weight: 500;">install caddy # Or just download the binary
-weight: 500;">curl -o caddy https://caddyserver.com/api/download?os=linux&arch=amd64
caddy reverse-proxy --from yourdomain.com --to localhost:3000
caddy reverse-proxy --from yourdomain.com --to localhost:3000
caddy reverse-proxy --from yourdomain.com --to localhost:3000
yourdomain.com { reverse_proxy localhost:3000
} api.yourdomain.com { reverse_proxy localhost:8080
} static.yourdomain.com { root * /var/www/static file_server
}
yourdomain.com { reverse_proxy localhost:3000
} api.yourdomain.com { reverse_proxy localhost:8080
} static.yourdomain.com { root * /var/www/static file_server
}
yourdomain.com { reverse_proxy localhost:3000
} api.yourdomain.com { reverse_proxy localhost:8080
} static.yourdomain.com { root * /var/www/static file_server
}
import requests # Load config
def update_config(config): r = requests.post("http://localhost:2019/load", headers={"Content-Type": "application/json"}, json=config) return r.status_code == 200 # Add a route dynamically
def add_route(domain, upstream): config = { "apps": {"http": {"servers": {"srv0": { "listen": [":443"], "routes": [{ "match": [{"host": [domain]}], "handle": [{"handler": "reverse_proxy", "upstreams": [{"dial": upstream}]}] }] }}}} } return update_config(config)
import requests # Load config
def update_config(config): r = requests.post("http://localhost:2019/load", headers={"Content-Type": "application/json"}, json=config) return r.status_code == 200 # Add a route dynamically
def add_route(domain, upstream): config = { "apps": {"http": {"servers": {"srv0": { "listen": [":443"], "routes": [{ "match": [{"host": [domain]}], "handle": [{"handler": "reverse_proxy", "upstreams": [{"dial": upstream}]}] }] }}}} } return update_config(config)
import requests # Load config
def update_config(config): r = requests.post("http://localhost:2019/load", headers={"Content-Type": "application/json"}, json=config) return r.status_code == 200 # Add a route dynamically
def add_route(domain, upstream): config = { "apps": {"http": {"servers": {"srv0": { "listen": [":443"], "routes": [{ "match": [{"host": [domain]}], "handle": [{"handler": "reverse_proxy", "upstreams": [{"dial": upstream}]}] }] }}}} } return update_config(config)