MantisOps · Installation Guide

Installing the MantisOps Agent

Last updated October 2026 · Applies to MantisRMM, Mantis360 and MantisNMS

How to install, deploy, update and remove the MantisOps agent on Windows, macOS and Linux, and what to do when an install doesn't go as planned. If you just want the one-line command, see Windows, macOS or Linux.

Overview

The MantisOps agent is one agent for all three products. A single background service runs a module for each product your account is licensed for: MantisRMM management, Mantis360 security posture, and MantisNMS host metrics. The agent checks your licenses itself and starts or stops modules to match, so adding a product to your subscription later needs no reinstall. With more than one product, see MantisOps Complete for how they work together (the Portal Alerts inbox and Devices page, and the cards each product shows for the other).

Every install command contains an enrollment code. The code tells the agent which account (and, optionally, which company) it belongs to. One code enrolls the endpoint into every product your account is licensed for.

PlatformInstalled asLocation
WindowsService MantisAgent ("MantisOps Unified Agent"), automatic startC:\Program Files\MantisOps\mantis-agent.exe
macOSLaunch daemon net.mantisops.agent, starts at boot/Applications/MantisAgent.app
Linuxsystemd service mantis-agent, enabled at boot/usr/local/bin/mantis-agent

Configuration and the device's own secret key are kept in C:\ProgramData\MantisOps (Windows) or /etc/mantisops (macOS and Linux). Both are locked down to administrators/root.

ℹ️To scan or monitor a network without installing an agent on every device, use a network probe instead. See the probe install guide.

Before You Start

Supported systems

PlatformSupported
Windows64-bit (x64) Windows 10, Windows 11, and Windows Server 2016 or later
macOSmacOS 14 Sonoma or later, Apple silicon and Intel (one universal package)
Linuxx86-64 (amd64) or ARM64 (aarch64) distributions that use systemd. 32-bit ARM isn't supported.

Permissions

Network access

The agent only makes outbound connections. No inbound firewall rules or port forwarding are needed. Allow outbound HTTPS (TCP 443) to:

HostUsed for
api.rmm.mantisops.netRequired. Install script and agent download, enrollment, license checks, updates, and the MantisRMM connection (a long-lived WebSocket over 443).
api.360.mantisops.netThe Mantis360 module, when your account is licensed for Mantis360.

If outbound traffic passes through a proxy or a firewall that inspects TLS, exempt these hosts from inspection and allow WebSocket upgrades. A broken WebSocket shows up as an agent that enrolls but stays offline.

Enrollment Codes

Enrollment codes start with mek_. Find yours in the Customer Portal (portal.mantisops.net) → Agents & Probes → Enrollment codes. The install commands on that page already contain the right code: the code is masked until you click Reveal, and Copy always copies the complete command. The same commands are in MantisRMM under Devices → + Add device.

⚠️Treat an enrollment code like a password. Anyone who has it can add devices to your account. In the commands on this page, replace <YOUR-ENROLLMENT-CODE> with your code, or copy the ready-made command from the Portal.

Which code does what

CodeEnrollsWhere it's used
DefaultThe agent, for every product you're licensed forThe agent install commands
Probe installsNetwork probes only, never agentsThe probe install commands. A probe keeps its code in its config.json, so it gets a code that can't enroll agents.
GPO deploymentThe agent (every product except the network probe)The Group Policy startup script. Any domain user can read GPO scripts, so this code is separate and can be rotated on its own.
Company codesThe same three kinds, scoped to one company: new devices are placed in that companyPortal → Companies → Install, or choosing a company when you copy a command. See Companies & Sites.
Your own codesWhatever you choose: a name, a company, the products, a maximum number of devices, an expiry, and reusable or one device onlyFor example, one code per rollout project, or a one-device code for a single install
Installer setup codesOne device, valid for one hourCreated automatically when someone redeems a setup code in the MantisOps Setup installer. Hidden from the list unless you tick Show installer setup codes.

Who can see and manage codes

Rotate or revoke a code

Windows

Windows

Open PowerShell as Administrator (Start → type "PowerShell" → Run as administrator) and run:

$env:TENANT='<YOUR-ENROLLMENT-CODE>'; [Net.ServicePointManager]::SecurityProtocol=3072; iwr -UseBasicParsing 'https://api.rmm.mantisops.net/agent/unified/install/windows' | iex

The Portal's Agents & Probes page shows the same install split over two lines ($env:TENANT='…', then irm … | iex). Both do the same thing.

The script:

  1. downloads the latest signed agent to C:\Program Files\MantisOps\mantis-agent.exe;
  2. enrolls the computer with your code;
  3. registers and starts the MantisAgent service, and waits up to about 20 seconds to confirm it's running.

Success looks like:

Done! Unified agent enrolled and running as a service.

If anything fails, the script stops with an error that says what went wrong and where the log is, and returns a non-zero exit code to deployment tools. A failed enrollment never leaves an idle service behind. Because nothing is downloaded through a browser, Windows SmartScreen doesn't prompt.

The computer appears in MantisRMM under Devices, and in the Portal under Agents & Probes → Deployed devices, usually within a minute.

Install with a setup code (MantisOps Setup)

For a user who shouldn't have to paste a PowerShell command, send them the MantisOps Setup installer and a short setup code instead:

  1. In MantisRMM, go to Devices → + Add device → Windows → Other options: send an install link or download the .exe.
  2. Click Generate install link. By default the code works for one computer and expires after 7 days. Tick Reusable for several computers (30 days) for a code several people can use.
  3. Click Copy message and send it. It contains the download link and the setup code.

The recipient downloads MantisOps-Setup.exe (signed by MantisOps, LLC) from https://api.rmm.mantisops.net/agent/unified/setup-installer/windows, approves the Windows administrator prompt, types the setup code and clicks Install. When it finishes it shows All set - MantisOps is installed and running. Behind the scenes, the installer swaps the setup code for a one-time enrollment code that's valid for one hour and one computer.

On a computer that already has the agent, the button reads Reinstall. Computers installed this way aren't assigned to a company; assign them in MantisRMM afterwards.

macOS

macOS

Open Terminal as an admin user and run:

curl -fsSL https://api.rmm.mantisops.net/agent/unified/install/unix | sudo TENANT=<YOUR-ENROLLMENT-CODE> bash

The same command works on Linux; the script detects the operating system. On a Mac it:

  1. saves your code to /etc/mantisops/enroll.token (the file is deleted once the Mac is enrolled);
  2. downloads the signed, Apple-notarized MantisAgent.pkg (universal: Apple silicon and Intel) and installs it with the macOS installer, so Gatekeeper doesn't warn;
  3. the package installs /Applications/MantisAgent.app, enrolls the Mac and starts the launch daemon net.mantisops.agent.

Success looks like:

Done! Signed macOS agent installed, enrolled, and running.

If the enrollment is refused, the script stops the daemon and says so, with the log location (see Troubleshooting).

ℹ️The package is also available on its own at https://api.rmm.mantisops.net/agent/unified/pkg/darwin. Opening it by hand installs the agent, but it only enrolls if a code was saved to /etc/mantisops/enroll.token first. Use the command above, or the MDM method.

macOS privacy permissions

Apple doesn't let an app grant itself access to the screen, input or protected files. Remote desktop and some features need these permissions for MantisAgent:

PermissionNeeded for
Screen RecordingSeeing the screen in remote desktop
AccessibilityKeyboard and mouse control in remote desktop
Full Disk AccessThe file browser and patching

Managed Macs (MDM): deploy the MantisOps PPPC configuration profile through your MDM (Jamf, Kandji, Mosyle, Intune and others). It pre-approves Accessibility and Full Disk Access for bundle ID net.mantisops.agent, Team ID 7G5UR2WS94. The profile includes Screen Recording, but Apple doesn't let most MDMs grant it silently, so expect the user to approve Screen Recording once. Double-clicking the profile doesn't grant anything; it has to come from an MDM.

Without MDM: on the Mac, open System Settings → Privacy & Security, enable MantisAgent under Screen Recording and Accessibility, then restart the agent so the change takes effect:

sudo launchctl kickstart -k system/net.mantisops.agent

In MantisRMM, a Mac's overview shows whether Screen Recording and Accessibility are granted.

Linux

Linux

Run as root, or with sudo:

curl -fsSL https://api.rmm.mantisops.net/agent/unified/install/unix | sudo TENANT=<YOUR-ENROLLMENT-CODE> bash

Keep TENANT=… after sudo exactly as shown, so the code reaches the script. The script downloads the agent for your architecture (amd64 or arm64) to /usr/local/bin/mantis-agent, enrolls it, writes the systemd unit /etc/systemd/system/mantis-agent.service (restarts automatically, starts at boot) and waits up to about 20 seconds to confirm the service is active.

Success looks like:

Done! Unified agent enrolled and running.

Check on it at any time with:

sudo systemctl status mantis-agent sudo journalctl -u mantis-agent -n 50

Companies & Sites

An enrollment code can carry a company. A device installed with a company's code is placed in that company automatically; there's nothing to add to the command. Ways to get a company's command:

Devices installed with a code that has no company can be assigned later in MantisRMM. A company can't be added to an enrollment code inside the command: the code itself carries the company.

Mantis360 sites: in Mantis360, Enroll a new endpoint agent lets you pick a site. That command adds the site's Mantis360 install token as ENROLL_360, which puts the host in that site.

Mass Deployment

The install commands are non-interactive and safe to run repeatedly, so any tool that can run a script as SYSTEM or root can deploy the agent.

Group Policy (domain-joined Windows)

The Portal has a ready-made computer startup script: Agents & Probes → Mass deployment with Group Policy (GPO). It installs the agent at first boot and skips any machine that already has the MantisAgent service. It looks like this (copy it from the Portal to get your GPO code filled in):

# MantisOps unified agent — deploy to all domain PCs via Group Policy (computer startup). # Idempotent: installs on first boot, skips machines that already have the agent. $ErrorActionPreference = 'SilentlyContinue' if (Get-Service 'MantisAgent' -ErrorAction SilentlyContinue) { return } $Server = 'https://api.rmm.mantisops.net' $Tenant = '<YOUR-GPO-ENROLLMENT-CODE>' # enrollment code (GPO, agent only) - rotate it in the Customer Portal if this script leaks $Dir = "$env:ProgramFiles\MantisOps"; New-Item -ItemType Directory -Force -Path $Dir | Out-Null $Bin = "$Dir\mantis-agent.exe" [Net.ServicePointManager]::SecurityProtocol = 3072 Invoke-WebRequest -Uri "$Server/agent/unified/download/windows-amd64.exe" -OutFile $Bin -UseBasicParsing & $Bin --server $Server --enroll $Tenant if ($LASTEXITCODE -ne 0) { return } & $Bin --install-service
  1. Save the script as Install-MantisAgent.ps1 on a share every domain computer can read (for example \\<dc>\NETLOGON).
  2. Open Group Policy Management, create a GPO linked to the OU (or domain) that holds the target computers, and click Edit.
  3. Go to Computer Configuration ▸ Policies ▸ Windows Settings ▸ Scripts (Startup/Shutdown) ▸ Startup ▸ PowerShell Scripts and add Install-MantisAgent.ps1.
  4. Startup scripts run as SYSTEM and bypass the PowerShell execution policy, so nothing else needs configuring.
  5. Run gpupdate /force and reboot a test machine (or wait for the next reboot). It then appears under Deployed devices.
⚠️GPO scripts are readable by every domain user (they live in SYSVOL/NETLOGON). That's why the script uses its own GPO deployment code instead of your default code. If the script leaks, rotate the GPO code in the Portal and replace the script; your other install commands keep working. To put every machine in one company, pick it under Enroll into company above the script.

If enrollment fails (for example, the code was rotated), the script stops quietly and tries again at the next boot. Because it skips machines that already have the service, it doesn't upgrade or repair existing installs; use the one-line command for that.

Intune, another RMM, or your own scripts

Deploy the same one-line command you'd run by hand. The installer reads the code from the TENANT environment variable, never prompts when one is set, and exits non-zero on failure so your tool can report it.

ℹ️Enrollment is rate-limited per public IP address. If many machines behind one internet connection enroll at the same moment, some may get Too many enrollment attempts. Try again in a minute. Stagger large rollouts, or simply re-run the failed machines.

macOS with an MDM

  1. Run a script as root before the package installs, to stage your enrollment code:
    mkdir -p /etc/mantisops printf '%s' '<YOUR-ENROLLMENT-CODE>' > /etc/mantisops/enroll.token
  2. Deploy the signed package from https://api.rmm.mantisops.net/agent/unified/pkg/darwin. Its post-install step finds the staged code, enrolls the Mac, deletes the code file and starts the daemon.
  3. Deploy the PPPC configuration profile so remote desktop works without clicking through System Settings.

If the enrollment fails, the code file is kept so that installing the package again retries it.

Updates

The agent keeps itself up to date. A couple of minutes after it starts, and then every hour, it checks which version MantisOps has published for your account and installs it if it's newer. Nothing needs to be scheduled on your side. Admins can also push an update to a single device from the Portal: Agents & Probes → Deployed devices → Update.

Every release is signed. Before installing, the agent checks the release's manifest against MantisOps signing keys built into the agent, and checks the downloaded file against that manifest. Anything unsigned, or that doesn't match, is refused. On macOS the update installs the new signed package, which keeps the macOS privacy permissions in place.

Reinstalling & Upgrading in Place

Re-running the install command on a machine that already has the agent is safe. It's an in-place upgrade: the running agent is stopped, the newest version is put in place, the device is enrolled again and the service is started.

Reinstalling with a legacy tenant-ID command onto a device that already holds a key doesn't work the same way. See Device Security.

Uninstalling

From the console (recommended)

Uninstalling from the console removes the software from the machine, removes the device from your device list, and clears the device's key, so a later reinstall starts fresh. Delete / Delete Record only removes the device from the list; it doesn't remove the software from the machine.

On the machine

Windows

Use Settings → Apps → Installed apps (or Programs and Features), find MantisOps Unified Agent and choose Uninstall. Or, from an elevated PowerShell:

& "C:\Program Files\MantisOps\mantis-agent.exe" --uninstall
macOS
sudo /Applications/MantisAgent.app/Contents/MacOS/mantis-agent --uninstall
Linux
sudo /usr/local/bin/mantis-agent --uninstall

What's removed: the service or launch daemon, every configuration file and secret (including the device key) in C:\ProgramData\MantisOps or /etc/mantisops, the installed program and its logs (on macOS, the whole MantisAgent.app), files left by the older standalone MantisRMM agent, and on Windows the Apps entry and the scheduled tasks the agent created. On Windows, files that are still in use are removed at the next restart, and the ProgramData folders are left empty and locked to administrators. A network probe installed on the same machine is not touched.

An uninstall on the machine doesn't notify the console, so the device stays in your list as offline. Delete it there, or reinstall with an enrollment code, which reuses the record.

Device Security

Every device gets its own secret key automatically: a new device receives it when it enrolls, and an existing device after it has been connected steadily for about 10 minutes. The key is stored in identity.json in the agent's configuration folder, readable only by SYSTEM/administrators (Windows) or root. From then on, every connection for that device must present the key, so your tenant ID or an enrollment code alone can't be used to pose as the device.

You can see each device's state in MantisRMM (open the device → the Settings tab → Device Identity) and in the Portal (Agents & Probes → Deployed devices, Identity column):

StatusMeaning
SecuredThe device holds its own key. Anything connecting as it without the key is refused.
Key pendingA key was sent and the device hasn't confirmed saving it yet. This clears by itself within minutes while the device is online.
Not yet securedThe device has no key yet (for example, it hasn't received the update that adds one). It keeps working as before.
Key mismatchA connection for this device was refused because it didn't present the device's key.

Fixing "Key mismatch"

A mismatch happens when an install no longer has the device's key: the machine was reinstalled or restored from a backup or image, or the agent was reinstalled with a legacy tenant-ID command. It can also mean something else is trying to connect as this device.

Cloned and imaged machines

Don't build a golden image with the agent already installed: every copy would carry the same device identity. Install the agent after each machine is deployed (Group Policy, Intune or your RMM make this easy). If copies already exist, uninstall the agent on each copy (--uninstall) and install it again with an enrollment code while the original machine is online. A machine that enrolls under the name of a device that's connected right now gets its own new device record and key instead of taking over the original's.

Legacy Tenant-ID Installs

Before enrollment codes, install commands and scripts used your account's tenant ID (sometimes with a ~company suffix, and an --enroll-360 / ENROLL_360 token for Mantis360). Since October 1, 2026, those commands can no longer install new devices: the install stops with New installs need an enrollment code. The Portal and MantisRMM still list them under Legacy (tenant ID) for reference.

Tenant-ID installs were retired because a tenant ID isn't a secret. Only installs that would create a new device are refused; devices that are already installed are not affected and keep working. A network probe that registered with the tenant ID before the change and hasn't been approved still waits for approval (see the probe guide).

To switch:

One difference to know about now: if a device already holds its own key and is reinstalled from scratch with a tenant-ID command, the install completes but the agent can't connect, and the device shows Key mismatch. Reinstall it with an enrollment code, or use Reset key.

Troubleshooting

The installer prints a clear error and the log path when something fails. The messages below are the ones you'll see.

Symptom or messageCauseFix
TENANT required: …, or a prompt for Enrollment code (or tenant ID)The command ran without a code. On Linux/macOS, a TENANT= placed before sudo is dropped.Run the full command with your code, keeping TENANT=… after sudo.
New installs need an enrollment code. Copy the install command from the console (it includes your enrollment code) and run it again.The command or script used your tenant ID instead of an enrollment code (an older script, or a Legacy (tenant ID) command). New devices can't be installed that way since October 1, 2026.Copy the current command from Portal → Agents & Probes, or replace the tenant ID in your script with an enrollment code. See Legacy Tenant-ID Installs.
Run with sudo/rootThe bash installer wasn't run as root.Run it with sudo as shown.
Enrollment failed (exit 1) / ERROR: enrollment failed, after a line such as enroll failed: enrollment key mek_… was not accepted: HTTP 401: That enrollment key has been revoked. (or has expired / isn't valid / is malformed)The code in the command was revoked, rotated past its grace period, expired or mistyped.Copy the current command from the Portal (Agents & Probes) and run it again.
That enrollment key has already been used by its maximum number of devices.The code has a device limit and it's used up.Use the default code, or create a code with a higher limit.
That enrollment code is for network probes only. Use the agent install command (its code enrolls agents).A probe code was used to install an agent.Use the agent install command.
entitlement fetch: HTTP 426, or HTTP 426: This agent version can't enroll with an enrollment key. Install the latest MantisOps agent (2.0.194 or newer) and run the install command again.An old copy of the agent (before 2.0.194) was run directly with an enrollment code.Use the install command, which always downloads the current agent.
tenant … has no licensed productsNo product subscription or trial is active, or the code only allows products you aren't licensed for.Check your subscription in the Customer Portal, or use the default code.
Too many enrollment attempts. Try again in a minute.Many machines enrolled from one public IP at once.Wait a minute and re-run; stagger large rollouts.
Agent network not permitted (in the log)Your account only allows agents from listed networks.Add the site's public IP in Portal → Security → Allowed Networks, or install from an allowed network.
Failed to download the agent after retries. Check network/proxy and retry. Nothing was changed. / ERROR: download failed - nothing was changed.The machine can't reach api.rmm.mantisops.net.Allow outbound HTTPS to the hosts listed above, then re-run.
The agent was enrolled but the MantisAgent service is NOT running (state: …), or the Linux/macOS equivalentThe service was installed but didn't start or stay running.Check the logs below (on Windows also Event Viewer → Windows Logs → System, source Service Control Manager), then start it: Start-Service MantisAgent, sudo systemctl restart mantis-agent or sudo launchctl kickstart -k system/net.mantisops.agent.
Could not stop the existing MantisAgent service (state: …). Nothing was changed.The running agent didn't stop for the upgrade.Stop the service (or restart the machine), then run the command again.
The installer says Done, but the device doesn't appear in MantisRMMMantisRMM isn't on your plan, the device is in a company you've filtered out, or its MantisRMM enrollment failed (RMM module enroll failed in mantis-agent.log).Look in Portal → Deployed devices, clear the company filter, and check the log. Re-run the install command once the cause is fixed.
The device appears but stays offlineA proxy or firewall is blocking the WebSocket connection, or the device shows Key mismatch.See Network access, or Fixing "Key mismatch".
Mac: remote desktop is black, or keyboard and mouse don't workScreen Recording or Accessibility isn't granted.See macOS privacy permissions.

Logs and service checks

The agent writes mantis-agent.log (startup, enrollment, updates) plus one log per product module (mantis-rmm.log, mantis-360.log) in the folder the agent runs from. Logs rotate at 10 MB.

PlatformLog folderService check
WindowsC:\Program Files\MantisOps\Get-Service MantisAgent
macOS/Applications/MantisAgent.app/Contents/MacOS/sudo launchctl print system/net.mantisops.agent
Linux/usr/local/bin/systemctl status mantis-agent, journalctl -u mantis-agent -n 50

For an online device you can also fetch the log from MantisRMM: open the device → the Settings tab → Download Agent Log. Enable Debug Log there adds more detail.

Command-Line Reference

The install scripts use these options for you; you only need them for custom deployments. Run them elevated (Windows) or as root.

OptionWhat it does
--enroll <code>Enrolls the device with an enrollment code, then exits. (A tenant ID is no longer accepted for a new device.)
--server <url>The API to enroll against. Defaults to https://api.rmm.mantisops.net; only change it if MantisOps asks you to.
--enroll-360 <token>Optional. A Mantis360 site install token. Not needed with an enrollment code, which enrolls Mantis360 too.
--install-serviceWindows only. Registers and starts the MantisAgent service for this executable, then exits. Run it as a separate command after --enroll. On macOS and Linux the install script creates the launch daemon or systemd unit.
--uninstall-serviceWindows only. Stops and removes the service but leaves the files and configuration in place.
--uninstallFull uninstall: service, configuration, secrets and installed files (see Uninstalling).
--versionPrints the agent version.
noticePrints the third-party software notices. The same text is saved as NOTICE.txt next to the agent.
Need help?

Submit a support ticket via our support page or email support@mantisops.net. Include the error message and the last lines of mantis-agent.log. We respond within one business day.