OpenClaw
Docker 部署
shell
git clone https://github.com/openclaw/openclaw1
shell
cd openclaw
./docker-setup.sh1
2
2
配置好之后遇到了Pairing required 的问题,是 token 错误。
shell
vi ~/.openclaw/openclaw.json1
json
{
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"controlUi": { // 这个需要手动添加
"enabled": true,
"allowInsecureAuth": true
},
"auth": {
"mode": "token",
"token": "xxx" // 这个手动复制到 webUI 当中
},
"tailscale": {
"mode": "serve"
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
连接之后,需要 ssh 远程转发端口
shell
ssh -N -L 18789:127.0.0.1:18789 user@ip1
这样就可以访问http://127.0.0.1:18789 来访问 OpenClaw 的界面
由于我们加上了 tailscale 的配置,所以需要配置一下 tailscale 的网络
shell
tailscale status
tailscale serve --bg http://127.0.0.1:18789
tailscale serve status1
2
3
2
3
常用指令
shell
docker compose down
docker compose up -d
docker ps1
2
3
2
3
shell
docker compose exec openclaw-cli --help
docker restart openclaw-openclaw-gateway-1
docker compose run --rm openclaw-cli configure
docker compose run --rm openclaw-cli dashboard --no-open
docker compose run --rm openclaw-cli gateway1
2
3
4
5
2
3
4
5
IM 接入
可以参考这一篇进行安装,但是 Discord 需要有网络环境配置