Skip to content

How the edge talks to the server

A managed host reaches LinkMesh over at most two channels: OpAMP for the collector, and a WebSocket for the optional agent. They differ in what they carry, but they share the same shape: the host dials outbound to the server, authenticates with a Bearer token over TLS, and exposes no inbound port and no client certificate.

Channel Runtime Direction Protocol / endpoint Config delivery Auth
OpAMP otelcol-contrib + opampsupervisor Outbound → server WebSocket over TLS, /v1/opamp Server pushes RemoteConfig down the live connection Bearer enrollment token in supervisor.yaml
agent linkmesh-agent (optional) Outbound → server WebSocket over TLS, /v1/agent None — carries discovery + host context, not collector config Bearer LINKMESH_SERVER_TOKEN

The server never dials the edge. On either channel, the connection is initiated from the host, so no managed host needs an inbound firewall rule for LinkMesh.

The supervisor opens a persistent WebSocket outbound to /v1/opamp and holds it open. The server pushes RemoteConfig and own-metrics settings down that live connection; the supervisor applies the config to the collector it manages and reports health and effective-config back up the same socket. A heartbeat keeps the session alive so the server knows the collector is still there.

Authentication is a Bearer enrollment token in supervisor.yaml (Authorization: Bearer …). Server-to-collector certificate offers are not used on this channel — the supervisor works from the Bearer token alone.

See Onboard otelcol-contrib via OpAMP.

The agent is an optional edge connector. It opens a WebSocket outbound to /v1/agent, authenticated with the Bearer LINKMESH_SERVER_TOKEN, and its identity is bound server-side on first connect. It carries discovery and host context only — it does not deliver collector configuration. A collector always self-fetches its own config over OpAMP, whether or not the agent is present.

See Install the agent and The agent.