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 Link to this section
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 Link to this section
These few settings are in the configuration file from the start, and are the ones most installations need to touch.
| Key | Default | Description |
|---|---|---|
tramola.port |
3471 |
The port Tramola listens on. |
tramola.datadir |
./data |
Where all data is stored. Either an absolute path, or a relative one starting with ./. A relative path without ./ is not supported and may cause problems. |
tramola.publicUrl |
http://localhost:3471 |
The address by which this installation is reached from a browser. Set it if Tramola is reached under anything other than the default, e.g. https://tramola.example.com. |
tramola.publicUrl is worth getting right early: it is what Tramola puts into the links it
mails out, so a wrong value produces password-reset links nobody can follow.
The rest of the configuration Link to this section
Additional settings are added by editing the configuration file in a text editor. Everything Tramola understands is listed in the Configuration Reference; the settings that need explaining rather than listing have a page each:
- Security and TLS — HSTS, the content security policy, and
publicUrlagainstexternalUrl - Login and Sessions — how sign-in attempts are limited and how long a session lasts
- Database and Backup — where the data lives and how it is backed up
- File Server — the SFTP service and its port
During installation Tramola sets two further parameters, tramola.db.password and
tramola.db.secret. Both protect data Tramola stores in its own database files. They are
randomly generated, so backing up the configuration file after installation is essential —
without these values part of your data cannot be read again.
Make sure to back up the conf directory.
Otherwise your data might become unreadable if you need to restore your setup.
Config file format Link to this section
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.