#Wrong browser use
1 messages · Page 1 of 1 (latest)
How to tell it to use the browser in container
Any ideas
Do I need to configure which browser it can use ?
Usually no â OpenClaw will auto-pick a Chromium-based browser (Chrome â Brave â Edge â Chromium) for the agent-controlled browser.
But it depends what you mean by âwhich browserâ:
- Your Dashboard / Control UI (the web UI you open yourself)
- Thatâs just a website â use whatever (Chrome/Firefox/Safari). No config needed.
- The agent âbrowser toolâ (automation: open tabs/click/type)
You have two modes:
- Managed, isolated browser (
openclawprofile): no extension needed.
If you want this by default, set:Docs: https://docs.openclaw.ai/tools/browseropenclaw config set browser.defaultProfile openclaw
- Drive your existing Chrome tabs (
chromeprofile): requires the OpenClaw Browser Relay extension and you must click it to attach to a tab (badge shows ON).
Docs: https://docs.openclaw.ai/tools/chrome-extension
If itâs picking the âwrongâ Chromium browser (e.g. you want Brave specifically), you can force it with:
openclaw config set browser.executablePath "/path/to/brave-or-chrome"
If you tell me what âwrong browserâ youâre seeing (and your OS), I can point you at the right setting/mode.
Browser (OpenClaw-managed
The agent said Reasoning:
The user wants to use Chromium (profile openclaw? they said "Use chromium"). The browser tool is failing because no tab attached. We need to instruct user to attach the Chrome extension relay. According to guidelines: If Chrome extension relay not attached, ask them to attach it. So we should respond asking them to click the OpenClaw Browser Relay toolbar icon on a tab to attach. Provide instructions.
Yep â that message usually means youâre using the chrome profile (extension relay), and no tab is attached yet.
Youâve got two options:
Option A (recommended): use the managed âopenclawâ browser (no extension)
This launches a dedicated, isolated Chromium profile that the agent can control.
openclaw config set browser.defaultProfile openclaw
openclaw browser --browser-profile openclaw start
Docs: https://docs.openclaw.ai/tools/browser
Option B: control your existing Chromium/Chrome tab (requires extension + attach)
If you want it to drive your current Chromium browser, you must:
- Install/load the OpenClaw Browser Relay extension
openclaw browser extension install
openclaw browser extension path
Then in Chromium: chrome://extensions â enable Developer mode â Load unpacked â pick that printed folder.
-
Open the page you want to automate, then click the âOpenClaw Browser Relayâ toolbar icon on that tab
You should see the badge flip to ON (thatâs the âattachedâ state). -
Now the agent/tool can use:
profile="chrome"(or CLI:openclaw browser --browser-profile chrome tabs)
Docs: https://docs.openclaw.ai/tools/chrome-extension
If you tell me your OS (macOS/Windows/Linux) and whether you want isolated automation (Option A) or drive your existing tab (Option B), I can give the exact quickest setup.
I choose option a, but how to configure it
Iâm guessing âoption eightâ = Option A (the managed openclaw browser, no extension). If thatâs what you meant, configure it like this:
1) Set the default profile to the managed browser
openclaw config set browser.defaultProfile openclaw
2) Point OpenClaw at Chromium explicitly (optional but recommended)
You need the path to the Chromium executable.
Linux
which chromium || which chromium-browser
Then set it, e.g.
openclaw config set browser.executablePath "/usr/bin/chromium"
macOS
Chromium is usually:
openclaw config set browser.executablePath "/Applications/Chromium.app/Contents/MacOS/Chromium"
Windows
Itâs usually something like:
openclaw config set browser.executablePath "C:\\Program Files\\Chromium\\Application\\chrome.exe"
3) Restart the gateway
openclaw gateway restart
4) Test
openclaw browser --browser-profile openclaw status
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
Docs: https://docs.openclaw.ai/tools/browser
If you tell me your OS + what which chromium (or equivalent) returns, Iâll give you the exact one-liner for the browser.executablePath. Also: confirm you meant Option A (managed browser) and not the extension relay option.
I use Mac OS
On macOS, to use the managed openclaw browser profile (Option A) you mainly set:
browser.defaultProfile = "openclaw"- (optionally)
browser.executablePathto the exact Chromium app you want
1) Set the managed browser as default
openclaw config set browser.defaultProfile openclaw
2) If you specifically want Chromium (not Chrome/Brave), set executablePath
First, check if Chromium is actually installed:
ls -d "/Applications/Chromium.app" "$HOME/Applications/Chromium.app" 2>/dev/null
If it exists, set:
openclaw config set browser.executablePath "/Applications/Chromium.app/Contents/MacOS/Chromium"
(If itâs in ~/Applications, use that path instead.)
Note: many Macs donât have âChromium.appâ installed by default. If you donât have it, easiest is to just use Chrome/Brave/Edge (OpenClaw auto-detects those), and skip executablePath.
3) Restart the gateway
openclaw gateway restart
4) Quick test
openclaw browser --browser-profile openclaw status
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
Docs: https://docs.openclaw.ai/tools/browser
If you paste the output of:
ls -d "/Applications/Chromium.app" "/Applications/Google Chrome.app" "/Applications/Brave Browser.app" 2>/dev/null
Iâll tell you the exact best browser.executablePath for what you have installed.
Headless is just a config flag for the managed openclaw browser.
Enable headless mode
openclaw config set browser.defaultProfile openclaw
openclaw config set browser.headless true
openclaw gateway restart
Test it
openclaw browser --browser-profile openclaw status
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
In headless, you wonât see a browser window. To verify what itâs doing, use screenshots/snapshots:
openclaw browser --browser-profile openclaw screenshot --full-page
openclaw browser --browser-profile openclaw snapshot --interactive
Docs: https://docs.openclaw.ai/tools/browser
If you paste the output of openclaw browser --browser-profile openclaw status, I can tell if itâs actually launching headless (and if itâs picking the browser you expect).
I want to edit the json config directly, tell me where to add the default configuration
~/.openclaw/openclaw.json
Yep â ~/.openclaw/openclaw.json is the main config file (itâs JSON5, so comments/trailing commas are OK).
For managed browser (openclaw profile) + headless on macOS, a minimal working snippet looks like:
{
browser: {
enabled: true,
defaultProfile: "openclaw",
headless: true,
// Optional: force a specific browser binary (only if you want Chromium specifically)
// executablePath: "/Applications/Chromium.app/Contents/MacOS/Chromium",
},
}
After editing, restart:
openclaw gateway restart
And test:
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw screenshot --full-page
If you paste your current browser: { ... } block (just that part), Iâll sanity-check it for typos/format issues.
Give me minimum config
Put this in ~/.openclaw/openclaw.json (JSON5):
{
browser: {
enabled: true,
defaultProfile: "openclaw",
headless: true,
},
}
Then:
openclaw gateway restart
openclaw browser --browser-profile openclaw start
If I want claw in containers control my host machine browser. How to configure this json file
A containerized Gateway canât âreach outâ and drive your macOS GUI browser by itself. The supported way is:
Gateway (in Docker) runs the agent â a node host running on your Mac provides the browser â Gateway proxies browser tool calls to that node.
1) Gateway/container ~/.openclaw/openclaw.json
You usually donât need much here. Optionally pin which node should be used for browser routing:
{
gateway: {
nodes: {
browser: {
mode: "auto", // default behavior: route to a browser-capable node if present
// node: "My Mac", // optional: pin a specific node name/id once itâs paired
},
},
},
}
(Leave browser.enabled alone on the gateway unless you have a reason; node proxy routing is the key.)
2) On your Mac: run a node host + enable browser there
On the Macâs ~/.openclaw/openclaw.json, make sure browser is enabled and pick what kind of âhost browserâ you mean:
A) Managed browser on the Mac (can be headless)
{
browser: {
enabled: true,
defaultProfile: "openclaw",
headless: true,
},
}
B) Control your existing Chrome tab on the Mac (extension relay)
{
browser: {
enabled: true,
defaultProfile: "chrome",
},
}
Then you must install the extension on the Mac and click it to attach to a tab (badge ON):
3) Start the node host on the Mac and pair it
Run on the Mac (needs the gateway token in OPENCLAW_GATEWAY_TOKEN):
export OPENCLAW_GATEWAY_TOKEN="âŠ"
openclaw node run --host 127.0.0.1 --port 18789 --display-name "Mac Browser Node"
Approve the pairing on the Gateway:
openclaw devices list
openclaw devices approve <requestId>
Docs for node host: https://docs.openclaw.ai/cli/node
Browser proxy note: https://docs.openclaw.ai/tools/browser (see âNode browser proxyâ)
If you tell me which âhost browserâ you want (A headless managed, or B your existing Chrome tab), I can give you the exact minimal two config blocks + the exact commands for your Docker setup (sometimes the host/port is 127.0.0.1, sometimes you use a different published port).
âHereâ as in ~/.openclaw/openclaw.json depends on which machine youâre talking about â you effectively have two configs:
1) In the container (Gateway): you generally donât configure a browser
The container canât drive your macOS GUI browser directly. It just needs to be able to route browser tool calls to a node.
You can leave this empty, or optionally pin a node later:
{
gateway: {
nodes: {
browser: {
mode: "auto",
// node: "Mac Browser Node", // optional pin
},
},
That 1006 is almost always âyou spoke the wrong protocol or hit the wrong endpointâ.
In the default Docker setup, the Gateway does NOT serve TLS, so the WebSocket URL is:
- inside docker compose network:
ws://openclaw-gateway:18789 - from your Mac (published port):
ws://127.0.0.1:18789
âŠbut youâre using:
wss://openclaw-gateway:18789â this tries TLS, and the gateway isnât speaking TLS there â connection drops â1006.
Fix
Use ws://, not wss://:
docker compose run --rm openclaw-cli status --url ws://openclaw-gateway:18789
},
}
2) On your Mac (Node host): this is where the browser config goes
Edit your Macâs ~/.openclaw/openclaw.json and set the managed browser headless:
{
browser: {
enabled: true,
defaultProfile: "openclaw",
headless: true,
},
}
If youâre running the command on your Mac (not inside the container), use:
openclaw status --url ws://127.0.0.1:18789
Two quick sanity checks
- Make sure the port is actually published to your Mac (compose should have something like):
ports:
- "18789:18789"
- If you pass
--url, also pass auth explicitly (or set env), e.g.:
export OPENCLAW_GATEWAY_TOKEN="âŠ"
Then run a node host on the Mac so the containerized Gateway can proxy browser actions to it.
One key question
When you say âGateway in containersâ, did you publish the gateway port to your Mac, e.g. 18789:18789 in docker compose?
- If yes, your Mac node host connects to:
--host 127.0.0.1 --port 18789 - If no, tell me what your compose ports look like (or paste the
ports:section) and Iâll tell you the right--host/--port(sometimes itâs a different published port).
Also: are you trying to control (A) the managed headless browser, or (B) your existing Chrome tab via the extension?
openclaw status --url ws://127.0.0.1:18789
If you paste the exact command you ran (and whether it was on the Mac or via docker compose run openclaw-cli), Iâll give you the exact working one-liner.