Expose a local service

You will end this page with public HTTP traffic reaching a port on your machine. This needs a free account and the macOS app, because forwarding runs through the desktop agent.

If you only want to inspect incoming requests, you do not need any of this — start with receive a webhook instead.

1. Start something locally

Any process listening on a port will do. If you have nothing handy, serve the current directory:

Run
python3 -m http.server 3000

2. Create an endpoint

Create an account, open Proxy Servers, then choose New Proxy → HTTP server.

Create an account

Three fields matter:

  • Local port — where your process listens, 3000 in the example above.
  • Public accesstrue lets anyone with the URL reach the endpoint. false restricts it to an address list.
  • IP whitelist — shown when access is not public. Accepts addresses and CIDR ranges, one per line or comma separated, such as 203.0.113.5 or 10.0.0.0/24.

The endpoint is created stopped, with a public URL of its own:

Your endpoint
https://your-endpoint.mercur.sh

3. Install the macOS app and sign in

Sign in inside the app with the same account. The app registers this machine as a device agent, which is what carries traffic from the relay to your port. The browser console can create and record, but it cannot forward, so this step has no web alternative.

4. Run the endpoint

Open the endpoint and press Run Proxy. Pick how this run should behave:

  • Log mode — records requests and answers 204. Nothing reaches your port.
  • Proxy mode — forwards to your port and stores nothing.
  • Log and Proxy — forwards and records.

For this walkthrough choose Proxy mode or Log and Proxy. Both require the desktop app; a browser-only session can start log mode only.

5. Send traffic through it

Run
curl -i https://your-endpoint.mercur.sh/

The response comes from your local process. Status codes and bodies pass through untouched, so a 404 from your app is a 404 here. If your port is closed, the endpoint answers 502 with the underlying connection error, which tells you the request reached the relay and failed on the last hop.

One machine holds an endpoint at a time. Running the same endpoint from a second device is refused while the first still holds it.

What the free plan includes

  • 1 endpoint of your own, HTTP only
  • 10,000 requests per month
  • 100 stored requests per endpoint
  • 5 request rewrites per endpoint
  • 8 concurrent sessions
  • Recorded live sessions up to 5 minutes

WebSocket and raw TCP endpoints are not part of the free plan. See limits for the full picture, and troubleshooting if traffic does not arrive.