Gateway Environment

This section lists and describes all environment variables used by the Gateway application.

Environment VariableRequiredDescription
LICENSE_KEYyesSpecifies the license key required for the Gateway to start and operate. The license key must be generated through the Admin Console after you log in.
During Gateway startup, this value is validated; if the key is invalid or not provided, the Gateway will fail to start.
This environment variable must be configured only for the Gateway application and must not be provided to the Configuration Dashboard or other components.
DATABASE_URLyesSpecifies the connection URL of the MySQL database used by the system.
The URL must have the MySQL JDBC format, for example
jdbc:mysql://<host>:<port>/<database>?<optional-params>
DATABASE_USERNAMEyesDefines the username used to authenticate with the database.
DATABASE_PASSWORDyesDefines the password used to authenticate with the database.
DATABASE_POOL_MAX_SIZEyesDefines the maximum number of database connections that can be maintained in the connection pool (for example, 20). The value must be greater than or equal to 1 and must be greater than or equal to DATABASE_POOL_MIN_SIZE.
DATABASE_POOL_MIN_SIZEyesDefines the minimum number of database connections that should be maintained in the connection pool (for example, 5). The value must be greater than or equal to 0 and must not exceed DATABASE_POOL_MAX_SIZE.
ENCRYPTION_KEYyesDefines the master encryption key used to encrypt the key stored in the secret_key database table.
This environment variable is the only encryption key that must be manually configured by you.
The key must be generated from the Admin Console after you log in.
The same generated key must be configured as the ENCRYPTION_KEY environment variable for both the Gateway and the Configuration Dashboard API.
Complete details about encryption can be found at this link.
OLD_ENCRYPTION_KEYnoThis value must be set only when rotating the ENCRYPTION_KEY environment variable through the Gateway.
To rotate the encryption key, first assign the current ENCRYPTION_KEY value to the OLD_ENCRYPTION_KEY environment variable. Then, generate a new encryption key value using the Admin Console, assign the new value to the ENCRYPTION_KEY environment variable, and restart the Gateway using the updated environment configuration. Every time the ENCRYPTION_KEY value is changed, the key version stored in the secret_key database table is automatically incremented by 1.
After the rotation is completed, the new ENCRYPTION_KEY value must also be set for the Configuration Dashboard.
Complete details about encryption can be found at this link.
📘

DATABASE_POOL_MAX_SIZE should typically be configured as a multiple of DATABASE_POOL_MIN_SIZE to allow the connection pool to handle temporary increases in traffic. A common starting point is to set DATABASE_POOL_MAX_SIZE to approximately 2–3 times the value of DATABASE_POOL_MIN_SIZE, then adjust the values based on the observed workload and database capacity.
For example, if DATABASE_POOL_MIN_SIZE is set to 5, a possible initial configuration is DATABASE_POOL_MAX_SIZE set to 10 or 15.


Did this page help you?