Skip to main content

Configuration File

Mango's primary configuration is controlled through the mango.properties file. This file sets database connections, web server ports, SSL settings, file paths, and module-specific options.

File location​

Mango searches for its configuration file in the following order:

PriorityPathNotes
1$mango_configEnvironment variable, if set
2$MA_ENV_PROPERTIESLegacy environment variable
3$mango_paths_data/mango.propertiesData directory
4$mango_paths_data/env.propertiesLegacy filename
5~/mango.propertiesUser home directory (all platforms)
6$mango_paths_home/env.propertiesLegacy install directory
7$mango_paths_home/overrides/properties/env.propertiesLegacy overrides

If no file is found at any location, Mango creates a default file (with all settings commented out) at the first writable location.

Key environment variables​

These environment variables control where Mango looks for its files:

VariableLegacy VariableDescriptionDefault
mango_paths_homeMA_HOMEMango installation directoryAuto-detected from runtime
mango_paths_data(none)Directory for variable data (logs, filedata, database)$mango_paths_home
mango_configMA_ENV_PROPERTIESPath to mango.properties file$mango_paths_data/mango.properties
tip

Separating mango_paths_data from mango_paths_home is recommended for production. This allows you to upgrade Mango without affecting your data, logs, or configuration.

Editing the file​

Open mango.properties in any text editor. Lines beginning with # are comments and have no effect. To enable a setting, remove the leading # and set the value.

# This line is commented out — Mango uses the default value
#web.port=8080

# This line is active — Mango will use port 443
web.port=443

Mango must be restarted for changes to take effect.

Common settings​

Web server​

# HTTP port (default: 8080)
web.port=8080

# Bind address (0.0.0.0 = all interfaces)
web.host=0.0.0.0

# Enable HTTPS (requires SSL keystore configuration)
ssl.on=true
ssl.port=8443

Database​

# H2 embedded database (default — good for evaluation)
db.type=h2
db.url=jdbc:h2:databases/mah2
db.username=
db.password=

# MySQL / MariaDB (recommended for production)
#db.type=mysql
#db.url=jdbc:mysql://localhost:3306/mango
#db.username=mango
#db.password=your_password

Performance tuning​

# NoSQL point value database flush interval (ms, default: 300000 = 5 minutes)
db.nosql.flushInterval=300000

# Flush task queue on thread pool reject (default: false)
runtime.realTimeTimer.flushTaskQueueOnReject=false

File paths​

# Override default data directory
mango.paths.data=/opt/mango-data

# Module directory
mango.paths.modules=${mango.paths.home}/web/modules

# Filedata storage directory
filedata.path=${mango.paths.data}/filedata

Full properties reference​

For a complete list of all available properties with descriptions and default values, see the Mango Properties Guide.

Docker configuration​

When running Mango in Docker, you can set properties via environment variables. Replace dots with underscores and use uppercase:

# docker-compose.yml
environment:
- mango_web_port=8080
- mango_db_type=mysql
- mango_db_url=jdbc:mysql://db:3306/mango

See Docker Installation for full details.