安装 Client
This page is not available in English yet. Showing Simplified Chinese.
读者:将 VPS 接入 Master 的运维人员。
Host = 一台运行 3x-ui + Client 的 VPS。推荐通过控制台 SSH 装机向导完成;也可在已装好 3x-ui 的机器上手工安装 Client。
1. 适用场景
Section titled “1. 适用场景”- 新购 VPS,从零安装面板与 Client
- 已有 3x-ui,只需挂载到 Master 做配置同步
- 批量扩容同一区域的多台机器
2. 方式 A:控制台 SSH 装机(推荐)
Section titled “2. 方式 A:控制台 SSH 装机(推荐)”- 登录 Master 控制台 → 主机 → 添加主机
- 填写 SSH 地址、端口、root 密码或密钥(支持凭证库)
- 点击 测试 SSH,确认连通
- 勾选 安装 3x-ui(新机器)与 安装 Client
- 提交后查看进度条:准备 → SSH 连通 → 安装 XUI → 安装 Client → 完成
- 完成后 Host 出现在列表,状态为在线即可参与 逻辑节点 绑定
向导会非交互安装 3x-ui(随机或指定面板路径),并从 Master /dl/ 拉取对应架构的 xctl-client 二进制,写入 systemd 单元 xctl-client.service。
3. 方式 B:手工 curl 安装
Section titled “3. 方式 B:手工 curl 安装”适用于无法从 Master SSH 出站、或习惯自行运维的场景。
在 VPS 上以 root 执行(将 MASTER_URL 换成你的 Master 根地址):
curl -fsSL https://master.example.com/dl/install-host.sh | bash -s -- \ --master-url https://master.example.com \ --mode all \ --panel-pass 'YourStrongPassword'仅安装 Client(3x-ui 已存在):
curl -fsSL https://master.example.com/dl/install-host.sh | bash -s -- \ --master-url https://master.example.com \ --mode client安装后:
systemctl enable --now xctl-clientsystemctl status xctl-client最后在控制台 主机 页 认领 或 添加 该机器(若未自动注册,按主机 ID / 令牌指引操作)。
4. 下载地址说明
Section titled “4. 下载地址说明”| URL | 说明 |
|---|---|
GET /dl/install-host.sh | 手工安装脚本 |
GET /dl/xctl-client-linux-amd64 | Client 二进制(arm64 同理) |
GET /dl/xctl-client-linux-{arch}.sha256 | 校验文件 |
Master 本地 dl/ 无包时,会 302 到 GitHub client-latest Release。生产环境建议节点优先走 Master 同域下载,便于版本对齐。
5. 注意事项
Section titled “5. 注意事项”- Client 需能主动连接 Master(WebSocket + HTTPS);仅开放入站、无法出站的机器不适用
- 面板账号密码由装机流程生成,请在控制台主机详情中查看,勿使用默认弱口令
- 修改 Master URL 或重装 Client 后,旧 Host 记录可能需手动下线再接入
6. 常见问题
Section titled “6. 常见问题”Q:SSH 测试显示 root @ undefined/undefined?
A:表示 SSH 已连通,仅 OS/架构字段未解析,可继续装机。
Q:Client 在线但配置不同步?
A:查看 配置同步队列,确认逻辑节点已绑定该 Host 且任务未失败。
Q:能否跳过 3x-ui?
A:当前架构下 Client 依赖本机 3x-ui API 落地 inbound,不支持无面板模式。