Your API runs on 127.0.0.1 and something on the internet needs to reach it — a
payment provider sending webhooks, a colleague reviewing a feature, a mobile app on
real hardware. A tunnel gives that local server a public HTTPS address.
Start the tunnel
- Sign in to SchemaClient. Tunneling routes traffic through our servers, so unlike the REST client it needs an account.
- Open the Tunnel tab.
- Set the target to whatever your dev server is bound to:
http://127.0.0.1:8000
- Click Start Tunnel.
- Copy the public URL that appears — it looks like
https://u1-a3f9.schemaclient.com.
Anything sent to that URL is forwarded to your local port, and the response travels back the same way.
Check it works
From any machine, or just a different network:
curl https://u1-a3f9.schemaclient.com/health
If that returns what http://127.0.0.1:8000/health returns locally, the tunnel is up.
When it does not work
- 502 or connection refused — your local server is not actually running, or it is bound to a different port than the one you tunnelled.
- Works locally, 404 through the tunnel — your framework is checking the
Hostheader. Add the tunnel hostname to the allowed-hosts list. In Django that isALLOWED_HOSTS; in Rails,config.hosts. - Assets break — the app is generating absolute
http://localhostURLs somewhere. Look for a hardcoded base URL in the config.
Watch the traffic
The point of tunneling through an API client rather than a bare tunnel is that every request is captured. See monitoring API traffic for filtering and replay, or go straight to testing webhooks locally, which is what most people want a tunnel for in the first place.