Skip to main content

Create a device profile

PUT 

/api/key/:name

Creates a device owned by the signed-in user and returns its name. One device works with both protocols: the call issues an OpenVPN client certificate, generates a WireGuard key pair and preshared key, and assigns the next free WireGuard address. The WireGuard interface and OpenVPN routes are then regenerated, which briefly restarts WireGuard. Optional routedNetworks are IPv4 subnets behind the device that other VPN clients can reach through it. Any signed-in user may call it.

New certificates use the Cloudron user id in the common name. The id and the device name together must fit in 64 characters. Certificates that already exist keep the username common name.

Returns 409 if the user already has a device with that name, and 422 when all WireGuard addresses (253 per network) are in use.

Request​

Responses​

Device created.