Endpoint discovery
For clients to establish WireGuard connections, they need to know your server’s public IP address and port. atreoLINK derives the public address from the agent’s authenticated connection and keeps the DDNS records current.
Discovery flow
Section titled “Discovery flow”The agent talks to atreoLINK over Ed25519-authenticated connections. atreoLINK terminates each connection directly, so it can see the agent’s public source address — both IPv4 and IPv6 are reported, each from a connection of the matching family.
On startup, and on every maintenance tick, the agent:
- Sends a
device:endpointreport to atreoLINK. The IP field is omitted in the normal case. - atreoLINK derives the public address from the observed source of each authenticated connection — an IPv4 source updates the
Arecord, an IPv6 source updates theAAAArecord. - atreoLINK writes the matching DDNS record for your per-device hostname. Each family is independent: if only one is reachable, only that record is updated — the other is left untouched.
DDNS updates
Section titled “DDNS updates”atreoLINK acts as a dynamic DNS service for your per-device hostname. When a mobile client wants to connect, atreoLINK resolves the current endpoint address.
This means:
- Your public IPv4 and IPv6 addresses can change (common with residential ISPs) and clients will still connect. Every periodic report re-derives the addresses from the live connections, with no STUN or third-party IP-echo dependency.
- The endpoint is refreshed on every startup and on every maintenance tick.
- No manual DNS configuration is needed.
When the IP is overridden
Section titled “When the IP is overridden”Normally you leave endpoint_ip / ENDPOINT_IP unset and atreoLINK uses the address it observes on the agent’s authenticated connection. You only set it if that auto-detected address is wrong (for example a CGNAT or proxied control path), in which case it takes precedence.
| Configuration | Behaviour |
|---|---|
endpoint_ip / endpoint_port unset (normal) | atreoLINK uses the observed source address of the authenticated connection. |
endpoint_ip set | The report carries that IP and it wins over the observed address. For CGNAT / proxied control paths where the connection’s source IP isn’t the WireGuard-reachable one. |
atreoLINK rejects a private, loopback, link-local, or RFC-6598 (CGNAT) address with a 422; the agent logs that response so a misconfigured override is visible.
Maintenance loop
Section titled “Maintenance loop”After initial setup, the agent runs a maintenance loop every 5 minutes:
- Re-sends the
device:endpointreport so atreoLINK re-derives the address from the live connection. - If UPnP/NAT-PMP is enabled, renews the port mapping and verifies the external port hasn’t changed.
- When port mapping is unavailable, logs an actionable “forward UDP <port>” message every cycle.
- Sends push notifications if a previously working port mapping is lost (after the 35-minute threshold).
© 2026 atreoLABS. All rights reserved.
WireGuard is a registered trademark of Jason A. Donenfeld.

