API Reference
Dashboard
  1. API Reference
  2. Box API
  3. VPN

Change the base ports of the WireGuard and OpenVPN servers

Saves both base ports, kills every OpenVPN process and restarts the controller. Both fields are required and are not range-checked by the box.

  • Destructive · confirm first
  • Basic auth
  • Panel API · since v20.8.0
  • Hub: needs owner approval
  • setVpnPort
POST/v2/set_vpn_port

Request body application/json · required

wg_portintegerrequired
opvn_portintegerrequired

Authentication

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

Saved; the controller restarts.

statusbooleanrequired

True when the box accepted the request.

msgstringrequired

Outcome code or message (see the operation's error table).

Verified against XProxy v21.3.2 on Nov 17, 2026