47.openclaw

发表于 未分类 分类,标签:
====================================================================================
启动
openclaw gateway run
列出所有设备
openclaw devices list
查看特定设备详情(替换为实际 device-id)
openclaw devices show wsl-chrome-001
实时查看设备连接日志
openclaw devices logs WSL-Chrome --follow
查看设备详情
openclaw devices show <id>
查看网关日志
openclaw gateway logs --follow
查看网关状态
openclaw gateway status
查看配对请求
openclaw pairing list
简写
openclaw devices ls
删除设备
openclaw devices remove WSL-Chrome
在设备上执行命令
openclaw devices exec WSL-Chrome -- echo hello
查看待授权请求
openclaw pairing list
批准配对
openclaw pairing approve 3fa810aa-...
拒绝配对
openclaw pairing reject 3fa810aa-...
清除所有待授权
openclaw pairing clear
查看所有通道
openclaw channels list
查看飞书状态
openclaw channels feishu status
启动节点
openclaw node run --host qunr.cn --port 443
查看节点状态
openclaw node status
查看节点日志
openclaw node logs
停止节点
openclaw node stop
查看版本
openclaw --version
查看帮助
openclaw --help
查看智能体列表
openclaw agents list
查看技能列表
openclaw skills list
查看模型列表
openclaw models list

====================================================================================
拉取镜像
docker pull ghcr.io/openclaw/openclaw:latest
docker push registry.cn-hangzhou.aliyuncs.com/leiuvn/ai:openclaw-260225

====================================================================================
安装tailscale
第一台ubuntu
curl -fsSL https://tailscale.com/install.sh | sh
安装后执行
sudo tailscale up
等一分钟,复制如下链接到浏览器
https://login.tailscale.com/a/1f5a3596011890
第二台windows
下载客户端安装后登录
https://tailscale.com/download/windows
配置
tailscale serve --bg --https=18789 http://127.0.0.1:18789
tailscale serve --https=18789 off
设置ip
Ansible
100.64.0.3
win10-2025largh
100.64.0.2
====================================================================================
token连接
export OPENCLAW_GATEWAY_TOKEN=fb75af78457500f586ecb5989d1997afe520514bf45cde2f
openclaw node run --host qunr.cn --port 443 --tls --display-name "WSL-Chrome"
后台
nohup openclaw node run --host qunr.cn --port 443 --tls --display-name "WSL-Chrome" &

====================================================================================
飞书机器人
cli_a91561d921b85cca
lPtcuEx0wyvtTSQ4cAuezMofXozvm08Y

====================================================================================
compose
services:
  openclaw-gateway:
    image: registry.cn-hangzhou.aliyuncs.com/leiuvn/ai:openclaw-260225
    container_name: openclaw-gateway
    restart: unless-stopped
    ports:
      - "18789:18789"
    volumes:
      - /usr/openclaw/data_claw:/home/node/.openclaw
      #- /usr/openclaw/data_claw/openclaw.json:/home/node/.openclaw/openclaw.json
    environment:
      - NODE_ENV=production
      - OPENCLAW_ROLE=gateway
      - OPENCLAW_PORT=18789
    networks:
      build-network:
        ipv4_address: 172.20.0.60
    deploy:
      resources:
        limits:
          cpus: '4.0'
          memory: 8g
networks:
  build-network:
    external: true

====================================================================================
openclaw.json	
{
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "bind": "lan",
    "port": 18789,
    "auth": {
      "mode": "token",
      "token": "fb75af78457500f586ecb5989d1997afe520514bf45cde2f"
    },
    "trustedProxies": [
      "172.20.0.0/16",
      "127.0.0.1"
    ],
    "controlUi": {
      "dangerouslyDisableDeviceAuth": true,
      "allowedOrigins": [
        "https://qunr.cn",
        "http://qunr.cn",
        "*"
      ]
    }
  },
  "meta": {
    "lastTouchedVersion": "2026.2.17",
    "lastTouchedAt": "2026-02-26T08:58:00.000Z"
  }
}

====================================================================================	
主机 (Hostname) = 8.211.139.100
端口 (Port) = 62039
用户名 (Username) = lei
密码 (Password) = shimujiuxia
Telegram 代理配置链接 = tg://socks?server=8.211.139.100&port=62039&user=lei&pass=shimujiuxia

协议 (protocol) 	= socks
地址 (address) 		= 23.91.97.169
端口 (port) 		= 10263
用户名 (Username) 	= lei
密码 (password) 	= Shimujiuxia@2028
------------- 链接 (URL) -------------
socks://bGVpOlNoaW11aml1eGlhQDIwMjg=@23.91.97.169:10263#233boy-socks-23.91.97.169

====================================================================================
模型配置
{
  "meta": {
    "lastTouchedVersion": "2026.2.17",
    "lastTouchedAt": "2026-02-27T07:23:19.376Z"
  },
  "env": {
    "DASHSCOPE_API_KEY": "sk-f726701991d244278cb3dc35d2ad81a8"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "bailian": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "${DASHSCOPE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen-max",
            "name": "qwen-max",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 262144,
            "maxTokens": 32768
          },
          {
            "id": "qwen3-max-2026-01-23",
            "name": "qwen3-max-2026-01-23",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 262144,
            "maxTokens": 65536
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "bailian/qwen-max",
        "fallbacks": [
          "bailian/qwen-max"
        ]
      },
      "models": {
        "bailian/qwen-max": {
          "alias": "qwen"
        }
      }
    }
  },
  "gateway": {
    "port": 18789,
    "bind": "lan",
    "controlUi": {
      "allowedOrigins": [
        "https://qunr.cn",
        "http://qunr.cn",
        "*"
      ],
      "dangerouslyDisableDeviceAuth": true
    },
    "auth": {
      "mode": "token",
      "token": "__OPENCLAW_REDACTED__"
    },
    "trustedProxies": [
      "172.20.0.0/16",
      "127.0.0.1"
    ]
  }
}

====================================================================================	
以下是ubuntu的dockerfile
FROM registry.cn-hangzhou.aliyuncs.com/leiuvn/ubuntu:2404

ENV DEBIAN_FRONTEND=noninteractive

RUN sed -i 's|http://archive.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list.d/ubuntu.sources \
    && sed -i 's|http://security.ubuntu.com/ubuntu|http://mirrors.aliyun.com/ubuntu|g' /etc/apt/sources.list.d/ubuntu.sources

RUN apt-get update && apt-get install -y \
    curl \
    ca-certificates \
    nodejs \
    npm \
    build-essential \
    python3 \
    make \
    g++ \
    git \
    && rm -rf /var/lib/apt/lists/*

以下是ubuntu的compose
services:
  openclaw:
    image: registry.cn-hangzhou.aliyuncs.com/leiuvn/ai:openclaw-ubuntu
    container_name: openclaw-gateway
    restart: unless-stopped

    ports:
      - "18789:18789"
    volumes:
      - /usr/openclaw/data_claw:/root/.openclaw
    command: >
      openclaw gateway run
      --port 18789
      --allow-unconfigured
    environment:
      - TZ=Asia/Shanghai
    networks:
      build-network:
        ipv4_address: 172.20.0.60
    deploy:
      resources:
        limits:
          cpus: '4.0'
          memory: 8g

networks:
  build-network:
    external: true

====================================================================================
以下是ubuntu的全局配置
{
  "meta": {
    "lastTouchedVersion": "2026.2.17",
    "lastTouchedAt": "2026-02-27T07:33:09.062Z"
  },
  "env": {
    "DASHSCOPE_API_KEY": "__OPENCLAW_REDACTED__"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "bailian": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "${DASHSCOPE_API_KEY}",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen-max",
            "name": "qwen-max",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 262144,
            "maxTokens": 32768
          },
          {
            "id": "qwen3-max-2026-01-23",
            "name": "qwen3-max-2026-01-23",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 262144,
            "maxTokens": 65536
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "bailian/qwen-max",
        "fallbacks": [
          "bailian/qwen-max"
        ]
      },
      "models": {
        "bailian/qwen-max": {
          "alias": "qwen"
        }
      }
    }
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "mode": "local",
    "port": 18789,
    "bind": "lan",
    "controlUi": {
      "allowedOrigins": [
        "https://qunr.cn",
        "http://qunr.cn",
        "*"
      ],
      "dangerouslyDisableDeviceAuth": true
    },
    "auth": {
      "mode": "token",
      "token": "__OPENCLAW_REDACTED__"
    },
    "trustedProxies": [
      "172.20.0.0/16",
      "127.0.0.1"
    ]
  }
}
	
====================================================================================
飞书权限
{
  "scopes": {
    "tenant": [
      "contact:user.base:readonly",
      "im:chat",
      "im:chat:read",
      "im:chat:update",
      "im:message",
      "im:message.group_at_msg:readonly",
      "im:message.p2p_msg:readonly",
      "im:message:send_as_bot",
      "im:resource",
      "contact:contact.base:readonly"
    ],
    "user": [
      "docx:document:readonly"
    ]
  }
}

====================================================================================
PS:调试wsl控制windows
1.安装
sudo apt update
sudo apt install wslu
2.默认打开
wslview https://www.baidu.com

====================================================================================
PS:windows安装openclaw node
1.安装node
# 推荐安装 Node.js LTS 版本 (≥22.12.0)
# 下载地址:https://nodejs.org
# 安装时务必勾选 "Add to PATH"
# 查看版本
node -v
npm -v
2.安装C++编译工具
# 下载 Visual Studio Build Tools:
# https://visualstudio.microsoft.com/visual-cpp-build-tools/
# 安装时勾选:
# - Desktop development with C++
# - Windows SDK(默认)
3.配置PowerShell执行策略
# 以管理员身份运行 PowerShell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
4.安装git
https://git-scm.com/download/win
5.安装openclaw
npm install -g openclaw@latest
openclaw --help
6.设置变量连接gateway
设置key
export OPENCLAW_GATEWAY_TOKEN=9b75af78457500f586ecb5989d1997afe520514bf45cde2f
openclaw node run --host qunr.cn --port 443 --tls --display-name "WSL-Chrome-Ubuntu"
连接网关
临时
$env:OPENCLAW_GATEWAY_TOKEN = "9b75af78457500f586ecb5989d1997afe520514bf45cde2f"
echo $env:OPENCLAW_GATEWAY_TOKEN
永久
[Environment]::SetEnvironmentVariable("OPENCLAW_GATEWAY_TOKEN", "9b75af78457500f586ecb5989d1997afe520514bf45cde2f", "User")
[Environment]::GetEnvironmentVariable("OPENCLAW_GATEWAY_TOKEN", "User")
通过域名连接网关
# 尝试通过 npx 运行
npx openclaw node run --host openclaw.yaozh.com --port 443 --tls --display-name "WSL-Chrome-Win"
后台运行
$lei = Start-Job -ScriptBlock {
    npx openclaw node run --host openclaw.yaozh.com --port 443 --tls --display-name "办公电脑"
}
# 查看任务状态
Get-Job -Id $lei.Id
# 实时查看输出
Receive-Job -Id $lei.Id -Wait -AutoRemoveJob

====================================================================================


0 篇评论

发表我的评论