Linux installation

How to install Mango in Linux (Mango 3.6.6)

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)


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

You will need the unzip package installed to extract the zip file. e.g. for Debian/Ubuntu

apt-get install unzip

Extract the zip file

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

cp /opt/mango/classes/ /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.