Skip to main content
Documentation

Installation

Install Nexigon Agent with the installation script, as a manual systemd service, or with NixOS. To build it into a device image, use the Rugix Bakery or Yocto integration instead.

Installation Script

The installation script installs Nexigon Agent on a Linux device with systemd, configures it with a deployment token, and starts it. Run it as root:

curl -sfSL https://install.nexigon.dev/install-agent.sh | VERSION="v0.7.0" TOKEN="..." sh
VariablePurpose
VERSIONBuild to install, such as v0.7.0. Defaults to latest.
TOKENDeployment token of the project that the device joins.
HUB_URLNexigon Hub URL. Defaults to https://eu.nexigon.cloud.

The script installs the binary at /usr/bin/nexigon-agent, a fingerprint script that reads /etc/machine-id, the configuration at /etc/nexigon/agent.toml, and the nexigon-agent service, which it enables and starts. Pin an exact release in VERSION, so that every device runs the version you tested. Getting Started walks through the complete setup.

Manual Installation

Download the binary for the device’s architecture from the Nexigon Agent releases, which also list checksums, and make it executable on Linux or macOS. Then write a configuration with credentials and a fingerprint script.

To run Nexigon Agent as a systemd service, place it at /usr/bin/nexigon-agent and save this unit as /etc/systemd/system/nexigon-agent.service:

/etc/systemd/system/nexigon-agent.service
[Unit]
Description=Nexigon Agent
After=network.target

[Service]
Type=exec
ExecStart=/usr/bin/nexigon-agent run
TimeoutStopSec=30
KillMode=mixed
Restart=always
RestartSec=60s
LimitNOFILE=8192

[Install]
WantedBy=multi-user.target

The unit runs the agent as root, which system updates and apps require. The agent stops on SIGTERM, and TimeoutStopSec gives it the time to interrupt an installation in progress and close its connection. LimitNOFILE provides the file descriptors for the default forwarding capacity. Load and start the service, then check its log:

systemctl daemon-reload
systemctl enable --now nexigon-agent
journalctl -u nexigon-agent

Development Builds

Every commit on the main branch of nexigon/nexigon that passes CI has a development build. Its tag is git- followed by the commit’s abbreviated hash, for example git-da8d256. To get the tag of the latest commit, run:

echo "git-$(git ls-remote https://github.com/nexigon/nexigon refs/heads/main | cut -c1-7)"

Use the tag wherever these docs use a release tag: as VERSION of the installation script, as the version parameter of the nexigon/nexigon-agent recipe for Rugix Bakery, or in a download URL:

https://downloads.nexigon.dev/nexigon-agent/<tag>/assets/<target>/nexigon-agent

<target> is a Rust target, such as x86_64-unknown-linux-gnu or aarch64-unknown-linux-gnu. If the download fails, CI has not finished or not passed for that commit; use the tag of an earlier commit. Development builds are not meant for production devices.

NixOS

The Nexigon flake provides the nexigon-agent package and the nixosModules.nexigon-agent module. The module configures the service, keeps credentials in a private persistent directory, and enables provisioning only when requested. See NixOS Nexigon Agent Integration for its options. Pin a Nexigon revision that includes the module.