📦 Kkclaw Server — 无头客户端
v2026.2.17面向Ubuntu/Raspbian的无头OpenClaw客户端,支持心跳检测、自动重连、自动恢复、队列管理和热模型切换功能。适用于Raspberry Pi和云服务器等无GUI场景。
0· 599·0 当前·0 累计
安全扫描
OpenClaw
安全
medium confidence文件和SKILL.md与无头OpenClaw客户端一致:监控状态、队列消息、转发心跳/消息到配置的网关——但它会将运行时和消息数据发送到您配置的任何网关,因此仅在信任该端点并审查完整代码后才安装(提供的main.js被截断)。
评估建议
此技能似乎能实现其声称的功能,但它会将心跳(包括内存/运行时间)和任何排队的消息使用配置中的apiKey发送到配置的网关URL。安装前需注意:(1) 审查完整的main.js(提供的片段被截断)以确保没有额外的隐藏行为;(2) 仅配置您控制或信任的网关;(3) 以非特权用户运行服务(不要以root运行)并检查其写入的任何文件(如~/.kkclaw/config.json);(4) 如需更强隔离,请在沙箱/容器中运行,或在不存放敏感数据的机器上运行。...详细分析 ▾
✓ 用途与能力
名称和描述与包含的代码和配置一致:心跳、自动重连、恢复、队列管理和模型切换均已实现并反映在SKILL.md和config.json中。没有请求无关的凭据或二进制文件。
ℹ 指令范围
运行时指令仅限于安装/启动服务器和编辑~/.kkclaw/config.json。但是,心跳明确向网关报告状态、模型、队列长度、内存和运行时间,服务器将消息转发到/api/message——因此技能会将运行时信息和用户消息传输到配置的网关。这符合其预期目的,但值得作为隐私/数据泄露问题标记。
✓ 安装机制
没有提供安装规范(仅限指令),这比任意下载的风险更低。SKILL.md建议手动安装systemd单元;安装需要用户操作(sudo)且不会自动获取代码。main.js包含在捆绑包中,因此技能本身不会获取任何外部内容。
ℹ 凭证需求
没有请求环境变量,网关API密钥存储在配置文件(config.json)中。要求提供网关URL和apiKey对于与远程服务通信的客户端是合适的,但API密钥的存在意味着网关将能够进行身份验证并接收消息和心跳——仅为您信任的网关提供密钥。
✓ 持久化与权限
技能没有请求always:true或任何提升的平台权限。SKILL.md指导用户如何创建systemd单元,这需要手动sudo——这是正常的管理员操作,不是技能隐式请求的权限。
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv2026.2.172026/2/17
KKClaw Server 2026.2.17 - 为Ubuntu和Raspbian引入无头服务器优化版本(无GUI;适用于Raspberry Pi/云环境)。新增可配置心跳、指数退避自动重连和自动恢复功能。实现高级队列管理(FIFO、大小/重试限制、断连后恢复)。支持热模型切换及回退和自动回滚保护。包含详细CLI使用说明和示例systemd服务设置,便于部署。通过config.json提供全面配置。
● 可疑
安装命令
点击复制官方npx clawhub@latest install glitch-kkclaw-server
镜像加速npx clawhub@latest install glitch-kkclaw-server --registry https://cn.longxiaskill.com
技能文档
name: KKClaw Server description: Headless OpenClaw client for Ubuntu/Raspbian with heartbeat, auto-reconnect, auto-recovery, queue management, and hot model switching. icon: 🦞 version: 2026.2.17 platforms: - ubuntu - raspbian tags: - openclaw - headless - server - automation - iot
Overview
KKClaw Server is a headless, server-optimized version of OpenClaw designed for Ubuntu and Raspbian systems. It provides all the core OpenClaw functionality without a GUI, making it perfect for Raspberry Pi deployments, cloud servers, and headless environments.
Features
- Heartbeat Monitoring: Configurable heartbeat that reports status, model, queue length, memory usage, and uptime to a gateway
- Auto Reconnect: Automatic reconnection with exponential backoff when connection is lost
- Auto Recovery: Automatic recovery features to resume operation after unexpected failures
- Queue Management: Advanced FIFO queue with size and retry limits, resumes after disconnect
- Hot Model Switching: Switch models on-the-fly with fallback support and auto-rollback protection
- CLI Interface: Detailed command-line interface for all operations
- Systemd Integration: Easy deployment via systemd service
Requirements
- Ubuntu 18.04+ or Raspbian
- Node.js 18+
- Network access to configured gateway
Installation
- Clone or download this skill
- Install dependencies:
npm install
- Create the configuration file:
mkdir -p ~/.kkclaw
cp config.json.example ~/.kkclaw/config.json
- Edit the configuration with your gateway details:
nano ~/.kkclaw/config.json
- Install the systemd service (optional):
sudo cp kkclaw.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable kkclaw
sudo systemctl start kkclaw
Configuration
Edit ~/.kkclaw/config.json to configure your gateway connection:
{
"gateway": {
"url": "https://your-gateway.example.com",
"apiKey": "your-api-key-here"
},
"heartbeat": {
"enabled": true,
"interval": 30000
},
"queue": {
"maxSize": 100,
"maxRetries": 3
},
"model": {
"fallback": "default-model",
"autoRollback": true
}
}
Usage
Start the server
node main.js
Check status
node main.js status
Switch model
node main.js switch-model
View queue
node main.js queue
Clear queue
node main.js clear-queue
Systemd Service
The included kkclaw.service file provides systemd integration. After installation:
- Start:
sudo systemctl start kkclaw - Stop:
sudo systemctl stop kkclaw - Restart:
sudo systemctl restart kkclaw - View logs:
journalctl -u kkclaw -f
Security Considerations
- Always review the configuration before running
- Use API keys only with gateways you trust
- Run as a non-privileged user (not as root)
- Consider running in a container for additional isolation
Troubleshooting
Server not connecting
- Check your gateway URL is correct
- Verify network connectivity
- Check API key is valid
Queue filling up
- Check gateway is reachable
- Review queue size limits in config
- Use
clear-queuecommand if needed
Model switching failing
- Verify model name is valid
- Check fallback model is configured
- Review logs for specific errors
License
MIT