Testing webhooks locally without public URL

Need to test webhook payloads on localhost. Currently using ngrok but connection drops after 2 hours on free tier. Looking for alternatives that don't require public deployment.

Specifically:

  • Need stable tunnel for multi-day testing
  • Must inspect raw POST body for signature verification
  • Running Node.js handler locally

What are people using? Cloudflare Tunnel? LocalStack? Something else?

Parents
  • Yeah this one tripped me up too when I first looked at it — the free ngrok timeout is brutal for webhook testing.

    What I do now: Cloudflare Tunnel for the stable endpoint, plus ngrok only when I need to inspect traffic in their nice web UI. Best of both worlds.

    For raw body inspection (critical for signature verification), here's a minimal Express middleware I use:

    const rawBodyMiddleware = (req, res, next) => {
      let raw = '';
      req.on('data', chunk => raw += chunk);
      req.on('end', () => {
        req.rawBody = raw;
        next();
      });
    };

    Then verify the signature with req.rawBody before JSON parsing mangles whitespace.

    Pro tip: if you're testing the actual retry behavior, use the Test Webhook button in Settings > Integrations > Webhooks — it sends a real payload with a test event type. Way better than curl-ing fake JSON and wondering why signature verification fails.

    More context in Setting Up Webhooks and Webhook Not Firing on Job Completion if you hit delivery issues.

Reply
  • Yeah this one tripped me up too when I first looked at it — the free ngrok timeout is brutal for webhook testing.

    What I do now: Cloudflare Tunnel for the stable endpoint, plus ngrok only when I need to inspect traffic in their nice web UI. Best of both worlds.

    For raw body inspection (critical for signature verification), here's a minimal Express middleware I use:

    const rawBodyMiddleware = (req, res, next) => {
      let raw = '';
      req.on('data', chunk => raw += chunk);
      req.on('end', () => {
        req.rawBody = raw;
        next();
      });
    };

    Then verify the signature with req.rawBody before JSON parsing mangles whitespace.

    Pro tip: if you're testing the actual retry behavior, use the Test Webhook button in Settings > Integrations > Webhooks — it sends a real payload with a test event type. Way better than curl-ing fake JSON and wondering why signature verification fails.

    More context in Setting Up Webhooks and Webhook Not Firing on Job Completion if you hit delivery issues.

Children