Skip to content

VPN ​

Built-in VPN (WireGuard/AmneziaWG) management.

6 endpoints

GET /api/vpn ​

Get Vpn

List the built-in VPN servers and their state.

Sudo admin only

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X GET 'https://YOUR-PANEL/api/vpn' \
  -H 'Authorization: Bearer $TOKEN'

PUT /api/vpn/devices ​

Put Devices

AmneziaWG files per user (one per device)

Sudo admin only

Request body application/json · DevicesIn

FieldTypeRequiredDescription
awg_devicesintegeryes
json
{
  "awg_devices": 0
}

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X PUT 'https://YOUR-PANEL/api/vpn/devices' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"awg_devices": 0}'

GET /api/vpn/install ​

Install Command

the command that installs the agent on a server

Sudo admin only

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X GET 'https://YOUR-PANEL/api/vpn/install' \
  -H 'Authorization: Bearer $TOKEN'

PUT /api/vpn/servers/{key} ​

Put Server

Change one built-in VPN server's settings.

Sudo admin only

Parameters

NameInTypeRequiredDescription
keypathstringyes

Request body application/json · ServerIn

FieldTypeRequiredDescription
agent_portintegernoDefault: 62060.
agent_addressstringno
public_addressstringno
awgAWGInnoDefault: {"enabled": false, "address": "", "port": 51820, "subnet": "10.66.0.0/16", "mtu": 1420, "dns": ["1.1.1.1", "8.8.8.8"], "keepalive": 25, "params": {}}.
ovpnOVPNInnoDefault: {"enabled": false, "address": "", "port": 1194, "proto": "udp", "subnet": "10.67.0.0/16", "dns": ["1.1.1.1", "8.8.8.8"]}.
json
{
  "agent_port": 62060,
  "agent_address": "",
  "public_address": "",
  "awg": {
    "enabled": false,
    "address": "",
    "port": 51820,
    "subnet": "10.66.0.0/16",
    "mtu": 1420,
    "dns": [
      "1.1.1.1",
      "8.8.8.8"
    ],
    "keepalive": 25,
    "params": {}
  },
  "ovpn": {
    "enabled": false,
    "address": "",
    "port": 1194,
    "proto": "udp",
    "subnet": "10.67.0.0/16",
    "dns": [
      "1.1.1.1",
      "8.8.8.8"
    ]
  }
}

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X PUT 'https://YOUR-PANEL/api/vpn/servers/<key>' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"agent_port": 62060, "agent_address": "", "public_address": "", "awg": {"enabled": false, "address": "", "port": 51820, "subnet": "10.66.0.0/16", "mtu": 1420, "dns": ["1.1.1.1", "8.8.8.8"], "keepalive": 25, "params": {}}, "ovpn": {"enabled": false, "address": "", "port": 1194, "proto": "udp", "subnet": "10.67.0.0/16", "dns": ["1.1.1.1", "8.8.8.8"]}}'

POST /api/vpn/servers/{key}/new-awg-params ​

New Awg Params

fresh random obfuscation values (users then need the new config)

Sudo admin only

Parameters

NameInTypeRequiredDescription
keypathstringyes

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X POST 'https://YOUR-PANEL/api/vpn/servers/<key>/new-awg-params' \
  -H 'Authorization: Bearer $TOKEN'

POST /api/vpn/servers/{key}/reset-pin ​

Reset Pin

trust the agent's certificate again (after reinstalling the agent)

Sudo admin only

Parameters

NameInTypeRequiredDescription
keypathstringyes

Response 200 Successful Response

Errors: 401 Unauthorized, 403 Forbidden

bash
curl -X POST 'https://YOUR-PANEL/api/vpn/servers/<key>/reset-pin' \
  -H 'Authorization: Bearer $TOKEN'

Alexen v2.3.14 · 204 API endpoints