Gateway Environment
This section lists and describes all environment variables used by the Gateway application.
| Environment Variable | Required | Description |
|---|---|---|
| LICENSE_KEY | yes | Specifies 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_URL | yes | Specifies 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_USERNAME | yes | Defines the username used to authenticate with the database. |
| DATABASE_PASSWORD | yes | Defines the password used to authenticate with the database. |
| DATABASE_POOL_MAX_SIZE | yes | Defines 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_SIZE | yes | Defines 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_KEY | yes | Defines 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_KEY | no | This 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_SIZEshould typically be configured as a multiple ofDATABASE_POOL_MIN_SIZEto allow the connection pool to handle temporary increases in traffic. A common starting point is to setDATABASE_POOL_MAX_SIZEto approximately 2–3 times the value ofDATABASE_POOL_MIN_SIZE, then adjust the values based on the observed workload and database capacity.
For example, ifDATABASE_POOL_MIN_SIZEis set to5, a possible initial configuration isDATABASE_POOL_MAX_SIZEset to10or15.
Updated about 1 month ago
Did this page help you?