服务器搭建 Openclaw

· · 科技·工程

上一篇

0. 前言

~看见很火就来了~

你需要开通 github 学生卡。

1. 部署

运行 curl -fsSL https://openclaw.ai/install.sh | bash ,稍等片刻。
依次选择:

Yes
QuickStart
Copilot

去 github 登录。

选一个不用额度的模型。
channel 和 skills 可以后序设置。 然后再等会就结束了。(存下你 Dashboard Ready 块的值)

2.设置公网连接

需要先安装 nginx。
编辑 /etc/nginx/nginx.conf,在 html 块加入以下内容:

server {
  listen 80;
  listen [::]:80;
  server_name ai.flyhappily.dpdns.org;
  location /{
    proxy_pass http://127.0.0.1:18789;
    proxy_read_timeout 200s;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}


去 Cloudflare 添加子域名:

运行命令:

openclaw gateway stop
openclaw gateway start

等等再看你的域名大概就是这个样子了:

打开你的 ~/.openclaw/openclaw.json,复制 gateway 块中的 auth 块中的 Token,粘贴到网站 Overview -> Gateway Token 中,点击 connect,就成功了!

尽情享用吧!

下一篇