2026年在Ubuntu下安装和配置OpenClaw

在Ubuntu下安装和配置OpenClawClawdBot 改名两次了 现在应该稳定在 OpenClaw 名字上了吧 这个名字我很喜欢 因为它有一种不言自明的开源特质 当然也有一些管自己叫 OpenXX 的公司不讲武德 OpenClaw 是个人 AI 助理 它可以装进一台长时间运行的电脑里随时待命 并通过现有的即时通讯管道远程 如 WhatsApp iMessage 等 接收指令

大家好,我是讯享网,很高兴认识大家。这里提供最前沿的Ai技术和互联网信息。



ClawdBot改名两次了,现在应该稳定在OpenClaw名字上了吧?这个名字我很喜欢,因为它有一种不言自明的开源特质(当然也有一些管自己叫OpenXX的公司不讲武德)。

OpenClaw是个人AI助理,它可以装进一台长时间运行的电脑里随时待命,并通过现有的即时通讯管道远程(如WhatsApp,iMessage等)接收指令。感觉这个OpenClaw的火爆程度不亚于前年的GPT和去年的DeepSeek,如果年前再不测试一下,我可能要落伍一整年了。就在Ubuntu下测试一下吧,因为官网提示强烈建议Windows下使用wsl2来安装,而我手边并没有装了wsl2的机器。

去到 github.com/openclaw/ope 根据指示执行安装指令,不想自己改就不需要clone源代码。好像去 docs.openclaw.ai/ 也可以。

# 尝试安装openclaw

GPT plus 代充 只需 145

npm install -g openclaw@latest

npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: ‘openclaw@2026.1.30’, npm warn EBADENGINE required: { node: ‘>=22.12.0’ }, npm warn EBADENGINE current: { node: ‘v20.19.6’, npm: ‘10.8.2’ }

# 提示node版本过低,升级node

nvm install 22.12.0

Downloading and installing node v22.12.0… Downloading https://nodejs.org/dist/v22.12.0/node-v22.12.0-linux-x64.tar.xz... 100.0% Computing checksum with sha256sum Checksums matched! Now using node v22.12.0 (npm v10.9.0)

# 再次安装openclaw

npm install -g openclaw@latest

npm warn deprecated npmlog@6.0.2: This package is no longer supported. npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported. npm warn deprecated gauge@4.0.4: This package is no longer supported. npm warn deprecated node-domexception@1.0.0: Use your platforms native DOMException instead

added 694 packages in 2m

124 packages are looking for funding

run </span>npm fund<span class="sb"> for details
讯享网openclaw onboard –install-daemon

GPT plus 代充 只需 145

安全提示建议的基线:

  • 白名单 + 成员准入限制
  • 沙盒 + 最小权限工具
  • 让代理远离密码
  • 对于任何带有工具或不可信收件箱的机器人使用可得到的最强模型

定期执行两个指令:

  • openclaw security audit –deep
  • openclaw security audit –fix

必须阅读 docs.openclaw.ai/gatewa

之所以把这些抄下来,就是要确保安全信息每一行都看完并且理解了。

接下来上线模式选择“Quick Start”,得到默认的网关端口是18789,绑定地址是127.0.0.1,talescale expose关闭,定向到聊天频道。接下来选择模型/验证提供商。

就暂时选MiniMax M2.1吧,然后进入Channel选择。

这个根据自己的网络条件来选,看了看我的手机,似乎iMessage还有效,就选它吧,虽然这活作者还没干完,但是估计早晚会更新的。实在不行,就写一个自用的即时通讯软件好了,这个我也熟的。

接下来进入skills配置界面

暂时跳过skills配置,也跳过谷歌周边,Notion,OpenAI,ElevenLabs的配置

然后是钩子配置,这里跳过它,网关服务被安装成系统服务。

最会就是访问AI助手。

选择进入TUI界面,这样完成了安装

连着按几次 Ctrl + C 键可以退出TUI

我们来看看openclaw gateway的管理方法

openclaw gateway -h

🦞 OpenClaw 2026.1.30 (76b5208) — Siri’s competent cousin.

Usage: openclaw gateway [options] [command]

Run the WebSocket Gateway

Options: –port &lt;port&gt; Port for the gateway WebSocket –bind &lt;mode&gt; Bind mode (“loopback”|“lan”|“tailnet”|“auto”|“custom”). Defaults to config gateway.bind (or

讯享网 loopback). 

–token &lt;token&gt; Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if

 set) 

–auth &lt;mode&gt; Gateway auth mode (“token”|“password”) –password &lt;password&gt; Password for auth mode=password –tailscale &lt;mode&gt; Tailscale exposure mode (“off”|“serve”|“funnel”) –tailscale-reset-on-exit Reset Tailscale serve/funnel configuration on shutdown (default: false) –allow-unconfigured Allow gateway start without gateway.mode=local in config (default: false) –dev Create a dev config + workspace if missing (no BOOTSTRAP.md) (default: false) –reset Reset dev config + credentials + sessions + workspace (requires –dev) (default: false) –force Kill any existing listener on the target port before starting (default: false) –verbose Verbose logging to stdout/stderr (default: false) –claude-cli-logs Only show claude-cli logs in the console (includes stdout/stderr) (default: false) –ws-log &lt;style&gt; WebSocket log style (“auto”|“full”|“compact”) (default: “auto”) –compact Alias for “–ws-log compact” (default: false) –raw-stream Log raw model stream events to jsonl (default: false) –raw-stream-path &lt;path&gt; Raw stream jsonl path -h, –help display help for command

Commands: run Run the WebSocket Gateway (foreground) status Show gateway service status + probe the Gateway install Install the Gateway service (launchd/systemd/schtasks) uninstall Uninstall the Gateway service (launchd/systemd/schtasks) start Start the Gateway service (launchd/systemd/schtasks) stop Stop the Gateway service (launchd/systemd/schtasks) restart Restart the Gateway service (launchd/systemd/schtasks) call Call a Gateway method usage-cost Fetch usage cost summary from session logs health Fetch Gateway health probe Show gateway reachability + discovery + health + status summary (local + remote) discover Discover gateways via Bonjour (local + wide-area if configured)

Docs: docs.openclaw.ai/cli/gateway

查看gateway服务情况,默认是绑定到localhost下的18789端口

讯享网openclaw gateway status

🦞 OpenClaw 2026.1.30 (76b5208) — Ship fast, log faster.

│ ◇ Service: systemd (enabled) File logs: /tmp/openclaw/openclaw-2026-02-03.log Command: /home/test/.nvm/versions/node/v22.12.0/bin/node /home/test/.nvm/versions/node/v22.12.0/lib/node_modules/openclaw/dist/index.js gateway –port 18789 Service file: ~/.config/systemd/user/openclaw-gateway.service Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard. Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/home/test/.nvm/versions/node/v22.12.0/bin/node) Recommendation: run “openclaw doctor” (or “openclaw doctor –repair”). Config (cli): ~/.openclaw/openclaw.json Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args) Probe target: ws://127.0.0.1:18789 Dashboard: http://127.0.0.1:18789/ Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid , state active, sub running, last exit 0, reason 0) RPC probe: ok

Listening: 127.0.0.1:18789 Troubles: run openclaw status Troubleshooting: https://docs.openclaw.ai/troubleshooting

需要调试观察的时候,可以停掉gateway服务,再以“lan”模式在前台启动网关

openclaw gateway stop

openclaw gateway –bind lan –verbose

第一次安装的时候装到一半我有事要出门,只好草草配置了MiniMax的M2.1模型,也去到MiniMax官网根据文档修改了 /.openclaw/openclaw.json文件,结果还是在tui里连接失败,只好重新设置成GLM4.7。

讯享网openclaw setup –wizard

这个界面就和之前上线服务执行 openclaw onboard –install-daemon 时的界面一样,就不赘述了。

因为作者更新速度太快,我还没来得及用,就又要升级了

openclaw update

更新完后自动执行了OpenClaw doctor,检查了一些问题,比如是否把/.openclaw权限改为700

另外提示创建OAuth目录,这个OAuth功能好像是新加的。

如果这样不能更新,就重新执行安装指令。

讯享网npminstall-g openclaw@latest 

运行以下指令进入

openclaw tui

我才问了一句话,大模型回了我一箩筐,怪不得有人说这玩意费token,先试试看。

GLM4.7在编程agent里和这里表现确实相差挺大,但它还没学会幽默。

暂时先到这,等我玩几天再来汇报。

另外,作为一个成熟的IT人,任何时候有问题,先试试带上“-h”参数执行指令,就能蒙个差不离,实在不行再看官网文档,还不行就看源码,看不懂就找替代产品,替代产品也找不到就自己手搓一个,毕竟现在有AI帮忙手搓软件的难度大大降低了。

讯享网openclaw -h

🦞 OpenClaw 2026.2.1 (ed4529e) — Ah, the fruit tree company! 🍎

Usage: openclaw [options] [command]

Options: -V, –version output the version number –dev Dev profile: isolate state under ~/.openclaw-dev,

 default gateway port 19001, and shift derived ports (browser/canvas) 

–profile &lt;name&gt; Use a named profile (isolates

讯享网 OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.openclaw-&lt;name&gt;) 

–no-color Disable ANSI colors -h, –help display help for command

Commands: setup Initialize ~/.openclaw/openclaw.json and the agent

 workspace 

onboard Interactive wizard to set up the gateway, workspace, and

讯享网 skills 

configure Interactive prompt to set up credentials, devices, and

 agent defaults 

config Config helpers (get/set/unset). Run without subcommand

讯享网 for the wizard. 

doctor Health checks + quick fixes for the gateway and channels dashboard Open the Control UI with your current token

。。。。。。

小讯
上一篇 2026-03-11 17:36
下一篇 2026-03-11 17:38

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/213398.html