Reverse proxy localhost from docker

When in docker, localhost means “this same container”, i.e. Caddy’s own container.

If you want to proxy to another container, you need to use that container’s IP address, or service name. So you probably want reverse_proxy netdata:19999

Also, please upgrade to Caddy v2.3.0! :grinning_face_with_smiling_eyes:

Since I see you’re proxying on a subpath, here’s some additional reading materials about that:

I would recommend proxying with a subdomain like netdata.example.com instead of a subpath.