Skip to content
VPS, Dedicated Servers and Colocation across ServerBike service locations

Developer reference

Browser console

Opening a browser-based console session from your own portal. Console access is included with every plan.

Public API 1.1.1Plan dependent
Documentation menu
Official API documentation · version 1.1.1View raw CONSOLE.md

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/<ticket>) 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://<hostname>, 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
<div id="screen"></div>
<script type="module">
  import RFB from '/assets/novnc/core/rfb.js';             // serve noVNC from your own portal
  const r = await fetch('/my-portal/console-ticket?service=...', {method: 'POST', credentials: 'same-origin'});
  const {console_path} = await r.json();                     // your backend called the API (never the browser)
  const rfb = new RFB(document.getElementById('screen'), 'wss://bridge.serverbike.com' + console_path);
  rfb.scaleViewport = true;
</script>