Check on the Pi: docker ps. If you see a Foundry container, localhost inside the container is the container, not the Pi, so http://localhost:8787 would not reach the proxy. If Foundry runs directly on the Pi (no container, e.g. under systemd/pm2), skip this page.
Pick one option.
A. Host networking (simplest)
Run the container with network_mode: host (compose) or --network host (docker run). Then localhost is the Pi, the proxy can stay on 127.0.0.1, and the manifest URL is http://localhost:8787/<module-id>/module.json. Note that with host networking Docker's port mappings are ignored, so Foundry is simply reachable on its own port on the Pi.
B. Docker bridge address
Keep Foundry's normal networking and make the proxy listen on the bridge address, usually 172.17.0.1 (find it with ip -4 addr show docker0; compose projects use their own bridge, see docker network inspect <network> → Gateway). Edit /etc/foundry-release-proxy/env:
HOST=172.17.0.1
PUBLIC_BASE_URL=http://172.17.0.1:8787
Restart the service and use http://172.17.0.1:8787/<module-id>/module.json in Foundry. PUBLIC_BASE_URL must be set to this address, because it is what gets written into the manifest's download link, and that link is fetched from inside the container.
The bridge address is not reachable from your LAN, so only containers on this Pi can use the proxy. If the Pi runs a firewall (ufw), allow port 8787 from the Docker subnet (sudo ufw allow from 172.17.0.0/16 to any port 8787).
Do not bind to 0.0.0.0 unless you understand the consequence: anyone on your network could then download your private modules.
Test from inside the container: docker exec <foundry-container> curl -sI http://172.17.0.1:8787/transformations/module.json (or wget -qSO- ... if the image has no curl).
Next: Install a Module in Foundry.
This page mirrors the Private GitHub Proxy wiki on GitHub.