browser
openclaw browser
Manage OpenClaw’s browser control surface and run browser actions (lifecycle, profiles, tabs, snapshots, screenshots, navigation, input, state emulation, and debugging).
Related:
- Browser tool + API: Browser tool
Common flags
--url <gatewayWsUrl>: Gateway WebSocket URL (defaults to config).--token <token>: Gateway token (if required).--timeout <ms>: request timeout (ms).--expect-final: wait for a final Gateway response.--browser-profile <name>: choose a browser profile (default from config).--json: machine-readable output (where supported).
Quick start (local)
openclaw browser profilesopenclaw browser --browser-profile openclaw startopenclaw browser --browser-profile openclaw open https://example.comopenclaw browser --browser-profile openclaw snapshotQuick troubleshooting
If start fails with not reachable after start, troubleshoot CDP readiness first. If start and tabs succeed but open or navigate fails, the browser control plane is healthy and the failure is usually navigation SSRF policy.
Minimal sequence:
openclaw browser --browser-profile openclaw startopenclaw browser --browser-profile openclaw tabsopenclaw browser --browser-profile openclaw open https://example.comDetailed guidance: Browser troubleshooting
Lifecycle
openclaw browser statusopenclaw browser startopenclaw browser stopopenclaw browser --browser-profile openclaw reset-profileNotes:
- For
attachOnlyand remote CDP profiles,openclaw browser stopcloses the active control session and clears temporary emulation overrides even when OpenClaw did not launch the browser process itself. - For local managed profiles,
openclaw browser stopstops the spawned browser process.
If the command is missing
If openclaw browser is an unknown command, check plugins.allow in
~/.openclaw/openclaw.json.
When plugins.allow is present, the bundled browser plugin must be listed
explicitly:
{ plugins: { allow: ["telegram", "browser"], },}browser.enabled=true does not restore the CLI subcommand when the plugin
allowlist excludes browser.
Related: Browser tool
Profiles
Profiles are named browser routing configs. In practice:
openclaw: launches or attaches to a dedicated OpenClaw-managed Chrome instance (isolated user data dir).user: controls your existing signed-in Chrome session via Chrome DevTools MCP.- custom CDP profiles: point at a local or remote CDP endpoint.
openclaw browser profilesopenclaw browser create-profile --name work --color "#FF5A36"openclaw browser create-profile --name chrome-live --driver existing-sessionopenclaw browser create-profile --name remote --cdp-url https://browser-host.example.comopenclaw browser delete-profile --name workUse a specific profile:
openclaw browser --browser-profile work tabsTabs
openclaw browser tabsopenclaw browser tab newopenclaw browser tab select 2openclaw browser tab close 2openclaw browser open https://docs.openclaw.aiopenclaw browser focus <targetId>openclaw browser close <targetId>Snapshot / screenshot / actions
Snapshot:
openclaw browser snapshotScreenshot:
openclaw browser screenshotopenclaw browser screenshot --full-pageopenclaw browser screenshot --ref e12Notes:
--full-pageis for page captures only; it cannot be combined with--refor--element.existing-session/userprofiles support page screenshots and--refscreenshots from snapshot output, but not CSS--elementscreenshots.
Navigate/click/type (ref-based UI automation):
openclaw browser navigate https://example.comopenclaw browser click <ref>openclaw browser type <ref> "hello"openclaw browser press Enteropenclaw browser hover <ref>openclaw browser scrollintoview <ref>openclaw browser drag <startRef> <endRef>openclaw browser select <ref> OptionA OptionBopenclaw browser fill --fields '[{"ref":"1","value":"Ada"}]'openclaw browser wait --text "Done"openclaw browser evaluate --fn '(el) => el.textContent' --ref <ref>File + dialog helpers:
openclaw browser upload /tmp/openclaw/uploads/file.pdf --ref <ref>openclaw browser waitfordownloadopenclaw browser download <ref> report.pdfopenclaw browser dialog --acceptState and storage
Viewport + emulation:
openclaw browser resize 1280 720openclaw browser set viewport 1280 720openclaw browser set offline onopenclaw browser set media darkopenclaw browser set timezone Europe/Londonopenclaw browser set locale en-GBopenclaw browser set geo 51.5074 -0.1278 --accuracy 25openclaw browser set device "iPhone 14"openclaw browser set headers '{"x-test":"1"}'openclaw browser set credentials myuser mypassCookies + storage:
openclaw browser cookiesopenclaw browser cookies set session abc123 --url https://example.comopenclaw browser cookies clearopenclaw browser storage local getopenclaw browser storage local set token abc123openclaw browser storage session clearDebugging
openclaw browser console --level erroropenclaw browser pdfopenclaw browser responsebody "**/api"openclaw browser highlight <ref>openclaw browser errors --clearopenclaw browser requests --filter apiopenclaw browser trace startopenclaw browser trace stop --out trace.zipExisting Chrome via MCP
Use the built-in user profile, or create your own existing-session profile:
openclaw browser --browser-profile user tabsopenclaw browser create-profile --name chrome-live --driver existing-sessionopenclaw browser create-profile --name brave-live --driver existing-session --user-data-dir "~/Library/Application Support/BraveSoftware/Brave-Browser"openclaw browser --browser-profile chrome-live tabsThis path is host-only. For Docker, headless servers, Browserless, or other remote setups, use a CDP profile instead.
Current existing-session limits:
- snapshot-driven actions use refs, not CSS selectors
clickis left-click onlytypedoes not supportslowly=truepressdoes not supportdelayMshover,scrollintoview,drag,select,fill, andevaluatereject per-call timeout overridesselectsupports one value onlywait --load networkidleis not supported- file uploads require
--ref/--input-ref, do not support CSS--element, and currently support one file at a time - dialog hooks do not support
--timeout - screenshots support page captures and
--ref, but not CSS--element responsebody, download interception, PDF export, and batch actions still require a managed browser or raw CDP profile
Remote browser control (node host proxy)
If the Gateway runs on a different machine than the browser, run a node host on the machine that has Chrome/Brave/Edge/Chromium. The Gateway will proxy browser actions to that node (no separate browser control server required).
Use gateway.nodes.browser.mode to control auto-routing and gateway.nodes.browser.node to pin a specific node if multiple are connected.
Security + remote setup: Browser tool, Remote access, Tailscale, Security