---
title: "`PUT /internal/nodes/{node_id}/network/wireguard`"
method: PUT
path: "/internal/nodes/{node_id}/network/wireguard"
tags: ["Nodes"]
---

# \`PUT /internal/nodes/{node_id}/network/wireguard\`

`PUT /internal/nodes/{node_id}/network/wireguard`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/internal/nodes/{node_id}/network/wireguard`
- Auth: none declared

Called by the node's own agent. Stores its mesh public key and endpoint,
assigns a mesh address on first call, makes that address the node's
overlay underlay, and allocates the node's compute CIDR if the join could
not (a node that registered with a public address has no private underlay
until now).

## Path parameters

- `node_id` integer, required

## Request body

- RegisterWireguardMeshRequest: Body of `PUT /internal/nodes/{node_id}/network/wireguard`.
  - `endpoint` string, nullable: `ip:port` other nodes dial to reach this node's WireGuard socket. Absent or `null` for a node nobody can dial (ADR 055): it dials the control plane, which learns its address from the handshake.
  - `public_key` string, required: Base64 WireGuard public key. The private key never leaves the node.

## Response `200`

Mesh address and port for this node

- RegisterWireguardMeshResponse: Response of `PUT /internal/nodes/{node_id}/network/wireguard`.
  - `address` string, required: Mesh address assigned to this node; also its overlay underlay.
  - `listen_port` integer, required
  - `prefix_len` integer, required

## Other responses

- `400`: Invalid public key or endpoint
- `401`: Missing or invalid bearer token
- `404`: Node not found
- `409`: Mesh disabled, key already in use, or pool exhausted
- `500`: Internal server error

## Changes

- **2026-10-23** `7d41b820a372`: 2 info
  - the request property `endpoint` became nullable
  - the request property `endpoint` became optional
- **2026-10-23** `24af93ff5379`: 2 breaking
  - the request property `endpoint` became not nullable
  - the request property `endpoint` became required
- **2026-10-22** `4c5618818e6d`: 2 info
  - the request property `endpoint` became nullable
  - the request property `endpoint` became optional
- **2026-10-22** `add7f7b41ae2`: 2 breaking
  - the request property `endpoint` became not nullable
  - the request property `endpoint` became required
- **2026-10-22** `eb81785fa098`: 2 info
  - the request property `endpoint` became nullable
  - the request property `endpoint` became optional

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/internal/nodes/:node_id/network/wireguard/put.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
