NK install.sh 一键装机 + 升级 + 自动激活 license。
命令
curl -fsSL https://www.host.mw/install.sh -o /tmp/i.sh && \
NK_PLAN=business NK_LICENSE_CODE='<lic_id>' bash /tmp/i.sh
不带 sudo — install.sh 自己 self-elevate(检测 uid != 0 自动 exec sudo / doas / 报错)。
7 步流程
- STEP 0/6 — 探测 host / arch / 升级模式
- STEP 1/6 — 创建系统用户
- STEP 2/6 — 下载 paid tarball(sign-bundle-url + bundle-dl token 鉴权)
- STEP 3/6 — 解压到 $NK_HOME
- STEP 4/6 — 升级模式沿用旧凭证 / 端口,全新装随机生成
- STEP 5/6 — systemctl restart 等 active
- STEP 5.5/6 — 自动激活:调 machine-id + ipify → POST auto-activate → 写 auth.lic → restart
- STEP 6/6 — 自检 + 显示 admin URL/Email/Password
升级模式
NK 已装 → 保留 data/config/auth.lic/certs/logs,只覆盖 binary + static + install 资源。沿用老 systemd unit Environment。