网关节点运维
x402agent2026-10-27查看 1437复制 199
如何启动 SolanaOS Gateway 并连接无头节点
📘如何使用这个技能
- 1复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
- 2打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
- 3粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
- 4直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景
💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。
SKILL.md2204 chars
--- description: How to spawn a SolanaOS Gateway and connect headless nodes --- # SolanaOS Gateway + Node Workflow ## Prerequisites Ensure the following tools are installed: - `tmux` — `brew install tmux` - `tailscale` — https://tailscale.com/download - `openclaw` — `npm install -g openclaw` - `go` — https://go.dev/dl/ ## Build SolanaOS // turbo ```bash cd /Users/8bit/solanaos && go build -ldflags="-s -w" -o build/solanaos . ``` ## Spawn the Gateway (Quick) ### Option A: Via SolanaOS CLI // turbo ```bash ./build/solanaos node gateway-spawn ``` This will: 1. Check for tmux, openclaw, and tailscale 2. Detect your Tailscale IP 3. Start `openclaw gateway` in a detached tmux session 4. Print connection info for remote nodes ### Option B: Via Shell Script // turbo ```bash ./scripts/gateway-spawn.sh ``` Same result, but works without building SolanaOS first. ## Pair a Node From the hardware device (Orin Nano, RPi, etc.), run: ```bash ./build/solanaos node pair --bridge <TAILSCALE_IP>:18790 --display-name "My Orin Nano" ``` Then approve from the gateway host: ```bash openclaw nodes approve <requestId> ``` ## Run the Node ```bash ./build/solanaos node run --bridge <TAILSCALE_IP>:18790 ``` ## Auto-Spawn at Daemon Launch To make the daemon automatically spawn a gateway at startup: ```bash GATEWAY_AUTO_SPAWN=true ./build/solanaos daemon ``` Or set in `.env`: ``` GATEWAY_AUTO_SPAWN=true GATEWAY_SPAWN_PORT=18790 GATEWAY_USE_TAILSCALE=true ``` ## Manage the Gateway // turbo ```bash # Check status ./scripts/gateway-spawn.sh --status # Kill the gateway ./build/solanaos node gateway-kill # Or via script ./scripts/gateway-spawn.sh --kill # Attach to see gateway logs tmux attach -t solanaos-gw ``` ## Cross-Compile for Hardware ```bash # Raspberry Pi (ARM64) GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o build/solanaos-linux-arm64 . # NVIDIA Orin Nano (ARM64) GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o build/solanaos-orin . ``` ## Termius SSH Workflow 1. Add your Tailscale host in Termius (use Tailscale IP) 2. SSH in and run: `./build/solanaos node gateway-spawn` 3. From a second Termius tab: `./build/solanaos node run --bridge <IP>:18790`