Link Search Menu Expand Document

Configuration

Tramola offers various configuration options for administrators. This chapter contains general information about configuring Tramola. Actual configuration parameters available are mentioned in the chapters respective to their features.

The configuration file

The configuration file is conf/tramola.conf by default. Upon the first start, this file is created by copying the included file conf/tramola.conf.original.

If you prefer to keep your configuration file in a different location than conf/tramola.conf, you can do so and start Tramola with the additional argument -Dconfig.file=/path/to/tramola.conf.

Essential configuration

The following configuration settings are the most important ones, and are included in the configuration file by default.

Key Default Description
tramola.port 3471 The port tramola uses.
tramola.datadir ./data Specifies where all data should be stored.
The value should either be an absolute path, or a relative path starting with ./. Relative paths without ./ at the beginning are not supported and might lead to problems.
tramola.publicUrl http://localhost:3471 If you host Tramola as a public instance, provide the public URL of your installation, e.g. https://tramola.example.com

Additional configuration

Additional configuration parameters can be added simply by editing the configuration file in a text editor. Throughout this manual, the additionally available configuration keys are mentioned where appropriate.

During installation, Tramola sets two additional configuration parameters (tramola.db.password, tramola.db.secret). Both parameters are used to protect your data stored internally by Tramola in database files from being accessed from outside Tramola. As both values are randomly generated values, it is important to back up the configuration file after the installation, as without these values part of the data stored in Tramola cannot be accessed anymore.

Make sure to back up the conf directory.
Otherwise your data might become unreadable if you need to restore your setup.

Config file format

The config file uses the HOCON format, the Human-Optimized Config Object Notation, to store the configuration settings. It is a superset of JSON and designed to be easily human-readable.

A very short summary of the format, relevant to Tramola, is presented here:

  • Configuration parameters are stored as key-value pairs.
  • Keys and values are separated by either the = or : character.
  • String-values should be enclosed in " to prevent parsing errors.
  • Keys (and their values) are organized in hierarchical groups (akin to an object graph).
  • The configuration can be expressed either in object notation, or in a path notation (see examples below).

Example of a configuration in object notation:

tramola {
    port = 3471
    datadir = "./data"
}

Example of a configuration in path notation:

tramola.port = 3471
tramola.datadir = "./data"

Examples of configuration settings in this manual are typically represented in path notation, but they can be added to the configuration file in any of the two notations.