SetupStep 3 of 5
Install the agent
One command on a Debian-based host.
Two ways to do this. The automatic one is a single command and leaves you with a running agent; the manual one is the same steps, done by hand, if you would rather see each of them.
Requirements
- A Debian-based distribution, with systemd — Debian, Ubuntu, Linux Mint, Kali, Raspberry Pi OS (64-bit), and others like them. No other distributions are supported.
x86_64oraarch64. Rununame -mif you are not sure which you have.- Root, or a user with
sudo - Outbound access to your Monilogix server — HTTPS on a TLS deployment. No inbound ports are opened.
The agent never listens for connections — it has no inbound API surface at all. With host access turned on, it also polls the same server for read-only analysis commands. Either way, it only makes outbound requests, so it needs no firewall changes.
Automatic
Run this on the host you want to watch, with the agent key for its box. You can copy the line with the key already in it from the box's settings: open the box under Boxes and choose the gear icon.
$curl -sSf https://monilogix.jpjapos.com/<VERSION_NUMBER>/install.sh | sh -s -- --key mlx_your_agent_keyReplace <VERSION_NUMBER> with the release you want. Versions and features lists every one, what changed in it, and which is current.
Or, to take whatever the current release is and keep taking it on every fresh install, leave the version out:
$curl -sSf https://monilogix.jpjapos.com/install.sh | sh -s -- --key mlx_your_agent_keyThe two are the same script. A pinned URL installs that release for ever; the unpinned one follows this deployment's current release, which is what you want unless you have a reason to hold a version.
The script:
- picks the package for this machine's architecture and verifies it against
SHA256SUMS— it refuses to install a package it cannot check - installs
monilogix-agentwithapt, then confirms the version that actually landed is the one it asked for - writes
/etc/monilogix/config.yamlwith your key and server URL — or, on a box that already has a key, keeps the file as it is - enables and starts
monilogix-agent, then checks it is actually running
Already running the agent? The same command updates it: the package is upgraded in place, /etc/monilogix/config.yaml is kept, and nothing is asked. See Update the agent.
Run it with no options on a terminal and it asks for the key. It does not ask where to send metrics: the script is served by your Monilogix deployment, so it already points at https://monilogix.jpjapos.com — the host you fetched it from is the host this box reports to.
Leave off --key in a script, an image build or cloud-init — anywhere there is no terminal to ask — and it installs the agent, configures the server URL and stops there rather than hanging on a prompt. Add the key later and start the service.
Pointing it somewhere else
--server overrides the destination. You need it only when the script cannot infer one — a copy saved to disk, a mirror, or a deployment reached over a tunnel where the URL you fetched it from is not the URL this box should use:
$curl -sSf https://monilogix.jpjapos.com/install.sh | sh -s -- --key mlx_your_agent_key --server https://monilogix.example.comIt must be a full URL with a scheme — the agent rejects a bare hostname at startup, so the installer rejects it up front rather than leaving you with a service that will not start.
Options
The script narrates itself: it prints each command before running it and lets that command's own output through. That is deliberate. An earlier version ran apt with its output discarded, so when apt's post-install hook put up a dialog the installer waited on it for ever with nothing on screen at all.
| Flag | What it does |
|---|---|
--key <mlx_…> | The agent key for this box. Without it on a terminal you are asked; without it anywhere else the agent is installed and left stopped rather than hanging. On a box that already has a key, it replaces that one line and nothing else. Letters, digits and underscores only, and it must start with mlx_. |
--server <url> | Where to send metrics. Defaults to the host that served the script. On an update, only an explicit --server replaces the one already in the config. Needs the scheme, and may not contain whitespace — the value becomes one line in the config file. |
--version <x.y.z> | Install that release rather than the one the URL was served for. Only releases this deployment lists can be installed — a withdrawn one is refused by both the URL and the flag. |
Those are the three worth knowing on a first install. There are seven more — quieter output, checksum and downgrade behaviour, and the two that turn host access on and off — listed with every config.yaml setting in Flags and settings.
Reading it first
Piping a script to a shell is a reasonable thing to be wary of. Fetch it and read it before you run it:
$curl -sSfO https://monilogix.jpjapos.com/install.sh$less install.sh$sh install.sh --key <YOUR-KEY>Manual
Download the package, verify it, install it. Pick the one that matches your architecture — uname -m tells you which — and put the release you want where <VERSION_NUMBER> appears.
| Architecture | uname -m | Package (current release) |
|---|---|---|
| Intel / AMD 64-bit | x86_64 | monilogix-agent_0.10.0_amd64.deb |
| ARM 64-bit | aarch64 | monilogix-agent_0.10.0_arm64.deb |
On an Intel or AMD machine, that is:
$curl -sSfO https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/monilogix-agent_<VERSION_NUMBER>_amd64.deb$curl -sSf https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/SHA256SUMS | sha256sum --check --ignore-missing$sudo apt install ./monilogix-agent_<VERSION_NUMBER>_amd64.debOn ARM — a 64-bit Raspberry Pi OS, or Debian/Ubuntu on AWS Graviton or Ampere — substitute arm64:
$curl -sSfO https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/monilogix-agent_<VERSION_NUMBER>_arm64.deb$curl -sSf https://downloads.jpjapos.com/monilogix/<VERSION_NUMBER>/SHA256SUMS | sha256sum --check --ignore-missing$sudo apt install ./monilogix-agent_<VERSION_NUMBER>_arm64.debThe links in the table above are the current release, so they work as they are. Versions and features has the same links for every other release, plus its own checksums.
Every release has its own directory and its own SHA256SUMS, describing only its own packages — the current one is at https://downloads.jpjapos.com/monilogix/0.10.0/SHA256SUMS. --ignore-missing is there so sha256sum checks the one file you downloaded rather than complaining about the other architecture.
What gets installed
| Path | What it is |
|---|---|
/usr/bin/monilogix-agent | The agent itself. A single static binary, no dependencies. |
/etc/monilogix/config.yaml | Its configuration. Preserved across upgrades, removed on apt purge. |
/usr/lib/systemd/system/monilogix-agent.service | The service unit. Enabled at boot. |
Installing by hand does not start the agent. Without a key there is nothing for it to report as, so the next step is filling in the config.