// use case

Expose your Rails dev server to GitHub for GitHub webhooks

GitHub fires webhooks on every push, PR, and issue. You can't test the handler unless it's reachable from the public internet. lrok keeps the same URL across days so the webhook config in GitHub doesn't need rotating. Ruby on Rails dev server.
  1. Reserve a stable subdomain

    On the lrok free plan you keep one reserved subdomain forever. Pick a name your GitHub dashboard can hold onto — webhook URLs that survive laptop restarts mean fewer dashboard re-pastes.

    $ lrok reserve rai-github
      Reserved https://rai-github.lrok.io
  2. Run your Rails app

    Start the dev server on port 3000 (the Rails default).

    $ rails s
  3. Tunnel localhost to the public URL

    lrok forwards https://rai-github.lrok.io/webhooks → http://127.0.0.1:3000/webhooks. The flag --hint binds your reserved subdomain to this tunnel.

    $ lrok http 3000 --hint rai-github
      Forwarding https://rai-github.lrok.io  ->  http://127.0.0.1:3000
  4. Paste the URL into GitHub

    Repository → Settings → Webhooks → Add webhook. Paste https://rai-github.lrok.io/webhooks as the destination.

  5. Watch deliveries land in the request inspector

    Every webhook GitHub sends shows up at lrok.io/dashboard with full body, headers, status, and latency. Re-deliver any request to your Rails handler with one click. GitHub's X-Hub-Signature-256 header is HMAC-SHA-256 over the raw body. The "Recent Deliveries" tab lets you replay any payload — combine it with lrok's built-in inspector for a tight loop.

// why lrok for this

lrok's reserved subdomain is free and lives forever, so your GitHub github webhooks URL never rotates. $9/mo flat for unlimited tunnels — no SSO tax, no enterprise-only signature verification, no bandwidth metering. The request inspector is built in.

Related workflows