很多人都在热捧小龙虾OpenClaw
很多人都在使用小龙虾
很多人被小龙虾拔掉了底裤.....
所以小龙虾还是不能在自己的工作机器上安装,最好是用一台云端机器,万一出了安全问题,损失能小一点。
尝试在AIStudio星河社区配置OpenClaw小龙虾
参考这个项目:https://aistudio.baidu.com/projectdetail/10043604
首先登录星河社区https://aistudio.baidu.com/,新开一个项目,运行一下
安装OpenClaw小龙虾
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash 或者 bash install_nvm.sh
source ~/.bashrc
nvm install 22
nvm use 22
node --version
# 2. 安装并初始化 OpenClaw
npm install -g openclaw@latest
openclaw onboard --install-daemon
openclaw setup
如果npm慢,可以设置加速镜像。
如果爆内存,可以换32G的,但是免费的只有16G的,所以...这是个问题。
如果没法在免费16G环境下安装,可以安装openclaw-cn试试
安装openclaw-cn
npm install -g openclaw-cn --registry=https://registry.npmmirror.com
配置
# 3. 基础与安全配置
openclaw config set gateway.mode local
# 添加允许的域名与信任代理,保障穿透后的 UI 访问
openclaw config set gateway.controlUi.allowedOrigins '["你的域名"]'
openclaw config set gateway.trustedProxies '["127.0.0.1"]'
# 禁用认证(开发/测试环境下可选,简化流程)
openclaw config set gateway.auth.mode "none"
# 4. 配置 Ernie 5.0 (文心一言) 接入点
openclaw config set models.providers.ernie-profile '{
"baseUrl": "https://aistudio.baidu.com/llm/lmapi/v3",
"apiKey": "你的_API_KEY",
"api": "openai-completions",
"models": [
{ "id": "ernie-5.0-thinking-preview", "name": "Ernie 5.0 Thinking" }
]
}'
openclaw config set agents.defaults.model.primary "ernie-profile/ernie-5.0-thinking-preview"
# 5. 启动网关服务 (监听 18789 端口)
openclaw gateway --port 18789 --verbose
很遗憾,我在星河社区的api额度没有了....所以没有调试
换用免费模型PaddlePaddle/ERNIE-4.5-21B-A3B-Paddle 试试:
openclaw config set models.providers.ernie-profile '{
"baseUrl": "https://api-p9mak7fap5m7vd53.aistudio-app.com/v1",
"apiKey": "6cac673af748cec344-------------------",
"api": "openai-completions",
"models": [
{ "id": "default", "name": "default" }
]
}'
内网穿透
可以使用FRP,也可以使用Easytier等
具体参见以前的文档。
设备接入与授权
列出当前所有的设备服务申请列表
openclaw devices list
批准特定设备 UUID 接入网关
openclaw devices approve request下设备UUID
正在实践中,先发帖