Skip to content

Install the LinkMesh agent (optional)

linkmesh-agent is the optional edge connector. You run it beside a collector to let LinkMesh discover what’s worth collecting on a host or in a cluster and feed it into the onboarding wizard. Where you don’t already have a collector, it can also install the upstream collector binary for you, and it offers on-host diagnostics to inspect and validate what’s running. It is not a collector and not required — a collector enrols, runs, and fetches its own config from the server without it. See The agent for what it does and when it earns its place, and Enrol a collector for the agentless path.

Before you start

  • A running LinkMesh server reachable from the host over HTTPS — have its base URL handy, e.g. https://linkmesh.example.com. That same address should be set on the server as externalUrl (Quickstart step 2) — it is what the server hands collectors for self-telemetry, so leaving it unset makes the dashboard read zero for the whole fleet.
  • An enrollment token (single-use for one host, or reusable for a fleet). In the LinkMesh UI open Collectors → + Add Collector and copy the token (see Enrollment tokens). The server derives the host’s identity from the token on first connect; the token then persists in the agent config as the host’s durable reconnect credential.

Install

Download the package for your architecture from your LinkMesh distribution channel, then install it:

Terminal window
# Debian / Ubuntu
sudo dpkg -i linkmesh-agent_<version>_amd64.deb
# RHEL / Fedora / Amazon Linux
sudo rpm -i linkmesh-agent_<version>_amd64.rpm

The package installs:

PathWhat
/usr/local/bin/linkmesh-agentthe agent binary
/etc/linkmesh/config.yamlthe config file
/etc/systemd/system/linkmesh-agent.servicethe systemd unit (Restart=always)

The post-install step enables the service but does not start it — you configure the token first (next section), then start it.

Configure and enrol

The agent connects to the server over WebSocket at wss://<your-server>/v1/agent using the enrollment token as a Bearer credential. A minimal /etc/linkmesh/config.yaml:

server:
url: https://linkmesh.example.com # your LinkMesh server base URL
token: <enrollment-token> # from Collectors → + Add Collector

You can override either value from the environment — handy for containers:

Terminal window
export LINKMESH_SERVER_URL=https://linkmesh.example.com
export LINKMESH_SERVER_TOKEN=<enrollment-token>

Start and verify

  1. Start the agent (Linux):

    Terminal window
    sudo systemctl enable --now linkmesh-agent
  2. Check it connected:

    Terminal window
    linkmesh-agent status
  3. If it can’t reach the server, probe connectivity:

    Terminal window
    linkmesh-agent preflight

    See Firewall & connectivity for the ports and hosts the agent and collector need.

Once connected, the host appears in the LinkMesh UI and the onboarding wizard can use the agent’s discovery results.

Optional: install a collector with the agent

If you don’t already have a collector on the host, the agent can install the upstream Grafana Alloy collector binary for you via the system package manager (apt/yum) or MSI on Windows:

Terminal window
linkmesh-agent install alloy # latest pinned version
linkmesh-agent install alloy --version=<x.y.z>
linkmesh-agent install alloy --mirror=https://your-mirror.example.com/grafana # air-gapped

This installs the upstream Alloy package — the agent does not bundle a collector. Remove it again with linkmesh-agent uninstall alloy.

Command reference

CommandPurpose
linkmesh-agent statusshow agent status, connection state, and collector health (queries the running agent)
linkmesh-agent preflightcheck that the agent can reach the LinkMesh server (and optional endpoints)
linkmesh-agent discoverscan the host for log sources and print suggested receiver configs
linkmesh-agent detectdetect running services and print recommended pipeline templates
linkmesh-agent containersdiscover running containers and print recommended log receivers
linkmesh-agent config showdisplay the collector’s on-host config (read-only diagnostic)
linkmesh-agent validate-configvalidate the collector’s on-host config with the detected collector’s own validator (read-only diagnostic)
linkmesh-agent install alloy / uninstall alloyinstall/remove Grafana Alloy via the host’s native package manager
linkmesh-agent service install / uninstallregister/remove the Windows service (Windows only)
linkmesh-agent versionprint the agent version

See also