Documentation Index
Fetch the complete documentation index at: https://unkey.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Unkey Deploy is in public beta. To try it, open the product switcher in the
top-left of the dashboard and select Deploy. During beta, deployed
resources are free. We’re eager for feedback, so let us know what you think
on Discord, X, or
email support@unkey.com.
Using WebSockets
WebSockets work out of the box. There is nothing to enable in the dashboard or the CLI. Bind your WebSocket server to the port your app exposes and deploy as usual. A minimal Node.js example usingws:
wss:// — plaintext ws:// is not redirected.
Headers and routing
The standard proxy headers documented in Request lifecycle are added to the upgrade request, so your app can identify the original client IP, host, and deployment ID before it accepts the WebSocket. Routing rules apply to the upgrade request the same way they apply to any HTTP request: theHost header determines which deployment receives the connection, and Sentinel policies run before the upgrade is forwarded. A request that fails authentication or rate limiting is rejected before it ever becomes a WebSocket.
Limits
- Only HTTP/1.1 upgrades are forwarded today. Clients that negotiate WebSockets over HTTP/2 fall back to HTTP/1.1 automatically.
- If the upstream instance is unreachable, the upgrade fails with
503 Service Unavailableinstead of hanging. - Idle connections are still subject to your app’s own keepalive and timeout configuration. Send periodic ping frames if you want to keep an otherwise-idle session alive.

