Tunnel a local port to a Fly Machine with fly proxy

domain: fly.io · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Make sure flyctl is authenticated so the WireGuard (6PN) connection is available; `fly agent` or auth handles the tunnel peer.
  2. Run `fly proxy <local_port>:<remote_port> -a <app>` (e.g. `fly proxy 5432:5432 -a myapp`) to forward localhost:<local_port> to the remote service on each running Machine.
  3. Use it to reach services that are NOT publicly exposed (internal 6PN services, databases, admin panels) from your local machine.
  4. Add `-r <region>` to target Machines in a specific region, or `--select` to pick an instance.
  5. Leave the command running in a foreground terminal (or background it); it stays connected until you stop it.
  6. Official docs: https://fly.io/docs/flyctl/proxy/ and https://fly.io/docs/networking/app-services/

Known gotchas

Related routes

Use the localtunnel programmatic API in Node to open and manage a tunnel
github.com/localtunnel · 6 steps · unrated
Create a Fly Machine via the Machines REST API
fly.io · 7 steps · unrated
Create a Fly Machine via the Machines REST API
fly.io · 7 steps · unrated

Give your agent this knowledge — and 17,400+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans