VPS Command Runner
Execute commands across your VPS fleet simultaneously.
VPS Inventory
| Host | IP | Username | Services |
|---|
| Internal | [REDACTED] | [REDACTED] | Gateway, Nextcloud, Providers |
| VPS1 (DE) |
[REDACTED] | [REDACTED] | Provider, Nextcloud |
| VPS2 (US) | [REDACTED] | [REDACTED] | WireGuard, Providers, Nextcloud |
Setup
Edit scripts to add your credentials:
CODEBLOCK0
Quick Usage
CODEBLOCK1
Scripts
- -
run-all.sh <command> — Execute on all VPS - INLINECODE1 — Execute on specific VPS
- INLINECODE2 — Quick health check of all VPS
SSH Setup
Default: password authentication (edit scripts to change)
For key-based auth:
- 1. Add keys to INLINECODE3
- Modify scripts to use:
ssh -i ~/.ssh/key ... instead of INLINECODE5
VPS 命令运行器
同时在你的所有VPS上执行命令。
VPS 清单
| 主机 | IP | 用户名 | 服务 |
|---|
| 内部服务器 | [已编辑] | [已编辑] | 网关、Nextcloud、提供商 |
| VPS1(德国) |
[已编辑] | [已编辑] | 提供商、Nextcloud |
| VPS2(美国) | [已编辑] | [已编辑] | WireGuard、提供商、Nextcloud |
设置
编辑脚本以添加你的凭据:
bash
在每个脚本中设置以下变量:
USER=你的用户名
PASS=你的密码
或使用SSH密钥:
将密钥添加到 ~/.ssh/ 并修改脚本以使用密钥认证
快速使用
bash
在所有VPS上运行命令
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh docker ps
在特定VPS上运行命令
~/.openclaw/workspace/skills/vps-command-runner/scripts/run.sh [IP] systemctl status docker
检查所有位置的提供商状态
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh docker ps --filter name=urnetwork --format \{{.Names}}\ | wc -l
更新所有提供商
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh docker pull bringyour/community-provider:g4-latest
脚本
- - run-all.sh <命令> — 在所有VPS上执行
- run.sh <命令> — 在特定VPS上执行
- status.sh — 快速检查所有VPS的健康状态
SSH 设置
默认:密码认证(编辑脚本以更改)
如需基于密钥的认证:
- 1. 将密钥添加到 ~/.ssh/
- 修改脚本使用:ssh -i ~/.ssh/密钥 ... 替代 sshpass