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
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
| Field | Type | Required | Description |
|---|---|---|---|
awg_devices | integer | yes |
{
"awg_devices": 0
}Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
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
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Request body application/json · ServerIn
| Field | Type | Required | Description |
|---|---|---|---|
agent_port | integer | no | Default: 62060. |
agent_address | string | no | |
public_address | string | no | |
awg | AWGIn | no | Default: {"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 | OVPNIn | no | Default: {"enabled": false, "address": "", "port": 1194, "proto": "udp", "subnet": "10.67.0.0/16", "dns": ["1.1.1.1", "8.8.8.8"]}. |
{
"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
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Response 200 Successful Response
Errors: 401 Unauthorized, 403 Forbidden
curl -X POST 'https://YOUR-PANEL/api/vpn/servers/<key>/reset-pin' \
-H 'Authorization: Bearer $TOKEN'