FeaturesGuidesDocumentationPricingGet Started

n8n OAuth and Webhooks on Localhost

Expose n8n webhooks and OAuth callbacks locally with LocalToLink for workflow development.

Default n8n port

n8n typically runs on port 5678:

# Terminal 1
n8n start

# Terminal 2
npx localtolink --port 5678

Webhook URLs

n8n generates webhook URLs based on its configured base URL. For local testing with a tunnel, use the public URL in your workflow's Webhook node:

https://YOUR-SUBDOMAIN.localtolink.com/webhook/your-path

Or configure n8n's WEBHOOK_URL environment variable:

WEBHOOK_URL=https://YOUR-SUBDOMAIN.localtolink.com/ n8n start

Update this when the subdomain changes.

OAuth credentials in n8n

For nodes requiring OAuth (Google Sheets, Slack, etc.):

  1. Register redirect URI in the provider: https://YOUR-SUBDOMAIN.localtolink.com/rest/oauth2-credential/callback
  2. Create credentials in n8n using the same OAuth app
  3. Complete the OAuth flow in a browser (click through the interstitial once)

See OAuth Callback on Localhost for general OAuth guidance.

Notes

See Test Webhooks Locally.

Try it now

Start a tunnel from your project directory — no account required.

$ npx localtolink

See the full CLI reference for flags and exit codes.

LocalToLink CLI 1.0.1 — verified 2026-09-05