Prerequisites
- A host with WireGuard installed: Linux, macOS, or Windows.
- A region that offers WireGuard Interfaces.
GET /v2/network_coverage?filter[available_services][contains]=cloud_vpnlists them. A location’slocation.code, such asashburn-va, is theregion_codeto use. - A Network.
POST /v2/networkswith{"name": "acme-prod"}returns itsid.
Create the interface
SendPOST /v2/wireguard_interfaces:
status: provisioning and the values that peers need: endpoint, public_key, and server_ip_address.
Wait for provisioning
PollGET /v2/wireguard_interfaces/{id} until status is provisioned. This takes a few minutes. Peers can be added once it is provisioned.
Create a peer
Register the host as a peer of the WireGuard Interface withPOST /v2/wireguard_peers:
private_key once, in this response. Store it.
public_key. The response then has no private_key.
Configure the host
GET /v2/wireguard_peers/{id}/config returns a configuration template as plain text:
[Interface] is the local host itself, and [Peer] is the WireGuard Interface in Telnyx.
Replace the placeholder with the host’s private key and save the file as
/etc/wireguard/wg0.conf. On Linux, bring the tunnel up:
Verify
sudo wg show lists the local host as interface and the WireGuard Interface in Telnyx as peer, with a recent handshake:
GET /v2/wireguard_peers/{id} reports the peer’s last_seen time.