Skip to content

Fix 1008 token_missing on Railway: inject gateway token in proxy#146

Merged
vignesh07 merged 1 commit into
mainfrom
fix/gateway-token-proxy
Feb 21, 2026
Merged

Fix 1008 token_missing on Railway: inject gateway token in proxy#146
vignesh07 merged 1 commit into
mainfrom
fix/gateway-token-proxy

Conversation

@vignesh07

Copy link
Copy Markdown
Owner

Fixes #141.

Problem:

  • The OpenClaw Control UI runs in the browser and cannot add custom Authorization headers to WebSocket connections.
  • On Railway, we proxy /openclaw -> gateway; without an auth token, the gateway rejects with 1008 token_missing.
  • This prevents pairing requests from being created, so openclaw devices list shows no requestId.

Fix:

  • Inject Authorization: Bearer <OPENCLAW_GATEWAY_TOKEN> into all proxied HTTP + WS requests at the wrapper.
  • Update README pairing troubleshooting to note you shouldn't need to paste the token when using /openclaw.

Tests:

  • npm test

@vignesh07 vignesh07 merged commit ec47e7c into main Feb 21, 2026
1 check passed
@vignesh07 vignesh07 deleted the fix/gateway-token-proxy branch February 21, 2026 11:18
gginesta pushed a commit to gginesta/clawdbot-railway-template that referenced this pull request Mar 10, 2026
- Add tini as init process to reap zombie processes
- Update server.js with all upstream fixes:
  - vignesh07#164 don't require Basic auth on WS upgrades
  - vignesh07#159 exempt /hooks/* from dashboard auth
  - vignesh07#150 dashboard auth + token sync
  - vignesh07#146 inject gateway token for proxied http+ws
  - vignesh07#143 strip legacy CLAWDBOT_* env vars
  - vignesh07#131 prevent double-response on onboard fail
- Update railway.toml: don't hardcode PORT

Preserves our custom Dockerfile (Tailscale, Brave, Syncthing, Chromium)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requestId stopped from appearing completely

1 participant