背景
我有一台ubuntu服务器,我想部署openclaw体验一下,然后在我mac电脑进行访问。在ubuntu下安装很方便
arduino
curl -fsSL https://openclaw.ai/install.sh | bash
然后参考damodev.csdn.net/697dff7b7c1... 做一下设置,主要是设置一下后续使用deepseek大模型。
vbnet
openclaw config set 'models.providers.deepseek' --json '{
"baseUrl": "https://api.deepseek.com/v1",
"apiKey": "sk-xxxxx",
"api": "openai-completions",
"models": [
{ "id": "deepseek-chat", "name": "DeepSeek Chat" },
{ "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" }
]
}'
#设置 models.mode 为 merge
openclaw config set models.mode merge
#设置默认模型(以deepseek-chat为例)
openclaw models set deepseek/deepseek-chat
但是启动后无法直接访问,比如http://{ubuntu ip}:18789/。好像是openclaw只允许本地机器访问
解决办法
mac上启动,做一个端口转发
kotlin
ssh -N -L 18789:127.0.0.1:18789 xxx@10.151.179.187
访问提示unauthorized: gateway token missing (open the dashboard URL and paste the token in Control UI settings)
在ubuntu服务器的~/.openclaw/openclaw.json中找到token,然后访问就行了 http://127.0.0.1:18789/chat?session=main&token=3644b07faa7cb8a07eafa686d732e7b74