OpenClaw 浏览器配置:告别插件,一键启用内置浏览器

480 阅读4分钟

本文介绍如何通过简单配置,让 OpenClaw 使用内置浏览器,彻底告别插件安装提示。


为什么你需要这篇教程?

使用 OpenClaw 的同学可能遇到过这样的困扰:每次执行浏览器操作时,系统总是弹出提示让你安装浏览器插件。

但其实,OpenClaw 早就内置了自己的浏览器功能,根本不需要额外装插件

一行配置:browser.defaultProfile: "openclaw" 即可启用内置浏览器。

配置后 Orion掘金签到矿石聊天截图.png Orion掘金签到矿石浏览器截图.png


核心配置

在 OpenClaw 的配置文件中添加一行(~/.openclaw/openclaw.json):

{
  "browser": {
    "defaultProfile": "openclaw"
  }
}

640.png

什么是 OpenClaw 内置浏览器?

OpenClaw 内置了一个专门为 AI 助手优化的浏览器环境,隔离于你的日常浏览器。

官方描述:

Think of it as a separate, agent-only browser.

The openclaw profile does not touch your personal browser profile.

— OpenClaw 官方文档

核心特点

特点说明
🔧 开箱即用无需安装任何插件
🔗 原生集成与 OpenClaw 深度整合,操作更流畅
🔒 隐私安全数据本地处理,不依赖第三方插件
🖥️ 跨平台一致Windows、Mac、Linux 体验一致
🛡️ 隔离安全使用独立 profile,不影响日常浏览器

浏览器 对比:openclaw vs chrome

了解两种 profile 的区别,选择最适合你的方案。

浏览器类型官方说明
openclaw托管隔离浏览器managed, isolated browser (no extension required)
chrome系统浏览器扩展extension relay to your system browser

官方建议

Set browser.defaultProfile: "openclaw" if you want managed mode by default.

— OpenClaw 官方文档

对比详解

对比项openclawchrome
是否需要插件❌ 不需要✅ 需要扩展
数据隔离✅ 完全独立⚠️ 复用系统数据
推荐场景通用自动化需复用已登录状态
安全等级🛡️ 更高⚠️ 需注意

🔐 登录的正确方式

重要安全提醒:官网明确警告 不要把账号密码给 OpenClaw

✅ 正确方式:手动登录

官方原文:

When a site requires login, sign in manually in the host browser profile (the openclaw browser).

Do not give the model your credentials. Automated logins often trigger anti-bot defenses and can lock the account.

— OpenClaw 官方文档

正确步骤:

  1. 使用 browser 工具让 OpenClaw 打开目标网站
  2. 👤 你亲自在浏览器中输入账号密码登录
  3. 💾 登录状态保存在 openclaw profile,后续自动保持
# 示例
browser.open url="https://example.com"
# 然后手动登录

❌ 错误方式:告诉 AI 密码

官网明确警告:Do not give the model your credentials.

把密码告诉 AI 的风险:

风险官方说明
🚫 触发反爬虫Automated logins often trigger anti-bot defenses and can lock the account.
🔓 安全风险账号密码暴露给 AI 模型
🔢 二次验证AI 无法通过验证码

隔离保证

OpenClaw 内置浏览器与你的日常浏览器完全隔离,安全可控。

官方原文

Dedicated user data dir: never touches your personal browser profile.

Dedicated ports: avoids 9222 to prevent collisions with dev workflows.

Deterministic tab control: target tabs by targetId, not "last tab".

数据存储位置

浏览器数据路径用途
openclawOpenClaw 自有数据目录AI 自动化专用
chrome系统 Chrome 数据目录复用已登录状态
sandbox临时目录隔离测试,退出清除

切换 浏览器 后,之前的登录状态不会继承


安全与隐私

官方文档特别强调的安全要点:

The openclaw browser profile may contain logged-in sessions; treat it as sensitive.

官方原文

Security & privacy:

  • The openclaw browser profile may contain logged-in sessions; treat it as sensitive.
  • browser act kind=evaluate executes arbitrary JavaScript. Prompt injection can steer this. Disable it with browser.evaluateEnabled=false if you do not need it.
  • For logins and anti-bot notes (X/Twitter, etc.), see Browser login + X/Twitter posting.
  • Keep the Gateway/node host private (loopback or tailnet-only).
  • Remote CDP endpoints are powerful; tunnel and protect them.

安全建议

建议说明
✅ treat as sensitive内置浏览器的登录状态是敏感数据
✅ 保持私密Gateway/node host 应保持私密
⚠️ 谨慎使用 evaluateJS 执行可能被提示注入攻击
🔗 使用 HTTPS远程 CDP 优先使用 HTTPS

常见问题

Q: 配置后需要重启 OpenClaw 吗?
需要重启配置才能生效。
Q: 切换 浏览器 后之前的登录状态还在吗?
不同 浏览器 数据独立,切换后需要重新登录。
Q: 为什么有时还是提示安装插件?
检查配置是否正确保存,或尝试重启 OpenClaw。
Q: 可以把密码告诉 AI 吗?
绝对不要! 官网警告:Do not give the model your credentials.
Q: 如何清除登录状态?
删除对应 浏览器 的数据目录,或使用 sandbox 浏览器。
Q: OpenClaw 会访问我的日常浏览数据吗?
不会。官方:The openclaw profile does not touch your personal browser profile.
Q: 为什么要用 openclaw 而不是 chrome
官方推荐:switch to openclaw for the isolated managed browser.

总结

OpenClaw 内置浏览器开箱即用、安全隔离,只需一行配置即可告别插件困扰。

核心要点

要点官方建议
✅ 使用 openclaw 浏览器Set browser.defaultProfile: "openclaw"
✅ 手动登录Sign in manually in the host browser profile
❌ 不要给 AI 密码Do not give the model your credentials
✅ 隔离安全The openclaw profile does not touch your personal browser profile

参考文档

文档链接关键章节
Browser (OpenClaw-managed)docs.openclaw.ai/tools/brows…Profiles、Isolation guarantees、Security & privacy
Browser Logindocs.openclaw.ai/tools/brows…Manual login (recommended)、Why not automate logins?

如果你有其他 OpenClaw 使用问题,欢迎在评论区交流讨论!