Skip to content

System configuration

The system configuration is available for all tasks and is used to store all .env (environment) variables on the initial backend run. on later runs the configuration is always synced between the environment variables and the database without overriding any existing DB values, so any subsequent changes to the configuration is done ONLY via the API or the UI.

The following table details all available configuration attributes, their descriptions, default values, and whether they are encrypted when stored in the database.

Attribute PathDescriptionDefault ValueEnvironment VariableSensitive (encrypted at rest)
envThe application environment.developmentNODE_ENVNo
appNameThe application name.scheduler_backendAPP_NAMENo
swaggerServerWhether to enable swagger server or not.trueENABLE_SWAGGER_SERVERNo
server.ipThe server ip.0.0.0.0IPNo
server.portThe server port.8080PORTNo
server.logToConsoleWhether to log to console.trueLOG_TO_CONSOLENo
jobs.targetFolderForJobsThe target directory for jobs inside the jobs/ folder""JOBS_SUB_DIRECTORYNo
jobs.jobsFileExtensionsThe extension of files to be considered as jobs: only accepts .ts and .js filests,jsJOBS_FILES_EXTENSIONSNo
exportOutputFilesWhether to export output files.falseEXPORT_OUTPUT_FILENo
files.exportOutputFilesWhether to export output files.falseEXPORT_OUTPUT_FILENo
files.exportCacheFilesWhether to export cache files.falseEXPORT_CACHE_FILENo
files.exportJobLogsToFilesWhether to export job logs to files.falseEXPORT_JOB_LOGS_TO_FILESNo
files.cacheFilesRootPathThe root path for cache files.cachesCACHE_FILES_ROOT_PATHNo
files.outputFilesRootPathThe root path for output files.exportedOUTPUT_FILES_ROOT_PATHNo
files.databaseBackupRootPathThe root path for database backup files.dbDB_BACKUP_FILES_ROOT_PATHNo
DB.hostThe database host.127.0.0.1DB_HOSTNo
DB.portThe database port.3306DB_PORTNo
DB.usernameThe database username.rootDB_USERNAMENo
DB.passwordThe database password.rootDB_PASSWORDYes
DB.schedulerDatabaseNameThe database name for the scheduler.schedulerSCHEDULER_DB_NAMENo
baseDB.hostThe base database host.127.0.0.1BASE_DB_HOSTNo
baseDB.portThe base database port.3306BASE_DB_PORTNo
baseDB.usernameThe base database username.rootBASE_DB_USERNAMENo
baseDB.passwordThe base database password.rootBASE_DB_PASSWORDYes
baseDB.databaseNameThe base database name.schedulerBASE_DB_NAMENo
baseDB.passwordSaltRoundsThe salt rounds used to hash passwords12BASE_DB_PASSWORD_SALT_ROUNDSNo
gotify.urlThe gotify url.nullGOTIFY_URLNo
gotify.tokenThe gotify token.tokenGOTIFY_TOKENYes
gotify.appTokenThe gotify app token.nullGOTIFY_APP_TOKENYes
gotify.appErrorChannelTokenThe gotify app error channel token.nullGOTIFY_ERROR_APP_TOKENYes
grafana.lokiUrlThe grafana loki url.nullGRAFANA_LOKI_URLNo
grafana.usernameThe grafana loki username.nullGRAFANA_LOKI_USERNAMEYes
grafana.passwordThe grafana loki password.nullGRAFANA_LOKI_PASSWORDYes
browserless.urlThe browserless url.nullBROWSERLESS_URLNo
browserless.tokenThe browserless token.tokenBROWSERLESS_TOKENYes
browserless.timeoutThe browserless Timeout360000BROWSERLESS_TIMEOUTNo
encryption.masterKeyThe master key used to encrypt and decrypt config values, it’s expected to be in base64""MASTER_ENCRYPTION_KEYYes

System configuration can be managed through two primary interfaces:

You can programmatically update system configuration using the API. For detailed information on the available endpoints and request formats, please refer to the API Reference.

We provides a user-friendly interface for managing configuration settings. You can create 2 types of configurations :

  • Single item configuration: a key value pair (ala .env file)
  • An object like configuration: a more general key name and a value that is an object of key-value pairs, a JSON like structure

The UI will let you choose between the two types of configuration clearly :

Create configuration types

Once the configuration is updated, any new task executed afterward will see the updated values. any already running tasks will not. To use the config values in your task you can find all the UNENCRYPTED values from the options object

(...)
const run(.....){
this.options?.config?.["appEnv"] // will return the current environment : development or production
}