Clawdbot (OpenClaw/Moltbot) 内网穿透部署方案(安全有效-Linux-2026.01.30)

基于 Tailscale 的内网穿透方案:详解如何在 Linux 环境下安装 Clawdbot,并配置 Funnel 模式实现无公网 IP 下的远程连接

安装Clawdbot:

bash 复制代码
# Install the CLI
curl -fsSL https://openclaw.ai/install.sh | bash

# Run the onboarding wizard
clawdbot onboard --install-daemon

# Start the Gateway
clawdbot gateway status

安装Tailscale: (注:所有proxy配置均在"网络环境受限"时进行配置)

bash 复制代码
sudo apt-get -o Acquire::http::Proxy="yourproxy" update
sudo apt-get -o Acquire::http::Proxy="yourproxy" install tailscale

为Tailscale添加proxy配置:

bash 复制代码
sudo systemctl edit tailscaled
复制代码
### Editing /etc/systemd/system/tailscaled.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file

[Service]
Environment="HTTP_PROXY=yourproxy"
Environment="HTTPS_PROXY=yourproxy"
Environment="NO_PROXY=localhost,127.0.0.1,::1"

### Edits below this comment will be discarded
...

重启Tailscale使配置生效:

bash 复制代码
sudo systemctl restart tailscaled

# 验证Tailscale连通性
sudo journalctl -u tailscaled -f
# 200 Connection established

注册Tailscale: (https://tailscale.com/)

bash 复制代码
sudo tailscale up

# 核验状态
sudo tailscale status

编辑Clawdbot配置:

bash 复制代码
vim ~/.clawdbot/clawdbot.json
json 复制代码
"gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "loopback",
    "auth": {                   // <== 新增
      "mode": "password",       // <== 新增 (验证方法可以是password或token(default))
      "password": "yourpw"      // <== 新增: 密码后续网页端会用上(shared secret via OPENCLAW_GATEWAY_PASSWORD or config)
    },
    "tailscale": {              // <== 新增
      "mode": "funnel",         // <== 新增
      "resetOnExit": false      // <== 新增
    }
  },

Tailscale Funnel 是 Tailscale 提供的一项公网服务暴露功能,允许你将本地的服务(比如 Clawdbot 的 18789 端口)暴露给整个互联网。

重启Clawdbot gateway:

bash 复制代码
systemctl --user stop clawdbot-gateway.service
clawdbot gateway

访问Tailscale, 查看机器是否注册成功:


访问full domain, 配置password:

此时为Pending挂起状态, 需要在Linux端下发许可

bash 复制代码
clawdbot devices list
clawdbot devices approve yourdeviceid

成功通过, 开始使用你的Clawdbot吧!

参考链接:

相关推荐
Maydaycxc19 小时前
企业内网 RPA 离线部署实践:从选型到落地的完整方案
运维·chrome·python·selenium·自动化·rpa
optimistic_chen20 小时前
【AI Agent 全栈开发】MCP
java·linux·运维·人工智能·ai编程·mcp
charlie11451419120 小时前
嵌入式Linux嵌入式Linux驱动开发:板级DTS实操与完整实战演练——从修改设备树到点亮LED的完整闭环
linux·运维·驱动开发
lularible1 天前
HSM技术精讲(1.4):当信道不再可信——密码学的诞生
安全·开源·密码学·嵌入式
@insist1231 天前
信息安全工程师-数据库安全全体系解析与最佳实践
数据库·安全·软考·信息安全工程师·软件水平考试
MAVER1CK1 天前
Docker容器创建好后修改容器配置
运维·docker·容器
匆匆那年9671 天前
VSCode 远程 Linux 使用Codex
linux·ide·vscode
NightReader1 天前
CPU 高使用率,怎么降下来
运维·服务器
SWAGGY..1 天前
Linux系统编程:(七)Makefile入门:轻松掌握编译自动化
linux·运维·自动化
开开心心就好1 天前
免费流畅的远程控制实用工具
linux·运维·服务器·网络·智能手机·excel