Caddy Reverse Proxy Configuration

Caddy handles TLS automatically via Let's Encrypt, making it the simplest way to add HTTPS to a reverse proxy. Generate your Caddyfile here and deploy in minutes.

One line

Caddy obtains and renews certificates automatically, so a reverse proxy site is just a hostname and an upstream.

example.com {
    reverse_proxy 127.0.0.1:3000
}

Forwarded headers

Caddy sets X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host for you, and passes the original Host header through by default.

Open the Reverse proxy generator

Frequently asked questions

Do I need to configure HTTPS in Caddy?

No. For a public hostname that resolves to the server, Caddy provisions a certificate and redirects HTTP to HTTPS on its own.

How do I proxy several apps?

Use one site block per hostname, or handle_path blocks to route path prefixes to different upstreams.

Guides