Skip to main content
Documentation

Connection to Nexigon Hub

Nexigon Agent keeps one connection to Nexigon Hub, over which it carries all of its features.

Reconnection

The agent connects when it starts. When it cannot connect or loses the connection, for example because the network or Nexigon Hub is unavailable, it keeps trying. Before each attempt after the first, it waits for a random delay between zero and an upper bound. The bound starts at 30 seconds and doubles after each failed attempt, up to 10 minutes. A connection that stays up for 60 seconds resets the bound. When Nexigon Hub asks the agent to retry later, the agent waits at least that long, up to 10 minutes, plus the random delay.

The random delays protect Nexigon Hub. When it restarts, all devices lose their connections at the same moment; the delays spread their reconnection attempts, so that Nexigon Hub is not flooded with connections while it starts. Keep the defaults for large fleets. Shorter delays let a device recover faster from a short outage but increase the load on Nexigon Hub when many devices reconnect at once. [connection] lists the settings.

The delays also apply while Nexigon Hub rejects the device, for example while its certificate awaits approval. After the approval, the device can take up to the current bound to connect.

The agent stops trying only if its configuration rules out a connection, for example a plaintext Nexigon Hub URL without dangerous-allow-plaintext, or if Nexigon Hub reports a different device ID than before. It then exits, and its service manager restarts it.

Features without a Connection

Terminal sessions, TCP forwarding, and device commands started from Nexigon Hub end with the connection. An installation or a command step of an operation that is in progress runs to completion.

System updates, app management, operation polling, and the local API keep running and use the connection again once it is back. The local API is a Unix socket through which commands such as nexigon-agent events emit and applications on the device reach Nexigon Hub over the running agent’s connection. While the agent is disconnected, these requests fail instead of connecting on their own. The agent does not buffer events, so an event emitted without a connection is lost unless the application retries.

Connection Status

nexigon-agent status prints the state of the running agent’s connection and the device ID as JSON:

{
  "deviceId": "d_...",
  "connection": { "state": "Connected", "since": "2026-10-26T09:12:44Z" }
}

While the agent is disconnected, state is Disconnected, and the status includes the number of failed attempts, the time of the next attempt, and the last error. The command uses the local API, so it requires a running agent.