MeshanicsDocs
Device agent

Configuration

The agent is configured with command-line flags, each of which has a matching environment variable so the same settings can live in the service unit's environment file. The installer fills in sensible values; this page documents what they mean so you can tune a fleet to its environment.

Connection and identity

These four settings are required for the agent to run at all. They give it its address to call home and its mutual-TLS identity.

FlagEnvironmentPurpose
-serverMESHANICS_SERVERfleet device API address (host:port)
-certMESHANICS_CERTdevice certificate (PEM)
-keyMESHANICS_KEYdevice private key (PEM)
-caMESHANICS_CACA bundle used to verify the server (PEM)

Enabling over-the-air updates

Updates are opt-in and verification-first. The agent enables OTA only when both of the following are provisioned; supplying one without the other is a configuration error and the agent refuses to start.

FlagEnvironmentPurpose
-artifact-serverMESHANICS_ARTIFACT_SERVERartifact server URL (https://host:port)
-tuf-rootMESHANICS_TUF_ROOTthe provisioned trust anchor for update metadata

There is no over-the-air update without that trust anchor. With it, every payload is verified against signed metadata before the agent touches it.

Enabling customer-authorized releases

Signed releases add a customer-controlled authorization layer above TUF. All four settings are required together. A device that receives a signed-release pointer without this local trust binding fails the assignment instead of falling back to the advisory fields.

FlagEnvironmentPurpose
-release-tenantMESHANICS_RELEASE_TENANTaccepted tenant UUID
-release-productMESHANICS_RELEASE_PRODUCTproduct ID assigned to this device
-release-profileMESHANICS_RELEASE_PROFILEexact signed compatibility profile
-release-trust-dirMESHANICS_RELEASE_TRUST_DIRdirectory of pinned Ed25519 authorizer public key PEM files

Keep this directory root-owned and distribute it through the enrollment or another controlled provisioning process. Only regular .pem files are loaded; directories and symbolic links are ignored. Key changes after enrollment are a device provisioning action, not an instruction from the control plane.

State and runtime

FlagEnvironmentDefaultPurpose
-data-dirMESHANICS_DATA_DIR/var/lib/meshanicswhere downloaded artifacts and the metadata cache live
-container-runtimeMESHANICS_CONTAINER_RUNTIMEautoruntime for container payloads: auto, podman, docker, none, or a path
-operational-snapshot-intervalMESHANICS_OPERATIONAL_SNAPSHOT_INTERVAL30scadence for the cached bounded CPU, memory, data-filesystem and local-address snapshot
-operational-addressesMESHANICS_OPERATIONAL_ADDRESSEStrueset to false to exclude assigned local addresses while retaining resource context
-integrity-scan-intervalMESHANICS_INTEGRITY_SCAN_INTERVAL15mbackground cadence for re-measuring supported active artifacts; use a longer interval where reading large models creates unacceptable I/O
-raucMESHANICS_RAUCfalseenable the RAUC system D-Bus adapter on a device image with an existing A/B layout, keyring and bootloader policy
-tag--a device tag as key=value, repeatable, for fleet selectors

Model quality telemetry

The current installer provisions the model-quality receiver automatically for OTA-capable Linux devices. The application integration remains optional: the receiver is idle until a local serving process calls the fail-open SDK.

FlagEnvironmentDefaultPurpose
-ml-metrics-serverMESHANICS_ML_METRICS_SERVERunsetdevice REST base used to forward aggregate windows; setting it enables the local receiver
-ml-socketMESHANICS_ML_SOCKET/run/meshanics/ml.sockUnix datagram socket used by local telemetry clients

For direct and gateway onboarding, do not set the metrics server by hand. The installer derives port 9445 from the enrolled device or gateway host and keeps the existing certificate and TLS server-name verification. See Model quality telemetry for the SDK contract and diagnostics.

Allowlists: locked down by default

A few capabilities - exec health probes, configuration-file placement, and reload actions - are dangerous to grant blindly, so the agent ships them disabled and refuses them until an operator names exactly what is permitted. A signed payload may only choose from within an allowlist; it can never widen one, and allowlisted commands are always executed directly with a fixed argument list, never through a shell - so a tampered payload cannot smuggle in arbitrary commands.

The specific allowlist flags for each capability are listed in the install reference. Leave them unset and the corresponding capability stays off.

Inspection flags

Two flags exit immediately and are useful for diagnostics:

  • -print-hw-profile prints the detected hardware profile as JSON and exits.
  • -version prints the agent version and exits.