Skip to main content
This page covers desktop URLs. For every URL that carries a token, read Security and isolation.

Embed the stream in your app

1

Ask for a URL on your server

On each page load, your server calls the desktop endpoint with your API key. Do not put the API key in the browser.
curl
BOAT_API_BASE is https://boat.dev/api/v1. The response has desktopUrl.
2

Hide the viewer overlay (optional)

Add overlay=0 to the query string, before the #. The side panel and the stats text then never show. The token stays in the fragment.
3

Put the URL in an iframe

How long a desktop URL works

What happens when you open the desktop

  1. The CLI or the dashboard asks boat for a new signed-in desktop URL for your sandbox.
  2. If the desktop stream is not ready, boat prepares it.
  3. boat opens the browser viewer.
The URL opens a browser page. It looks like this:
boat generates the host, the IDs and the token for the running sandbox. boat desktop also prints a viewerUrl. It carries the same token, so treat it the same way.

How the Moonlight viewer handles the token

  • The viewer removes the fragment from the URL at once.
  • The viewer sends the token in authenticated request headers and in the first WebSocket frame.
  • The viewer never puts the token in an HTTP or WebSocket request URL.

Security model

Anyone who has the full URL can attach to that desktop session. Treat the URL as sensitive:
  • Do not paste the full URL into shared chats or logs.
  • To give another person lasting access to a sandbox, use an organization. Do not share a desktop URL.

After a stop, resume or fork

  • When you stop a sandbox, the desktop is not available. Resume the sandbox to use it again.
  • Desktop programs do not survive a resume or a fork. Open Chrome again and restart your app or dev server.
  • The computer tools come back by themselves. boat restarts the desktop daemon behind them with the sandbox.