Skip to content

Deploying Onagre Agent with the Install Script

Overview

Onagre provides an interactive install script that automates the download, configuration, and service setup of a private agent on Linux. It is the fastest way to get an agent running.

The script handles architecture detection, binary download, systemd service creation, and service activation — all in a single command.


Prerequisites

  • A Linux system with systemd (Debian, Ubuntu, RHEL, etc.)
  • Root or sudo access
  • curl or wget installed
  • Your Onagre agent token (available from the Onagre UI)

Quick Install

Download and run the script in one command:

curl -fsSL https://d.onag.re/onagent.sh | sudo bash

Or with wget:

wget -qO- https://d.onag.re/onagent.sh | sudo bash

The script will interactively prompt you for:

  1. Agent name — A label for this agent instance (defaults to default). This allows running multiple agents on the same host.
  2. Token — Your Onagre agent token.

Once provided, the script automatically:

  • Detects the system architecture (x64, ARM, ARM64)
  • Downloads the correct binary to /usr/local/bin/onagent@<name>
  • Creates a systemd service at /etc/systemd/system/onagent@<name>.service
  • Enables and starts the service
  • Displays the service logs for confirmation

Supported Architectures

Architecture Detected values
x86_64 x86_64, amd64
ARM 64-bit aarch64, arm64
ARM 32-bit armv7l, armhf

The script auto-detects your architecture — no manual selection required.


Managing Agents

The install script also provides commands for managing deployed agents.

List installed agents

sudo bash onagent.sh list

Displays all installed Onagre Agent services with their status (UP / DOWN).

Restart an agent

sudo bash onagent.sh restart <agent_name>

Update all agents

sudo bash onagent.sh update

Stops all running agents, downloads the latest binaries, and restarts the services.

Uninstall an agent

sudo bash onagent.sh uninstall <agent_name>

Stops and disables the service, removes the binary and service file, and reloads systemd.


Multiple Agents on the Same Host

The script supports deploying multiple agent instances on a single host. Each agent gets its own service name (onagent@<name>), binary, and token.

Simply run the install script again and provide a different agent name:

curl -fsSL https://d.onag.re/onagent.sh | sudo bash

Each instance operates independently and appears as a separate agent in the Onagre UI.


What the Script Creates

Item Path
Agent binary /usr/local/bin/onagent@<name>
Systemd service /etc/systemd/system/onagent@<name>.service

The systemd service is configured with:

  • Automatic restart on failure (5-second delay)
  • File descriptor limit of 65,535
  • Runs as root
  • Starts after network.target

Summary

The install script is the recommended way to deploy Onagre agents on Linux. It automates the entire setup process and provides built-in commands for listing, updating, restarting, and uninstalling agents.

For a step-by-step manual installation, see Manual deployment.