本地centos7虚拟机安装openclaw龙虾过程记录

1、因为下载docker目前国内不支持,所以我先下载下来,在通过save方式来处理

root@localhost openclaw-in-docker# docker images

REPOSITORY TAG IMAGE ID CREATED SIZE

alpine/openclaw latest f9fbf34fba6b 2 days ago 2.69 GB

root@localhost openclaw-in-docker# docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

b556e41e93c1 openclaw:local "docker-entrypoint..." 2 days ago Up 16 minutes (healthy) 0.0.0.0:18789-18790->18789-18790/tcp openclaw-in-docker-openclaw-gateway-1

2、另外opencalw.json需要修改成如下,我是用本地已经安装好的镜像来处理的:

XML 复制代码
{
  "wizard": {
    "lastRunAt": "2026-03-08T13:18:34.581Z",
    "lastRunVersion": "2026.3.7",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "openai/gpt-5.2"
      },
      "models": {
        "openai/gpt-5.2": {}
      },
      "workspace": "/home/node/.openclaw/workspace",
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "tools": {
    "profile": "coding"
  },
  "messages": {
    "ackReactionScope": "group-mentions"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto",
    "restart": true,
    "ownerDisplay": "raw"
  },
  "session": {
    "dmScope": "per-channel-peer"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "auth": {
      "mode": "token",
      "token": "05eed602596bd03274aa7fb740745545345017f24d8d3eec3e7cdea1fd48825b"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "bind": "loopback",
    "controlUi": {
      "allowedOrigins": [
        "http://localhost:18789",
        "http://127.0.0.1:18789"
      ],
    },
    "nodes": {
      "denyCommands": [
        "camera.snap",
        "camera.clip",
        "screen.record",
        "contacts.add",
        "calendar.add",
        "reminders.add",
        "sms.send"
      ]
    }
  },
  "skills": {
    "entries": {
      "goplaces": {
        "apiKey": "n"
      }
    }
  },
  "meta": {
    "lastTouchedVersion": "2026.3.7",
    "lastTouchedAt": "2026-03-08T13:18:34.601Z"
  }
}

3、期间出现时间问题,token问题等等都要处理

4、还需要进行ssh端口转发

ssh -N -L 18789:127.0.0.1:18789 root@192.168.199.152

5、出现设备配对问题

需要下面方式处理

cd openclaw-in-docker

docker-compose up -d openclaw-gateway

列出待配对设备(浏览器页面保持打开/刷新一次触发请求)

docker-compose exec -T openclaw-gateway openclaw devices list

批准最新一个

docker-compose exec -T openclaw-gateway openclaw devices approve --latest

比如:

bash 复制代码
[root@localhost openclaw-in-docker]# cd openclaw-in-docker
-bash: cd: openclaw-in-docker: 没有那个文件或目录
[root@localhost openclaw-in-docker]# docker-compose up -d openclaw-gateway
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
[+] Running 1/1
 ✔ Container openclaw-in-docker-openclaw-gateway-1  Running                                                                                                                                                 0.0s 
[root@localhost openclaw-in-docker]# 
[root@localhost openclaw-in-docker]# # 列出待配对设备(浏览器页面保持打开/刷新一次触发请求)
[root@localhost openclaw-in-docker]# docker-compose exec -T openclaw-gateway openclaw devices list
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
Pending (1)
┌──────────────────────────────────────┬──────────────────────────────────┬──────────┬────────────┬──────────┬────────┐
│ Request                              │ Device                           │ Role     │ IP         │ Age      │ Flags  │
├──────────────────────────────────────┼──────────────────────────────────┼──────────┼────────────┼──────────┼────────┤
│ 93a793ce-5638-4142-9d47-c1c45a71517e │ f7039d25aeb15d83be8ef5101a517d7b │ operator │ 172.18.0.1 │ just now │        │
│                                      │ c78382761c0fb307612753f3c0e97861 │          │            │          │        │
└──────────────────────────────────────┴──────────────────────────────────┴──────────┴────────────┴──────────┴────────┘
Paired (1)
┌─────────────────────────────┬────────────┬────────────────────────────────────────────────┬────────────┬────────────┐
│ Device                      │ Roles      │ Scopes                                         │ Tokens     │ IP         │
├─────────────────────────────┼────────────┼────────────────────────────────────────────────┼────────────┼────────────┤
│ 0fdae74ee7e7412014d9f16fb79 │ operator   │ operator.admin, operator.read, operator.       │ operator   │            │
│ a3e8855dc6f5a104e49d2b0e818 │            │ write, operator.approvals, operator.pairing    │            │            │
│ f0d64184c5                  │            │                                                │            │            │
└─────────────────────────────┴────────────┴────────────────────────────────────────────────┴────────────┴────────────┘
[root@localhost openclaw-in-docker]# 
[root@localhost openclaw-in-docker]# # 批准最新一个
[root@localhost openclaw-in-docker]# docker-compose exec -T openclaw-gateway openclaw devices approve --latest
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_AI_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_SESSION_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "CLAUDE_WEB_COOKIE" variable is not set. Defaulting to a blank string. 
Approved f7039d25aeb15d83be8ef5101a517d7bc78382761c0fb307612753f3c0e97861 (93a793ce-5638-4142-9d47-c1c45a71517e)
[root@localhost openclaw-in-docker]# 

6、因为没有配置api,对话出下面错误

Agent failed before reply: No API key found for provider "openai". Auth store: /home/node/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /home/node/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir.

Logs: openclaw logs --follow

需要根据自己使用的api来进行openclaw.json配置

7、同时以root身份进入docker

docker exec -u 0 -it openclaw-in-docker-openclaw-gateway-1 sh

不过进入后最好还是切换到su - node来运行吧,因为都是这个权限来使用

8、安装需要的skills

XML 复制代码
apt-get update && apt-get install -y jq ripgrep ffmpeg tmux git curl python3 python3-pip
npm i -g clawhub
apt-get update && apt-get install -y pipx
pipx install uv

9、OpenClaw原生接入流程

1.安装OpenClaw开源社区QQBot插件openclaw plugins install @tencent-connect/openclaw-qqbot@latest

2.配置绑定当前QQ机器人openclaw channels add --channel qqbot --token "1903329591:AAAAAAAAAAAAAAA"

3.重启本地OpenClaw服务

openclaw gateway restart

相关推荐
m0_547486669 小时前
《机器人智能感知基础》全套PPT课件(北京科技大学)
机器人
金智维科技官方9 小时前
财务核算如何提效?这三条核心链路正在加速自动化
运维·人工智能·ai·自动化·财务·智能体
yuewell_ai9 小时前
机器人调度通讯怎么设计才不会被网络抖动瘫痪
网络·机器人·php
熊猫钓鱼>_>9 小时前
MiniMax 深度观察:不是又一个大模型,是AI生产效率的范式革新
人工智能·ai·自然语言处理·媒体·benchmark·minimax·行业
腾视科技-AI11 小时前
腾视科技TS-NV-P200车载系列AI边缘算力盒子:引领车路协同新时代,赋能多元场景应用
人工智能·科技·ai·ai算力·ai边缘算力盒子·腾视科技·ai算力盒
2601_9622946111 小时前
AI 基础设施的“去 Python 化“:Rust 与 C# 的两条替代路径
ai·rust·c·基础设施·去python化
风流 少年12 小时前
gradio
ai
lee_curry12 小时前
AI Agent 工程师完整学习路线(面向生产级项目与面试)
人工智能·学习·ai·面试·agent
数智工坊12 小时前
NTIRE2024×4图像超分竞赛综述|Mamba崛起、数据缩放、频域增强成为新趋势
网络·人工智能·深度学习·cnn·机器人
腾视科技-AI13 小时前
腾视科技TS-SG-SM7系列AI算力模组:32TOPS算力引擎,开启边缘智能新纪元
人工智能·ai·ai算力·ai算力模组·ai模组·腾视科技·ai算力盒