OpenClaw
OpenClaw drives a browser over CDP. It takes a cdpUrl in
its config, which is exactly what /connect returns.
The steps below use the current OpenClaw CLI, which needs Node.js 24. Older
releases reject a browser profile that has no color; add
"color": "#FF4500" to the profile if yours does.
-
Request a browser
Terminal window curl -s -D headers.txt -G "https://browser.rayobyte.com/connect" \--data-urlencode "os=windows" \--data-urlencode "proxy=$RAYOBYTE_PROXY" \-H "x-api-key: rb_live_YOUR_KEY" > cdp_url.txtexport RAYOBROWSE_CDP_URL="$(cat cdp_url.txt)"grep -i x-session-id headers.txtKeep the
x-session-idvalue. It is how you close the browser when the agent is done.--data-urlencodepercent-encodes the proxy, so a password containing&,#or@reaches the gateway intact. Pasting the proxy straight into the URL does not: a raw&splits it into two query parameters. -
Point OpenClaw at it
In
~/.openclaw/openclaw.json:{"browser": {"enabled": true,"defaultProfile": "rayobyte","profiles": {"rayobyte": {"cdpUrl": "PASTE_THE_RETURNED_CDP_URL_HERE"}}}}Or from the CLI:
Terminal window openclaw config set browser.enabled trueopenclaw config set browser.defaultProfile rayobyteopenclaw config set 'browser.profiles.rayobyte.cdpUrl' "$RAYOBROWSE_CDP_URL" -
Restart the OpenClaw gateway and check it
OpenClaw reads the config when its gateway starts, so restart it after
config set(the CLI printsRestart the gateway to apply.). Then:Terminal window openclaw browser --browser-profile rayobyte statusThe output shows
running: true,transport: cdpand thewss://sb-NN.browser.rayobyte.com/cdp/...URL you configured.
The URL expires, the config does not
Section titled “The URL expires, the config does not”cdpUrl in the config file points at one browser. When that session ends, the
agent keeps trying to reach a browser that no longer exists and every task fails
at the connection.
Give the session a long life and refresh the config when it runs out:
curl -s -G "https://browser.rayobyte.com/connect" \ --data-urlencode "os=windows" \ --data-urlencode "maxLifetime=86400" \ --data-urlencode "proxy=$RAYOBYTE_PROXY" \ -H "x-api-key: rb_live_YOUR_KEY"86,400 seconds is the ceiling, and 24 hours of one browser is 24 of your 48 browser hours. An always-on agent goes through the free allowance in two days. Email [email protected] before you plan around it.
Close the browser when the agent is done
Section titled “Close the browser when the agent is done”OpenClaw disconnecting does not end the session; it keeps running until its lifetime is up. Close it with the id from step 1:
curl -X POST https://browser.rayobyte.com/api/browser/close \ -H "x-api-key: rb_live_YOUR_KEY" \ -H "content-type: application/json" \ -d '{"browserId": "br_3f8a1c9d2e4b5a60"}'Was this page helpful?
Thanks — that helps us fix it.