Skip to main content
Private networks belong to your organization. A private cluster or machine on a network is reachable only through a WireGuard tunnel. Every organization has a default network; you can also create named networks with their own address range and gateway. Each WireGuard config is yours: the API key’s creator owns it, and list endpoints return only your own configs. Generate the key pair on the machine that will connect. Send Ornn the public key only. Ornn returns a config with a <your-wireguard-private-key> placeholder that you fill in locally.

Connect to the default network

The CLI derives the public key locally and writes the completed config with owner-only permissions.
Expect HTTP 201. Continue when peer.status is active. pending_gateway means the gateway has not applied the config yet; failed means it rejected or could not apply it. Repeating the request with the same public key returns the same config instead of creating another, so you can retry after a timeout. A 409 with wireguard_public_key_already_used means another user registered that key; generate a new pair. Treat the completed config as a secret. To end access, remove the config; removing it does not delete the network.

Create a dedicated network

Create a named network when you want a separate address range for a cluster. Creating a network starts its gateway in the background.
Omit cidr to let Ornn choose a free /16. A custom range must be private IPv4, from /16 to /24, and must not overlap another network. Network names are unique in your organization, ignoring case. Creation is not idempotent: after a timeout, list networks by name before retrying. Continue only when status is active. degraded means provisioning failed; the compartments array shows which step failed. Contact Ornn support with the network ID. Use the network ID as network_id with network_mode: "private" when you create a cluster. To reach it, add a WireGuard config to that network with the same request body as the default network, then fill in and activate the config the same way.

Delete a network

Delete a network only after removing its WireGuard configs and tearing down the clusters that use it. attached_reservation_count counts every connected peer, including machines; it must be 0. Otherwise deletion returns 409 with network_in_use.
A 204 starts gateway teardown; the network reports deleting until it is gone. Poll Get a private network until it returns 404. From the CLI, use ornn private-networks delete <name-or-id>.