手动安装 tarball
在任意 Linux CPU(包括 ppc64、s390x 和 loong64)上从发布归档手动安装 wantasticd,用 genkey 认领,并添加你自己的服务。
wantasticd 已从你选择的归档文件安装并完成认领,由你控制的服务保持运行。
开始之前
- 在带有 /dev/net/tun 的 Linux 机器上拥有 root 权限。
- curl 或 wget,或其他将文件复制到该机器的方式。
- 一部手机或一个浏览器,用于登录 Wantastic 控制台。
快速安装(5 分钟)
适用于安装程序无法识别的 CPU、离线机器、只读系统或你自己的工具链。将 <arch> 替换为发布矩阵中的归档名称(amd64、arm64、arm、386、mips、mipsle、mips64、mips64le、riscv64、ppc64le、ppc64、s390x、loong64)。
- 1用第一个代码块下载归档文件并安装二进制文件。./wantasticd version 必须输出版本号。
- 2运行 sudo wantasticd genkey。扫描二维码或打开 Claim URL,登录后点击 Claim Device。
- 3终端打印 "Device claimed" 后,按 Ctrl+C。
- 4用第二个代码块(systemd)创建服务。其他 init 系统请参阅下一节。
- 5在控制台中打开 Devices。设备显示为 Online。
TAG=$(curl -fsSL https://get.wantastic.app/latest | cut -d+ -f1)
curl -fsSLO https://get.wantastic.app/$TAG/wantasticd-linux-<arch>.tar.gz
tar -xzf wantasticd-linux-<arch>.tar.gz && ./wantasticd version
sudo install -m 755 wantasticd /usr/local/bin/wantasticd
sudo wantasticd genkeysudo tee /etc/systemd/system/wantasticd.service >/dev/null <<'EOF'
[Unit]
Description=Wantastic Overlay Networking Daemon
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/wantasticd connect --config "/etc/wantastic/config.conf"
Restart=on-failure
RestartSec=5
KillMode=process
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && sudo systemctl enable --now wantasticd$ sudo wantasticd genkey……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$ sudo systemctl daemon-reload && sudo systemctl enable --now wantasticd3
- 1打开此链接,或扫描二维码
- 2已认领:现在按 Ctrl+C
- 3重启一次服务
- 1Claim public key 已自动填写
- 2Wantastic server 保持默认即可
- 3点击 Claim Device
提示: 机器无法访问互联网?在另一台电脑上下载归档文件,用 scp 复制过去。不过 genkey 仍需要互联网才能完成认领。
其他 init 系统
每种服务都运行相同的命令:wantasticd connect --config /etc/wantastic/config.conf。
#!/sbin/openrc-run
description="Wantastic Overlay Networking Daemon"
command="/usr/local/bin/wantasticd"
command_args="connect --config /etc/wantastic/config.conf"
command_background=true
pidfile=/run/wantasticd.pid
depend() { need net; }然后:chmod +x /etc/init.d/wantasticd && rc-update add wantasticd default && rc-service wantasticd start
警告: 自动更新会通过 systemd、launchd、procd、OpenRC 或 /etc/init.d/wantasticd restart 重启代理。如果你使用其他方式(supervisord、runit、s6、自定义循环),请在命令中添加 --no-auto-update 并手动更新。
检查是否正常工作
- 1运行 wantasticd status。它会显示 Status: Connected 和一个 VPN IP。
- 2在控制台中打开 Devices。设备显示为 Online。
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 持续更新
其他安装方式
仅在自动化或特殊情况下才需要这些方式。上面的快速安装是最简单的方法。
不使用 genkey,而是用 Account → Secrets 中的令牌登录。--no-connect 会保存配置后退出。
sudo wantasticd login --no-connect --token <TOKEN>
# self-hosted portal:
# sudo wantasticd login --no-connect --portal-url https://wantastic.example.com --token <TOKEN>像对待密码一样对待令牌。在其过期之前,任何持有它的人都能向你的账户添加设备。
- 1打开 Secrets 选项卡
- 2点击 + New Secret
- 3为其命名
- 4点击 Generate
- 5复制新密钥
验证结果
常见问题
二进制文件无法运行。cannot execute binary file: Exec format errorshell
归档文件与 CPU 不匹配。
检查 uname -m,并从发布矩阵下载匹配的归档文件。
uname -m下载返回 404。curl: (22) The requested URL returned error: 404curl
归档名称有拼写错误,或 TAG 仍包含 +sha 部分。
从发布矩阵中原样复制归档名称,并按示例使用 cut -d+ -f1。
服务找不到配置。Config not found at /etc/wantastic/config.conf. Run `wantasticd genkey --out <key>` to create a claim key and wait for claim, or pass --wait-claim with an existing key.wantasticd connect
genkey 运行时未使用 sudo,因此配置被保存到了 ~/.config/wantastic。
使用 sudo 运行 genkey,并重新认领设备。
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticdgenkey 或 login 无法保存配置。Failed to prepare config path: parent /etc/wantastic is not a directorywantasticd genkey / login
存在一个旧的普通文件 /etc/wantastic。旧版本曾将其用作配置文件。
将旧文件移到别处,然后重新认领。
sudo mv /etc/wantastic /etc/wantastic.old
sudo wantasticd genkey你已点击 Claim Device,但终端始终没有打印 "Device claimed"。Claim polling not ready: claim config rejected (401): invalid signature or timestamp out of windowwantasticd genkey
设备时钟不准确。只有当时钟与实际时间相差在 30 秒以内时,认领才能成功。
修正时钟。genkey 会继续等待,并自行完成。
sudo timedatectl set-ntp true
date服务一启动就立即停止。Failed to start agent: create device: create tun: CreateTUN("wantastic0") failed; /dev/net/tun does not exist服务日志
内核 TUN 驱动未加载。
加载 TUN 驱动,然后重启服务。
sudo modprobe tun
sudo systemctl restart wantasticd出现了第二个接口(wantastic1),或日志显示端口冲突。Port 51820 in use, using random port服务日志
genkey 仍在终端中运行,而服务也在运行。现在有两个副本在争用。
在运行 genkey 的终端中按 Ctrl+C,然后重启服务。
sudo systemctl restart wantasticdstatus 显示 Running (tunnel down),或 peers 显示 (server) 为 HANDSHAKE never。Device health check failed: …服务日志
网络阻止了到中心节点(wg.wantastic.app)的出站 UDP 51820 端口,或 DNS 不可用。
在防火墙中放行出站 UDP 51820,然后重启服务。
nslookup wg.wantastic.app
sudo systemctl restart wantasticd继续阅读
仍然无法解决?
请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。