Run OpenClaw Gateway on exe.dev (VM + HTTPS proxy) for remote access

Read when…
  • You want a cheap always-on Linux host for the Gateway
  • You want remote Control UI access without running your own VPS

exe.dev

目标:在exe.dev虚拟机上运行OpenClaw网关,可通过https://<vm-name>.exe.xyz从您的笔记本电脑访问

本页面假设使用exe.dev的默认exeuntu镜像。如果您选择了不同的发行版,请相应地映射软件包。

初学者快速路径

  1. https://exe.new/openclaw
  2. 按需填写您的认证密钥/令牌
  3. 点击您虚拟机旁边的”Agent”,并等待…
  4. ???
  5. 获得成功

您需要的条件

  • exe.dev账户
  • ssh exe.dev访问exe.dev虚拟机(可选)

使用Shelley进行自动化安装

Shelley,exe.dev的代理,可以通过我们的提示立即安装OpenClaw。使用的提示如下:

在此虚拟机上设置OpenClaw(https://docs.openclaw.ai/install),使用openclaw注册时的非交互模式和接受风险标志。按需添加提供的认证或令牌。配置nginx将默认端口18789转发到默认启用站点配置的根位置,确保启用WebSocket支持。配对通过"openclaw devices list"和"openclaw device approve <request id>"完成。确保仪表板显示OpenClaw的健康状态为OK。exe.dev会处理从端口8000到端口80/443的转发和HTTPS,因此最终的可访问地址应为<vm-name>.exe.xyz,无需指定端口。

手动安装

1) 创建虚拟机

从您的设备执行:

ssh exe.dev new

然后连接:

ssh <vm-name>.exe.xyz

提示:请保持此虚拟机具有状态。OpenClaw的状态存储在~/.openclaw/~/.openclaw/workspace/目录下。

2) 安装前置条件(在虚拟机上)

sudo apt-get update
sudo apt-get install -y git curl jq ca-certificates openssl

3) 安装OpenClaw

运行OpenClaw安装脚本:

curl -fsSL https://openclaw.ai/install.sh | bash

4) 配置nginx将OpenClaw代理到端口8000

使用以下内容编辑/etc/nginx/sites-enabled/default

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    listen 8000;
    listen [::]:8000;

    server_name _;

    location / {
        proxy_pass http://127.0.0.1:18789;
        proxy_http_version 1.1;

        # WebSocket支持
        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;

        # 长连接的超时设置
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
    }
}

5) 访问OpenClaw并授予权限

访问https://<vm-name>.exe.xyz/?token=YOUR-TOKEN-FROM-TERMINAL(查看注册时的控制台UI输出)。使用openclaw devices listopenclaw devices approve <requestId>批准设备。如有疑问,请通过浏览器使用Shelley!

远程访问

远程访问由exe.dev的认证处理。默认情况下,来自端口8000的HTTP流量通过电子邮件认证转发到https://<vm-name>.exe.xyz

更新

npm i -g openclaw@latest
openclaw doctor
openclaw gateway restart
openclaw health

指南:更新