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
  • Heads up on Cloudflare Tunnel — I've been using it for webhook dev and it's solid, but there's a gotcha with the dashboard URL. The tunnel gives you a random subdomain by default, which changes on restart. You can fix this with a named tunnel:

    cloudflared tunnel create my-webhook-dev
    cloudflared tunnel route dns my-webhook-dev my-webhook.example.com
    cloudflared tunnel run my-webhook-dev

    Also worth noting: FieldPulse webhooks retry on non-2xx responses, so if your local handler is down for a minute, you'll get a flood of retries when it comes back up. I usually add a quick health check middleware that returns 200 for HEAD requests just to keep the tunnel alive.

    YMMV but that's been working for me for ~6 months now.

Reply
  • Heads up on Cloudflare Tunnel — I've been using it for webhook dev and it's solid, but there's a gotcha with the dashboard URL. The tunnel gives you a random subdomain by default, which changes on restart. You can fix this with a named tunnel:

    cloudflared tunnel create my-webhook-dev
    cloudflared tunnel route dns my-webhook-dev my-webhook.example.com
    cloudflared tunnel run my-webhook-dev

    Also worth noting: FieldPulse webhooks retry on non-2xx responses, so if your local handler is down for a minute, you'll get a flood of retries when it comes back up. I usually add a quick health check middleware that returns 200 for HEAD requests just to keep the tunnel alive.

    YMMV but that's been working for me for ~6 months now.

Children
No Data