Reverse proxy quick-start

This guide will show you how to get a production-ready reverse proxy up and running quickly.


  • Basic terminal / command line skills
  • caddy in your PATH
  • A running backend process to proxy to

There are two easy ways to get a quick reverse proxy up and running. We'll show you two equivalent ways to do the same thing.

This tutorial assumes you have a backend HTTP service running on

Command line

In your terminal, run this command:

caddy reverse-proxy --to

If you don't have permission to bind to low ports, you can proxy from a higher port:

caddy reverse-proxy --from :2016 --to

Then make a request to localhost (or whatever address you specified in --from) to see it working!


In the current working directory, create a file called Caddyfile with these contents:



Then, from the same directory, run:

caddy run

You can then make a request to https://localhost to see it working!

It's easy to change the proxy's address:



Make sure to reload Caddy (or stop and start it again) when you change the Caddyfile.

Now you can access the proxy at localhost:2016.

There is a lot more you can do with the reverse_proxy directive.