caddy reverse-proxy --from example.com --to localhost:3000

Category: Web Servers & Proxies

caddy reverse-proxy --from example.com --to localhost:3000

Proxy a domain to a local backend app

Creates a reverse proxy (a server that forwards requests to a backend app) that accepts traffic for example.com and forwards it to an app on port 3000. Caddy automatically provisions HTTPS for the domain via Let's Encrypt. For a local test without a domain, use --from :8080 instead.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.