Embed a remote Chromium browser in your SaaS app
A SaaS application can place a remote browser session inside its own interface. The page being browsed runs in Chromium on a BrowserBox host; the user interacts with a view from the SaaS page. That can make sense for a support workspace, a managed research tool, or a product that lets customers work with an external web app without installing a local client.
There are two separate jobs: establish an authorized session and display it. An iframe or custom element supplies the display surface. Your application still needs to authenticate the user, allocate the right session, protect the session URL, enforce tenant boundaries and release the session. Embedding alone does none of those things.
What we ran: the code below, on one macOS machine with BrowserBox CLI v21.0.3 and @browserbox/hyper-frame 4.0.0, with the parent page and BrowserBox on the same computer, driven by headless Chrome on 2026-12-04. It is a local proof of the embed, not a production deployment. The embedding guide is the authority for the current controls.
Choose the boundary first
In a self-hosted deployment, your application authenticates a user and delivers that authorized client a BrowserBox session link. The BrowserBox host runs Chromium and connects to the destination. The parent page and remote session are different origins in a typical deployment. The embedder must be allowed by the BrowserBox server, while browser navigation and feature policy need separate configuration.
The session link is a secret capability, not a harmless identifier. Anyone who obtains a usable link may be able to join the session. Do not write it into application logs, analytics events, error reports, URLs on public pages, or support tickets. Deliver it only to the authorized user over a protected channel. Prevent one tenant from receiving another tenant's link, and test revocation and cleanup. An origin allowlist limits which parent pages may embed the service; it does not authenticate your SaaS user or validate a tenant's entitlement.
For a pool of independent sessions, Fleet describes a fixed Linux user pool. An already-authenticated application acquires a seat, returns its login URL to that user and releases the allocation. The CLI help says each allocation receives a fresh login token and, by default, a clean browser profile. This is an operational contract to verify, including failures and cleanup; it is not evidence that the allocation has been tested here. Fleet requires root or passwordless sudo, Linux and suitable routing. Production subdomain routing requires wildcard DNS and TLS, nginx and port 443.
A working local example
You need a licensed BrowserBox install (bbx certify already done), Python 3, and a locally trusted TLS certificate for localhost and 127.0.0.1 (fullchain.pem and privkey.pem; we used certificates made with mkcert in ~/sslcerts). Use a disposable instance: bbx setup writes the instance configuration and, in our run, issued a new login token.
Set the allowed parent origins in the shell that configures and starts the service:
export ALLOWED_EMBEDDING_ORIGINS="https://localhost:8765"
bbx setup -p 8888 --hostname localhost
bbx start
Save this as index.html. The element is registered by the module script; without it, <hyper-frame> is an unknown tag.
<!doctype html>
<meta charset="utf-8">
<title>Parent app</title>
<script type="module" src="https://cdn.jsdelivr.net/npm/@browserbox/hyper-frame@4.0.0/src/hyper-frame.js"></script>
<hyper-frame id="remote"
login-link="__LOGIN_LINK__"
embedder-origin="__PARENT_ORIGIN__"
media-permissions="none"
width="100%" height="600"></hyper-frame>
<pre id="log">waiting</pre>
<script type="module">
const out = document.querySelector('#log');
try {
await customElements.whenDefined('hyper-frame');
const remote = document.querySelector('#remote');
await remote.whenReady();
out.textContent = 'ready';
await remote.page.navigate('https://example.com');
await new Promise(done => setTimeout(done, 3000));
out.textContent += '\nurl: ' + await remote.page.url();
out.textContent += '\ntitle: ' + await remote.page.title();
} catch (error) {
out.textContent += '\nerror: ' + error.message;
}
</script>
Save this next to it as parent.py. It reads the login link that BrowserBox writes under ~/.config/dosaygo/bbpro/ and puts it into the page at request time, so the link never sits in your source files. It has no user authentication: it listens on the loopback address only and is for this test, not for production.
import html, http.server, os, pathlib, ssl
home = pathlib.Path.home()
link_file = home / '.config/dosaygo/bbpro/login.link'
certs = pathlib.Path(os.environ.get('CERT_DIR', str(home / 'sslcerts')))
origin = os.environ.get('PARENT_ORIGIN', 'https://localhost:8765')
class Page(http.server.BaseHTTPRequestHandler):
def do_GET(self):
if self.path != '/':
return self.send_error(404)
try:
link = link_file.read_text().strip()
except FileNotFoundError:
return self.send_error(503, 'BrowserBox is not running')
body = pathlib.Path('index.html').read_text()
body = body.replace('__LOGIN_LINK__', html.escape(link))
body = body.replace('__PARENT_ORIGIN__', html.escape(origin))
self.send_response(200)
self.send_header('Content-Type', 'text/html; charset=utf-8')
self.send_header('Cache-Control', 'no-store')
self.send_header('Referrer-Policy', 'no-referrer')
self.end_headers()
self.wfile.write(body.encode())
def log_message(self, *args):
pass
server = http.server.ThreadingHTTPServer(('127.0.0.1', 8765), Page)
tls = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
tls.load_cert_chain(certs / 'fullchain.pem', certs / 'privkey.pem')
server.socket = tls.wrap_socket(server.socket, server_side=True)
print('open ' + origin, flush=True)
server.serve_forever()
Then run it from the same directory and open the printed address:
python3 parent.py
The text under the frame read:
ready
url: https://example.com/
title: example.com
The frame showed the remote browser with example.com loaded.
What we measured, and the failure cases
| Check | Observed |
|---|---|
Allowed parent, https://localhost:8765 |
Element reached ready; page.navigate, page.url and page.title returned the values above. |
Parent origin not on the allowlist, https://127.0.0.1:8765 |
hyper-frame ready timeout after 30000ms. The server's frame-ancestors header did not include that origin. |
Same parent after setting ALLOWED_EMBEDDING_ORIGINS to it and running stop, setup and start |
Element reached ready and returned the same URL and title; the header now listed https://127.0.0.1:8765. |
Inner iframe allow list with media-permissions="none" |
accelerometer; encrypted-media; geolocation; gyroscope; midi; clipboard-read; clipboard-write; web-share; fullscreen (no camera, microphone or display-capture). |
After bbx stop |
bbx status reported Not Running and a request to port 8888 was refused. |
Two details matter for review. First, the allowlist setting added our origin to a built-in frame-ancestors list: on this install the header already allowed https://localhost:* and some DOSAYGO-operated domains, including https://*.dosaygo.com and cloudtabs.net hosts. Read the header your own deployment sends (curl -sI https://your-browser-host:port/) and decide whether that list is acceptable; do not assume it contains only your origin. Second, media-permissions="none" removed only the media capture features. Clipboard and geolocation stayed in the frame's allow list, so control those through browsing policy and your own requirements.
To start the parent page on the other loopback name for the allowlist test, run PARENT_ORIGIN=https://127.0.0.1:8765 python3 parent.py and open that address.
embedder-origin should be the actual parent origin. A raw iframe is a different integration surface: do not assume the custom element's attributes or API methods work on it. A permissive parent application's own content security policy, or a reverse proxy that changes headers, can also affect whether a frame loads, so diagnose each layer separately.
Not tested here: a remote or public host, publicly issued certificates, a reverse proxy, human mouse and keyboard input, resize, audio, browsers other than Chrome, Fleet, a second tenant, and whether an old login link still works after a later restart.
License the element, too
The hyper-frame repository publishes the element under AGPL-3.0-or-later, separately from BrowserBox itself, which is commercial software. Have whoever owns open source compliance in your company read that license before you ship it inside a SaaS front end, and ask BrowserBox Sales about your case. We pinned version 4.0.0 and loaded it from the jsDelivr CDN; for production, serve a reviewed copy from your own origin.
Understand controls and API scope
The guide documents ui-visible="false" and allow-user-toggle-ui="false" as explicit embedder controls. It also documents first-load-cleanse for closing existing tabs once when the webview API becomes ready, optionally opening a replacement tab. Those controls affect the session experience; they do not grant user authorization or establish data isolation. Test behavior against your version, particularly if the session might already contain work another user expects to keep.
The guide separately documents session-unload-warning="none" for suppressing the BrowserBox wrapper's session-leave warning, and a remote page's own before-unload behavior. These are different events. Suppressing a warning can cause users to lose unsaved work, so use it only when your parent application has an appropriate navigation and recovery design.
Avoid guessing method names from another release. The embedding chapter documents modal lifecycle and dismissal controls for its version; follow those names and events exactly and check the deployed version. A hosted browser service's REST API is not the self-hosted Fleet interface; check which one your deployment runs. Similarly, a generic iframe cannot be assumed to expose the custom element's methods.
The CLI also offers an offline policy decision check. On the tested macOS host with v21.0.3 and its saved policy on the compat baseline, these commands produced the selected fields below:
bbx policy check --action navigate --url http://10.0.0.5/
bbx policy check --action navigate --url https://example.com/
allowed: false reasonCode: private-network-allowlist-deny
allowed: true reasonCode: navigation-open
These are decisions for two inputs, not actual connections or proof of tenant separation. Limit network egress independently, especially when customers can navigate to arbitrary URLs. The remote browser may have a route to addresses that a user's own device cannot reach. A private network allowlist, DNS behavior and firewall rules all need tests for the deployed topology.
License and total cost
BrowserBox pricing, in US dollars:
| Option | Published price and scope |
|---|---|
| Commercial | $119 per concurrent seat per year; one-seat minimum; updates and support during the term. |
| Non-commercial | $49 per seat per year for eligible nonprofits, NGOs and government; 25-seat minimum, $1,225 per year. |
| Organization evaluation | 14 days, up to two concurrent sessions, for a verified organization work email. Current fee and review terms are on the evaluation page. |
| Paid 7-day evaluation | Up to ten seats; one-time fee per seat, refunded after your commercial license payment succeeds; otherwise all sales are final. |
A seat is a concurrent user, not necessarily a registered SaaS account. Plan for peak simultaneous demand and confirm licensing for your use case. The license is one part of cost: include the host, browser resources, outbound traffic, certificates, monitoring, operator time and customer support. BrowserBox is commercial software and requires a valid license, including for development and evaluation.
When not to choose BrowserBox
If you need a fully managed browser service and do not want to run or secure hosts, self-hosting adds work you may not want. If your product needs a documented hosted REST contract with no Linux pool operations, check the specific service and its terms rather than assuming Fleet is that API. If an air-gapped deployment is mandatory, the documented licensing connectivity is a blocker. If the AGPL license on the embed element does not fit how you ship your front end, settle that first. If your customer's workflow depends on a browser capability that does not work through the embedded view, verify an alternative before committing to the integration.
Start with a disposable environment and one authorized test user. Prove the embedded session and teardown from your own origin before building the surrounding product. Request an evaluation.