HookDeploy
Beginner

Local Webhook Testing — ngrok, Cloudflare Tunnel, HookDeploy, and VS Code

Compare ngrok, Cloudflare Tunnel, HookDeploy forwarding, and VS Code port forwarding for getting webhooks to your local dev server.

HookDeploy Team · May 22, 2026

Your webhook handler runs on localhost:3000. Stripe runs on the internet. Something has to bridge the gap. Here are four approaches, when to use each, and how they work with HookDeploy.

The four approaches

ApproachHow it worksLocal server required?
ngrokTunnel from public HTTPS URL to localhostYes, while tunneling
Cloudflare TunnelCloudflare edge proxies to local serviceYes, while tunneling
HookDeploy forwardingCapture at HookDeploy URL, proxy to your serverOnly when forwarding
VS Code port forwardingDev tunnel from VS Code to localhostYes, while VS Code runs

ngrok

The most popular option. ngrok runs a local agent that creates a public URL:

ngrok http 3000
# Forwarding: https://abc123.ngrok.io -> http://localhost:3000

Point your webhook sender at https://abc123.ngrok.io/webhooks/stripe. Traffic hits your local server live.

Pros: Live debugging, works with breakpoints, supports TCP/TLS tunnels Cons: URL changes on free tier, agent must stay running, session expires

With HookDeploy: Set HookDeploy forward URL to your ngrok URL. Capture history in HookDeploy plus live processing on localhost.

Cloudflare Tunnel

Cloudflare’s cloudflared daemon creates a tunnel without opening ports:

cloudflared tunnel --url http://localhost:3000
# Creates a random *.trycloudflare.com URL

For persistent URLs, configure a named tunnel with a Cloudflare domain.

Pros: No port forwarding on router, free tier available, integrates with Cloudflare ecosystem Cons: Setup more complex than ngrok for named tunnels, requires cloudflared running

With HookDeploy: Same pattern as ngrok — forward from HookDeploy to your trycloudflare.com URL.

HookDeploy forwarding

Skip the tunnel entirely during capture. Point the webhook sender at HookDeploy:

Stripe → https://hookdeploy.dev/h/abc123 → HookDeploy stores payload

When your local server is ready, either:

  1. Auto-forward — set forward URL to your tunnel URL. Every webhook is captured and proxied live.
  2. Manual replay — click Replay in the dashboard to send a captured request to localhost.
# Your server doesn't need to be running when the webhook arrives
# Inspect in HookDeploy, then replay when ready:
# Replay target: https://abc123.ngrok.io/webhooks/stripe

Pros: Capture without local server, persistent history, team sharing, replay on demand Cons: Forward/replay adds latency, not live debugging unless combined with a tunnel

VS Code port forwarding

VS Code (and GitHub Codespaces) can expose local ports via dev tunnels:

  1. Run your server on port 3000
  2. Open Ports tab in VS Code
  3. Set visibility to Public
  4. Copy the forwarded URL

Pros: Built into your editor, no extra install, works in Codespaces Cons: Tied to VS Code session, less configurable than ngrok, not ideal for team sharing

Comparison table

ngrokCloudflare TunnelHookDeployVS Code
Setup time1 min2–5 min30 sec1 min
Persistent URLPaidNamed tunnelAlwaysSession only
Capture without local serverNoNoYesNo
Request historyLimitedNoYesNo
Team sharingNoNoYesNo
ReplayNoNoYesNo
Live debuggingYesYesWith forwardYes
Free tierYesYesYesYes

Solo dev, quick test: HookDeploy only. Capture, inspect, replay to localhost when ready.

Active handler development: ngrok + HookDeploy. Forward URL set to ngrok. Live debugging plus history.

CI/CD pipeline: HookDeploy REST API only. No tunnel needed — verify capture programmatically.

Codespaces / remote dev: VS Code port forwarding for live traffic, HookDeploy for capture and replay.

Example: HookDeploy + ngrok together

# Terminal 1
ngrok http 3000

# Terminal 2
npm run dev

# In HookDeploy dashboard:
# 1. Create endpoint → https://hookdeploy.dev/h/abc123
# 2. Set forward URL → https://YOUR-NGROK.ngrok.io/webhooks/stripe
# 3. Point Stripe at HookDeploy URL

Flow: Stripe → HookDeploy (capture) → ngrok → localhost (your handler).

If ngrok goes down, webhooks are still captured in HookDeploy. Replay them when the tunnel is back.

Related guides