Skip to content

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.

  1. Request a browser

    Terminal window
    export RAYOBYTE_PROXY='http://USERNAME:[email protected]:8000'
    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.txt
    export RAYOBROWSE_CDP_URL="$(cat cdp_url.txt)"
    grep -i x-session-id headers.txt

    Keep the x-session-id value. It is how you close the browser when the agent is done.

    --data-urlencode percent-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.

  2. 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 true
    openclaw config set browser.defaultProfile rayobyte
    openclaw config set 'browser.profiles.rayobyte.cdpUrl' "$RAYOBROWSE_CDP_URL"
  3. Restart the OpenClaw gateway and check it

    OpenClaw reads the config when its gateway starts, so restart it after config set (the CLI prints Restart the gateway to apply.). Then:

    Terminal window
    openclaw browser --browser-profile rayobyte status

    The output shows running: true, transport: cdp and the wss://sb-NN.browser.rayobyte.com/cdp/... URL you configured.

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:

Terminal window
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.

OpenClaw disconnecting does not end the session; it keeps running until its lifetime is up. Close it with the id from step 1:

Terminal window
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?