文档/安装 wantasticd5 分钟任意 Linux

手动安装 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. 1用第一个代码块下载归档文件并安装二进制文件。./wantasticd version 必须输出版本号。
  2. 2运行 sudo wantasticd genkey。扫描二维码或打开 Claim URL,登录后点击 Claim Device。
  3. 3终端打印 "Device claimed" 后,按 Ctrl+C。
  4. 4用第二个代码块(systemd)创建服务。其他 init 系统请参阅下一节。
  5. 5在控制台中打开 Devices。设备显示为 Online。
下载、安装并认领bash
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 genkey
出现 "Device claimed" 后:按 Ctrl+C,然后创建 systemd 服务bash
sudo 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.json
Public key: Vd3hK1oQ7mR2sT9uW4xY6zA8bC0dE2fG4hJ6kL8mN0P=
Server URL: https://console.wantastic.app
Claim 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. 1打开此链接,或扫描二维码
  2. 2已认领:现在按 Ctrl+C
  3. 3重启一次服务
genkey 打印 Claim URL 和二维码后进入等待。你在控制台中点击 Claim Device 后,它会打印 "Device claimed"。然后按 Ctrl+C 并重启服务。
控制台视图
Claim Wantastic Device
1
Claim public key
q3Xv…9f2Q= (44 characters)
2
Wantastic server
https://console.wantastic.app
Cancel3Claim Device
  1. 1Claim public key 已自动填写
  2. 2Wantastic server 保持默认即可
  3. 3点击 Claim Device
Claim Wantastic Device。Claim URL 和二维码会自动填入密钥,你只需点击 Claim Device。

提示: 机器无法访问互联网?在另一台电脑上下载归档文件,用 scp 复制过去。不过 genkey 仍需要互联网才能完成认领。

其他 init 系统

每种服务都运行相同的命令:wantasticd connect --config /etc/wantastic/config.conf。

/etc/init.d/wantasticdsh
#!/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. 1运行 wantasticd status。它会显示 Status: Connected 和一个 VPN IP。
  2. 2在控制台中打开 Devices。设备显示为 Online。
检查bash
wantasticd status
wantasticd status
$ wantasticd status
Status: Connected1
Version: v1.0.54+377f3c0
Mode: TUN (wantastic0)
VPN IPs: 10.200.0.14/322
Public key: q7ZkV3m1yH0dTn8pXo2bLwR4sE6uJ9cA1fG5hK8iN0M=
Server: wg.wantastic.app:51820
Exit node: false
Local access: false
Auto update: true
Traffic: ↓ 18.4 KiB ↑ 9.2 KiB
Peers: 2 (direct 1, relay 1)
Uptime: 4m12s
  1. 1隧道已建立
  2. 2你的覆盖网络地址
Status: Connected 加上 VPN IP 表示隧道已建立。
控制台视图
Devices
1
Search by name, IP, or key...
Select AllAdd Device
DeviceTypeVPN IPStatusSeenActions
HQ-CCR2004MikroTik310.88.0.22Online4Now
Branch-hAP-ax3MikroTik10.88.0.3Online12s ago
Tower-12-OpenWrtwantasticd10.88.0.4Online4s ago
NOC-Ubuntu-01wantasticd10.88.0.5Offline3 h ago
  1. 1按名称搜索
  2. 2状态显示 Online
  3. 3覆盖网络 IP 与 wantasticd status 一致
  4. 4Last seen 持续更新
Devices 窗口:新设备以其名称出现,并在几秒钟内变为 Online。

其他安装方式

仅在自动化或特殊情况下才需要这些方式。上面的快速安装是最简单的方法。

不使用 genkey,而是用 Account → Secrets 中的令牌登录。--no-connect 会保存配置后退出。

令牌登录bash
sudo wantasticd login --no-connect --token <TOKEN>
# self-hosted portal:
# sudo wantasticd login --no-connect --portal-url https://wantastic.example.com --token <TOKEN>

像对待密码一样对待令牌。在其过期之前,任何持有它的人都能向你的账户添加设备。

控制台视图
My Account
ProfileSecuritySessions2FA1SecretsSnapshotsWidgetsMCP
Enrollment Secrets
2+ New Secret
3
Secret Name
noc-rollout
Expiry (Days, 0 for never)
7
Max Uses (0 for unlimited)
25
4Generate
5
noc-rolloutwnt_••••••••3f9a3 / 25 uses · 6 days left
Device claim QRShow Enrollment Script
  1. 1打开 Secrets 选项卡
  2. 2点击 + New Secret
  3. 3为其命名
  4. 4点击 Generate
  5. 5复制新密钥
Account → Secrets → + New Secret。密钥的值就是令牌。

验证结果

wantasticd version 输出预期的版本号。
/etc/wantastic/config.conf 存在且不为空。
你的服务开机自启,wantasticd status 显示 Connected。
设备在 Devices 中显示为 Online。

常见问题

二进制文件无法运行。cannot execute binary file: Exec format errorshell
原因

归档文件与 CPU 不匹配。

解决方法

检查 uname -m,并从发布矩阵下载匹配的归档文件。

检查 CPUbash
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,并重新认领设备。

以 root 身份认领bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
genkey 或 login 无法保存配置。Failed to prepare config path: parent /etc/wantastic is not a directorywantasticd genkey / login
原因

存在一个旧的普通文件 /etc/wantastic。旧版本曾将其用作配置文件。

解决方法

将旧文件移到别处,然后重新认领。

修复bash
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 会继续等待,并自行完成。

开启网络对时bash
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 驱动,然后重启服务。

加载 TUNbash
sudo modprobe tun
sudo systemctl restart wantasticd
验证: ls -l /dev/net/tun 显示该设备。
出现了第二个接口(wantastic1),或日志显示端口冲突。Port 51820 in use, using random port服务日志
原因

genkey 仍在终端中运行,而服务也在运行。现在有两个副本在争用。

解决方法

在运行 genkey 的终端中按 Ctrl+C,然后重启服务。

重启bash
sudo systemctl restart wantasticd
status 显示 Running (tunnel down),或 peers 显示 (server) 为 HANDSHAKE never。Device health check failed: …服务日志
原因

网络阻止了到中心节点(wg.wantastic.app)的出站 UDP 51820 端口,或 DNS 不可用。

解决方法

在防火墙中放行出站 UDP 51820,然后重启服务。

测试 DNS 并重启bash
nslookup wg.wantastic.app
sudo systemctl restart wantasticd
验证: wantasticd peers 显示 (server) 有最近的握手(例如 "8s ago")。

继续阅读

仍然无法解决?

请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。

hello@wantastic.app