Windows Installation

June 16th, 2023


Installing Mango Automation on a Windows computer is very easy. Follow these steps.

  1. Download and install Java JDK 17

  2. Run the commands from the code block below in your terminal (Command Prompt or PowerShell) to install mango.

NOTE: You may choose to use any directory, however you need to modify the relevant paths in the mango XML file.




NOTE: You can modify the URL in the code below to download and install any version of mango in regards to the
free and enterprise versions.

cd C:\
mkdir mango
mkdir mango_data
cd mango
curl https://store.mango-os.com/downloads/fullCores/enterprise-m2m2-core-5.0.2.zip -o mango.zip
tar -xvf mango.zip
del mango.zip
cd ..\mango_data
curl https://docs-v5.radixiot.com/assets/files/5.0.x/mango.xml -o mango.xml
curl https://github.com/winsw/winsw/releases/download/v2.11.0/WinSW-x64.exe -o mango.exe -L
mango install
mango start

Running Mango

  • Once mango has started, you can log into the dashboard by opening your browser and going to localhost:8080.
  • The default username and password are both admin.
  • Mango can be stopped and started using the mango start and mango stop commands in the command line.

NOTE: Previously Mango used to restart itself via a script. Mango no longer does this, if you want Mango to restart
automatically you should start it as a Windows service.

Running Mango as a service

  • Open cmd.exe and navigate to your %mango_paths_data% location.

    • Run the following command to download the mango.xml file into your data directory.
      curl https://docs-v5.radixiot.com/assets/files/5.0.x/mango.xml
      
    • Download the latest WinSW v2.x.x release (the provided configuration file will not work for version 3)
      from Github (.NET Core packaging recommended, e.g. WinSW-x64.exe)
    • Place WinSW-x64.exe in the %mango_paths_data% directory.
    • Rename WinSW-x64.exe to mango.exe.
    • Modify the file to point the variables at the correct directories.
    <service>
      <id>mango</id>
      <name>Mango Automation</name>
      <description>Mango Automation by Radix IoT LLC.</description>
    

    <env name="mango_paths_home" value="C:&lt;Your Mango Root Dir>"/> <env name="mango_paths_data" value="C:&lt;Your mango data Dir>"/> <env name="mango_config" value="C:&lt;Path to your mango.properties file>"/>

    <workingdirectory>%mango_paths_home%</workingdirectory> <executable>java</executable> <arguments>-jar %mango_paths_home%\boot\ma-bootstrap.jar</arguments> <!-- Mango does its own logging --> <log mode="none"/> <onfailure action="restart" delay="10 sec"/> <stoptimeout>300sec</stoptimeout> </service>

  • Using cmd.exe, ensure you are in the %mango_paths_data% directory and run the following commnads:

    .\mango install
    .\mango start
    
  • Once installed you can start and stop via services.msc.
    Windows service

Troubleshooting

After clicking on the /bin/mango.cmd file if you see anything or something popped up and closed quickly then there was
an error.

To see the error, first open the Command Prompt by typing “cmd” into your start menu. Right click on it and select “Run
as Administrator”.

Change directories to your Mango\bin folder. Now you can type mango.cmd and watch the start up procedure. If there is a
conflict with your system, you will see the error in the terminal.

Common Startup issues:

  1. JDK not installed
  2. JAVA_HOME Not Set correctly
  3. Something else occupying the port Mango is starting on. By default, Mango uses port 8080. You can modify this editing the mango.properties file.

Copyright © 2024 Radix IoT, LLC.