exe.dev

Mục tiêu: Chạy OpenClaw Gateway trên VM của exe.dev, truy cập từ laptop qua: https://<vm-name>.exe.xyz

Trang này giả định các bạn dùng image exeuntu mặc định của exe.dev. Nếu chọn distro khác, các bạn cần điều chỉnh tên package cho phù hợp nhé.

Cách nhanh cho người mới

  1. Truy cập https://exe.new/openclaw
  2. Điền auth key/token của các bạn vào
  3. Click vào “Agent” bên cạnh VM, rồi đợi…
  4. ???
  5. Profit

Yêu cầu

  • Tài khoản exe.dev
  • Quyền truy cập ssh exe.dev vào máy ảo exe.dev (tùy chọn)

Cài đặt tự động với Shelley

Shelley, Agent của exe.dev, có thể cài OpenClaw ngay lập tức bằng prompt của mình. Prompt được dùng như sau:

Set up OpenClaw (https://docs.openclaw.ai/install) on this VM. Use the non-interactive and accept-risk flags for openclaw onboarding. Add the supplied auth or token as needed. Configure nginx to forward from the default port 18789 to the root location on the default enabled site config, making sure to enable Websocket support. Pairing is done by "openclaw devices list" and "openclaw device approve <request id>". Make sure the dashboard shows that OpenClaw's health is OK. exe.dev handles forwarding from port 8000 to port 80/443 and HTTPS for us, so the final "reachable" should be <vm-name>.exe.xyz, without port specification.

Cài đặt thủ công

1) Tạo VM

Từ máy của các bạn:

ssh exe.dev new

Sau đó kết nối:

ssh <vm-name>.exe.xyz

Lưu ý: Giữ VM này ở chế độ stateful nhé. OpenClaw lưu trạng thái trong ~/.openclaw/~/.openclaw/workspace/.

2) Cài các gói cần thiết (trên VM)

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

3) Cài đặt OpenClaw

Chạy script cài đặt OpenClaw:

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

4) Setup nginx để proxy OpenClaw ra port 8000

Sửa file /etc/nginx/sites-enabled/default với nội dung:

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 support
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # Standard proxy headers
        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;

        # Timeout settings for long-lived connections
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
    }
}

5) Truy cập OpenClaw và cấp quyền

Truy cập https://<vm-name>.exe.xyz/?token=YOUR-TOKEN-FROM-TERMINAL (xem token trong output của Control UI khi onboarding). Approve các thiết bị bằng lệnh openclaw devices listopenclaw devices approve <requestId>. Nếu không chắc, các bạn dùng Shelley từ trình duyệt nhé!

Truy cập từ xa

Truy cập từ xa được xử lý bởi hệ thống xác thực của exe.dev. Mặc định, traffic HTTP từ port 8000 được forward tới https://<vm-name>.exe.xyz với xác thực qua email.

Cập nhật

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

Hướng dẫn: Cập nhật