Configuration
Last updated
Last updated
Irrespective of the Tower version you employ, configuration provision occurs through two primary avenues: configuration files or environment variables. Remarkably, both methods can be concurrently utilized.
However, a crucial point to bear in mind is that environment variables take precedence over configuration files. They effectively overwrite any settings specified in the file.
Below, you'll discover a comprehensive table detailing all configuration variables employed by Tower. Should the need arise to revert your configuration to its default state, utilize the configuration template file provided as an exemplar.
Environment Variable | Default value | Required |
---|---|---|
Host on which you Tower instance will be exposed
TCP port on which you Tower instance will be exposed
The "Log_Level" variable constitutes an array of strings dictating the log levels displayed during Tower's operation. Available options include "log," "error," "warn," "debug," and "verbose." For comprehensive insights into log levels within Tower, refer to the Nest.js documentation.
Database used by your Tower instance. This variable uses standard mongodb connection string format, e.g. mongodb://127.0.0.1:27017/Tower. You can find more details about this format in mongodb documentation.
The "Secret" variable is essential for encrypting configurations stored within Tower. It must precisely consist of 32 characters. Should you opt to provide it, ensure utmost security by incorporating a mix of uppercase and lowercase letters, numbers, and special characters.
"TTL" is a variable specifying the duration (in seconds) for which access tokens generated within Tower remain valid.
This variable indicates how many days the audit logs will be stored
A list of header names that Tower scans for authentication headers during API calls.
Path to your SSL key
Path to your SSL certificate
Enables or disables Cross-origin resource sharing (CORS)
HOST
0.0.0.0
no
PORT
3000
no
LOG_LEVEL
["log","error"]
no
DATABASE_URL
""
yes
SECRET
""
no
TTL
86400
no
AUDIT_TTL
1
no
TOKEN_HEADERS
["Authorization"]
no
SSL_KEY_PATH
""
no
SSL_CERT_PATH
""
no
CORS
false
no