Linux installation

How to install Mango in Linux

May 27th, 2020

Linux is the preferred operating system for running Mango in production environments. Mango works on a wide variety of Linux distributions and architectures.

Please note that we also provide an installation script which will download and configure Mango for you, these instructions are manual instructions for users who are familiar with Linux.


  • Java JDK is installed and either
    • JAVA_HOME environment variable points to the JDK installation directory
    • The JDK bin directory is available on your path (specifically the java command is available)

You can run the next commands on Ubuntu:

wget -qO - | sudo apt-key add -
sudo add-apt-repository --yes
sudo apt-get install adoptopenjdk-11-hotspot
cd /usr/lib/jvm
export PATH=$PWD/adoptopenjdk-11-hotspot-amd64/bin:$PATH


These instructions assume that you will install Mango as root, you should switch to the root user or prefix the commands with sudo. If you do not have root access you can still install Mango under your home directory and run it as yourself.

Create an installation directory

mkdir /opt/mango

Set a system wide MA_HOME environment variable (recommended but not required)

echo 'MA_HOME=/opt/mango' >> /etc/environment

Create a user for Mango

You should create a user for Mango to run under. Never run Mango as root.

useradd --system --home-dir /opt/mango --shell /bin/false mango

Download Mango

Download a full core zip file from the Infinite Automation store. Copy the zip file to your home directory.

Extract the zip file to the installation directory

If you do not already have it installed, install the unzip package for Debian/Ubuntu:

apt-get install unzip

Extract the zip file

  • Enterprise Version
unzip -d /opt/mango
  • Free Version
unzip -d /opt/mango

Set the correct owner on the installation directory

chown -R mango:mango /opt/mango

Configure Mango

Copy the file into overrides. You have to run mango for the first time to see the file. Then, you have to create the override/properties directory.

cp /opt/mango/ /opt/mango/overrides/properties/

Edit and configure Mango, see the installation configuration page for more details.

nano /opt/mango/overrides/properties/

Configure Java options for starting Mango

You can set Java command line options such as memory limits, debug options, garbage collection settings etc by copying the script into the /overrides/ directory.

cp /opt/mango/scripts/ /opt/mango/overrides/

You can then edit the /opt/mango/overrides/ file and un-comment lines to configure various Java command line options.

Note: Configuring these settings was previously accomplished via the start extensions (ext-enabled directory), as of Mango 3.6.6 and when using the script these extensions are no longer used.

Manually starting and stopping Mango

At this point you can manually start Mango, however we recommend you install a service instead (see below). To manually start Mango:

sudo -u mango /opt/mango/bin/ > /dev/null &

To manually stop Mango:

kill $(cat /opt/mango/bin/

Note: Never run Mango as root, this is a security risk and will also result in files in /opt/mango having the incorrect owner. If you do accidentally run Mango as root, stop Mango and run:

chown -R mango:mango /opt/mango

Installing Mango as a service

We recommend installing Mango as a systemd service so that it starts at system startup. Most modern Linux distributions use systemd.

cp /opt/mango/bin/mango.service /etc/systemd/system/

You may wish to edit the service file if you have used a different installation directory or user than the instructions above. Default mango.service file contents:

Description=Mango Automation

SuccessExitStatus=0 SIGINT SIGTERM 130 143


Now enable the service:

systemctl enable mango

To stop/start/restart the Mango service

systemctl stop mango
systemctl start mango
systemctl restart mango

To get the Mango service status

systemctl status mango

Copyright © 2020 Radix IoT, LLC.