在 BusyBox / 嵌入式 Linux 上安装
在没有 systemd、procd 或 OpenRC 的精简 BusyBox 设备上安装 wantasticd:一条 wget 命令,扫描二维码,点击 Claim Device。
BusyBox init 会保持 wantasticd 运行并在开机时启动它,设备在控制台中显示为 Online。
开始之前
- 一台使用 BusyBox init 且带有 /etc/init.d 目录的 Linux 设备上的 root shell。
- TUN 驱动(/dev/net/tun)。
- 约 6 MB 可用空间,用于存放二进制文件。
- 一部手机或一个浏览器,用于登录 Wantastic 控制台。
快速安装(2 分钟)
一条命令即可安装 wantasticd 并将其添加到 /etc/inittab,这样 BusyBox 会在它停止时自动重启。无需令牌。
- 1以 root 身份登录设备。复制下方命令并粘贴到 shell 中。
- 2设备会打印 Claim URL 和二维码。用手机扫描二维码,或在浏览器中打开 Claim URL。
- 3登录 Wantastic 控制台。Claim Wantastic Device 窗口会打开,密钥已自动填好。点击 Claim Device。
- 4终端打印 "Device claimed"。按 Ctrl+C,然后运行下方的重启命令。
- 5在控制台中打开 Devices。设备显示为 Online。
wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkeykillall wantasticd# wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkey…Skipping login. Run 'wantasticd login' to authenticate.Added respawn entry to /etc/inittab.…Generated device claim key: /etc/wantastic/device-claim-key.jsonPublic key: Vd3hK1oQ7mR2sT9uW4xY6zA8bC0dE2fG4hJ6kL8mN0P=Server URL: https://console.wantastic.appClaim URL: https://console.wantastic.app/#desktop?claim_public_key=Vd3hK1oQ…%3D&wantastic_server=https%3A%2F%2Fconsole.wantastic.app1█▀▀▀▀▀█ ▄▀▄ ▀█▄ █▀▀▀▀▀██ ███ █ ▀█▄▀▄█ █ ███ ██ ▀▀▀ █ ▄▀█ ▀▄ █ ▀▀▀ █▀▀▀▀▀▀▀ ▀ ▀ █ ▀ ▀▀▀▀▀▀▀▀█▄▀▄▀▀█▀▄█▀▄▀▀▄█▀▄▀█▄█▀▀▀▀▀█ █▄▀▄▀█ ▀▄█ ▄▀▀▀▀▀▀▀▀ ▀▀ ▀▀▀ ▀▀▀ ▀▀▀2026/10/29 09:14:03 Waiting for claim. Press Ctrl+C to stop.2026/10/29 09:15:12 Device claimed. Configuration saved to /etc/wantastic/config.conf2^C# killall wantasticd3
- 1打开此链接,或扫描二维码
- 2已认领:现在按 Ctrl+C
- 3重启一次服务
- 1Claim public key 已自动填写
- 2Wantastic server 保持默认即可
- 3点击 Claim Device
提示: 手边没有手机?从终端复制 Claim URL,在任意电脑上打开即可。
注意: 重启命令会停止 wantasticd,BusyBox 会立即用新配置重新启动它。
检查是否正常工作
- 1运行 wantasticd status。它会显示 Status: Connected 和一个 VPN IP。
- 2在控制台中打开 Devices。设备显示为 Online。
ps | grep '[w]antasticd' # exactly one connect process
wantasticd status# wantasticd statusStatus: Connected1Version: v1.0.54+377f3c0Mode: TUN (wantastic0)VPN IPs: 10.200.0.14/322Public key: q7ZkV3m1yH0dTn8pXo2bLwR4sE6uJ9cA1fG5hK8iN0M=Server: wg.wantastic.app:51820Exit node: falseLocal access: falseAuto update: trueTraffic: ↓ 18.4 KiB ↑ 9.2 KiBPeers: 2 (direct 1, relay 1)Uptime: 4m12s
- 1隧道已建立
- 2你的覆盖网络地址
- 1按名称搜索
- 2状态显示 Online
- 3覆盖网络 IP 与 wantasticd status 一致
- 4Last seen 持续更新
推荐:关闭自动更新
在 BusyBox 上,自动更新可能会启动第二个 wantasticd 副本。用此命令关闭自动更新。
sed -i 's| connect --config \(.*\)$| connect --config \1 --no-auto-update|' /etc/init.d/wantasticd
killall wantasticd注意: 以后要更新时,请按照《更新、回滚和卸载》中的 BusyBox 选项卡操作。
管理服务
- 重启:killall wantasticd。BusyBox 会重新启动它。
- 永久停止:从 /etc/inittab 中删除 wantasticd 那一行,运行 kill -HUP 1,然后运行 killall wantasticd。
- 日志:默认没有日志文件。在前台运行 wantasticd connect --config /etc/wantastic/config.conf -v 即可查看日志。
其他安装方式
仅在自动化或特殊情况下才需要这些方式。上面的快速安装是最简单的方法。
当你用脚本安装大量设备,或无人能扫描二维码时,请使用令牌。在控制台中创建一次令牌即可:Account → Secrets → + New Secret → Generate。用它替换 <TOKEN>。
wget -qO- https://get.wantastic.app/install.sh | sh -s -- --token <TOKEN>像对待密码一样对待令牌。在其过期之前,任何持有它的人都能向你的账户添加设备。
- 1打开 Secrets 选项卡
- 2点击 + New Secret
- 3为其命名
- 4点击 Generate
- 5复制新密钥
验证结果
常见问题
运行着两个 wantasticd 进程,或出现了 wantastic1 接口。Port 51820 in use, using random port日志 / ps
genkey 仍在终端中运行,或自动更新启动了第二个副本。
在运行 genkey 的终端中按 Ctrl+C。然后停止所有副本;BusyBox 会重新启动恰好一个。同时关闭自动更新(见上文)。
killall wantasticd安装程序结束,但没有启动任何内容。Unknown init system — start manually: wantasticd connect --config /etc/wantastic/config.confinstall.sh
设备没有 /etc/init.d 目录。
认领设备,然后将此保活循环添加到固件的启动脚本中(例如 rc.local)。
( while true; do /usr/bin/wantasticd connect --config /etc/wantastic/config.conf --no-auto-update; sleep 5; done ) >/tmp/wantasticd.log 2>&1 &服务无法启动,或反复重启。Failed to load configuration: validate config: private key required前台运行
wantasticd 已安装,但设备尚未认领,因此其配置文件为空。
认领设备,然后重启服务。
wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
killall wantasticd服务一启动就立即停止。Failed to start agent: create device: create tun: CreateTUN("wantastic0") failed; /dev/net/tun does not exist服务日志
内核 TUN 驱动未加载。
加载 TUN 驱动,然后重启服务。
modprobe tun
killall wantasticd你已点击 Claim Device,但终端始终没有打印 "Device claimed"。Claim polling not ready: claim config rejected (401): invalid signature or timestamp out of windowwantasticd genkey
设备时钟不准确。只有当时钟与实际时间相差在 30 秒以内时,认领才能成功。
修正时钟。genkey 会继续等待,并自行完成。
ntpd -q -p pool.ntp.org
date安装程序无法写入二进制文件。Error: could not remount / read-write. Run as root or unlock the filesystem.install.sh
固件为只读。
按照《手动安装 tarball》指南,将二进制文件放到可写分区上。
status 显示 Running (tunnel down),或 peers 显示 (server) 为 HANDSHAKE never。Device health check failed: …服务日志
网络阻止了到中心节点(wg.wantastic.app)的出站 UDP 51820 端口,或 DNS 不可用。
在防火墙中放行出站 UDP 51820,然后重启服务。
nslookup wg.wantastic.app
killall wantasticd令牌安装在下载后立即失败。Login failed: registration rejected (401): invalid or expired login tokeninstall.sh / wantasticd login
令牌错误、已过期、已用完(达到 Max Uses)或已被删除。
不使用令牌,改为认领设备。
wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
killall wantasticd继续阅读
仍然无法解决?
请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。