# Browser console (noVNC over WSS) The console lets your customer use the server's screen and keyboard from your portal. Your backend asks for a one-use ticket; the customer's browser connects with it directly. Your API secret never reaches the browser. ## Flow 1. The customer, signed in to **your** portal, opens the console page of a service. 2. Your backend checks that this customer owns the service and that the product grants `vps.console`. 3. Your backend calls `POST /api/v1/services/{service_uuid}/console-sessions` with `{"origin": "https://portal.example.com"}` — the exact Origin of the page that will open the WebSocket. 4. The answer has `console_path` (`/console/v1/`) and `expires_at` (≤ 60 s). 5. Your page connects a noVNC client to `wss://bridge.serverbike.com` + `console_path`, from that Origin, before `expires_at`. The ticket works once. 6. To reconnect (network drop, page reload), ask your backend for a new ticket. ## Rules * The Origin must be your registered portal hostname (`https://`, default port) or an origin ServerBike added for you. Any other Origin is refused (`400` at issuance, refused handshake at connect). * The WebSocket goes to port 443 of the API hostname. Allow it in your page's Content Security Policy: `connect-src wss://bridge.serverbike.com`. * Do not log ticket URLs (in your server logs, analytics, error reporting or browser history tools); treat a `console_path` like a short-lived password. * A suspended service gets no console (`409 SERVICE_SUSPENDED`). An unavailable console answers `503`. * Sessions have idle and maximum durations; the server may close a session, and a network edge may close an idle WebSocket. Reconnect with a new ticket. * Copy from the server's screen is not available; pasting is sent as typed keys by the packaged client (up to 2000 characters, US layout). ## Minimal page (sketch) ```html
```