- API Reference
- Box API
- VPS forwarding
Apply one repair suggested by the VPS forwarding doctor
Runs one fix action from a doctor item: repair_relay (re-push every relay entry), fix_sshd, cleanup_legacy (remove the old agent from the VPS), open_firewall (open the forwarding ports in ufw/firewalld), restart_failed (restart services not running), repush_frontends (needs a prior doctor run), repair_wireguard, trust_host_key (accept the VPS's new SSH identity). The answer status is the fix result.
/v2/forwarding/doctor_fixRequest body application/json · required
repair_relay, fix_sshd, cleanup_legacy, open_firewall, restart_failed, repush_frontends, repair_wireguard, trust_host_keyAuthentication
Needs a trusted caller (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) or valid dashboard Basic credentials, which are checked only when dashboard authentication is enabled.
Responses
Fix result.
True when the box accepted the request.
Outcome code or message (see the operation's error table).
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
Unknown fix ACTION | action is not one of the listed fixes. | Use an action from a doctor item. |
No ufw/firewalld on the VPS; open the ports in the provider firewall. | open_firewall found no host firewall. | Open the ports in the VPS provider's firewall. |
Run the doctor first: no failing port is recorded. | repush_frontends needs a doctor run that found failing ports. | Run /v2/forwarding/doctor first. |
Fix failed: ... | Unexpected error. | Check the controller log. |