This guide walks you through installing the MW Agent on a Linux machine. These instructions can also be found on the Installation page in the Middleware application.

We offer two install scripts based on your operating system. Please note that not all Linux machines are supported. A list of supported machines can be found under Prerequisites.



  • Ubuntu 18.04 or above

  • For AWS EC2 instances Amazon Linux, Ubuntu, or Debian is required. For AWS instances using Red Hat, please install the Docker MW Agent 

  • MacOS Linux is not supported


Follow the steps below to install the MW Agent on your Linux machine.

  1. Log in to Middleware

  2. Navigate to the Installation page, in the bottom left corner.

"Install Button Highlight"

  1. Copy the appropriate installation command based on your machine’s operating system. An example of each command is shown below. Copying the command directly from the Installation page ensures your API key and UID are inserted accurately.

DEB - compatible with Debian or Debian-based operating systems. For AWS instances this includes Ubuntu and Debian.

MW_API_KEY=<xxxxxxxxxx> MW_TARGET=https://<uid> bash -c "$(curl -L"

DEB Linux install

RPM - compatible with Red Hat Package Manager and operating systems like Red Hat or CentOS. Use this for AWS instances using Amazon Linux.

MW_API_KEY=xxxxxxxxxx MW_TARGET=https://<uid> bash -c "$(curl"

RPM Linux install

  1. [optional] Add tags by adding the MW_HOST_TAGS environment variable to the installation command. Include any desired tags as comma-separated key-value pairs, as shown below. Use the tag “name” to create an alias for the host (e.g. production).
MW_HOST_TAGS=<key1>:<value1>,<key2>:<value2>,… MW_API_KEY=
  1. Run the installation command and verify the MW agent’s status with the following.
sudo systemctl status mwservice

A successful installation will return an Agent Status report like the following. Linux Agent Status

Run only one MW Agent per node. Multiple agents will cause unexpected behavior.


Once the MW Agent is installed metrics should begin appearing in the Middleware application within a few minutes. If metrics do not appear, confirm that the machine has access to the internet, either directly or through a proxy, and that only one MW Agent is running per node.

For any issues please reach out to our team in your Slack channel or through the help menu in the Middleware Application.


To uninstall the Middleware agent use the appropriate command from the following.


bash -c "$(curl -L"


bash -c "$(curl -L"
Need assistance or want to learn more about Middleware? Contact us at support[at]