// use case
Expose your FastAPI dev server to Discord for Discord interactions
Reserve a stable subdomain
On the lrok free plan you keep one reserved subdomain forever. Pick a name your Discord dashboard can hold onto — webhook URLs that survive laptop restarts mean fewer dashboard re-pastes.
$ lrok reserve fas-discord Reserved https://fas-discord.lrok.ioRun your FastAPI app
Start the dev server on port 8000 (the FastAPI default).
$ uvicorn main:app --reloadTunnel localhost to the public URL
lrok forwards https://fas-discord.lrok.io/webhook → http://127.0.0.1:8000/webhook. The flag --hint binds your reserved subdomain to this tunnel.
$ lrok http 8000 --hint fas-discord Forwarding https://fas-discord.lrok.io -> http://127.0.0.1:8000Paste the URL into Discord
Discord application → General Information → Interactions Endpoint URL. Paste https://fas-discord.lrok.io/webhook as the destination.
Watch deliveries land in the request inspector
Every webhook Discord sends shows up at lrok.io/dashboard with full body, headers, status, and latency. Re-deliver any request to your FastAPI handler with one click. Verify the X-Signature-Ed25519 + X-Signature-Timestamp headers using your application's public key. Reject any mismatch with 401, otherwise Discord disables your bot.
// why lrok for this
lrok's reserved subdomain is free and lives forever, so your Discord discord interactions 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
- Expose your Next.js dev server to Discord for Discord interactions
- Expose your Django dev server to Discord for Discord interactions
- Expose your Rails dev server to Discord for Discord interactions
- Expose your FastAPI dev server to Stripe for Stripe webhooks
- Expose your FastAPI dev server to GitHub for GitHub webhooks