Environment Variables

Environment variables are used to store the values of the frequently used parameters that are provided to a software program at runtime. The utilization of such placeholders makes your application more portable and flexible.

The most common use of variables is to make quick adjustments to specific values that are utilized multiple times in your application code. Follow the linked guide if you need to create such custom environment variables for your project.

Another use case for variables is to configure the application through the set of predefined values (enable/disable features, change behavior, etc). CirrusGrid PaaS supplements most of the certified software stacks with a number of default variables, which can be used by developers to help with application hosting.

Default Environment Variables #

Variable NameEditable*StacksDescription
{SOFTWARE}_VERSIONAllA version of the specified software (stack, engine, template, module, etc).
ADMIN_USERGlassFish (Payara), WildFly, Couchbase, LiteSpeed Web Server, LiteSpeed ADC, LLSMPA login of the admin user for the administration console.
ADMINPANEL_ENABLED (PHPMYADMIN_ENABLED)+Databases, LLSMP, LEMPThe “true” and “1” values allow usage of the admin panel, while any other disables it. Restart is required to apply changes. The value in brackets is deprecated but can still be used on the MySQL and MariaDB databases.
APP_FILE+Node.jsThe main Node.js application file to be launched.
AUTO_OLD_HEAP+Node.jsTurns on/off (true/false) Jelastic memory autoconfiguration – sets the maximum size of an old heap based on the amount of memory on the container.
CACHE_MEM_LIMIT+PHPDefines the portion of RAM, which should be reserved for the built-in Redis cache server, 10% of container total RAM by default.
CLONE_ON_SCALE+AllDefines if new nodes upon horizontal scaling should be clones of a layer’s master (true) or created from scratch (false).
CP_MEM_LIMIT+LLSMP, LEMPDefines the portion of RAM, which should be reserved for the application server, 50% of container total RAM by default.
DASGlassFish (Payara)Shows if there is a DAS node (required to configure cluster) for the current layer.
DB_MEM_LIMIT+LLSMP, LEMPDefines the portion of RAM, which should be reserved for the built-in MariaDB database server, 40% of container total RAM by default.
DEFAULT_CLUSTER+LiteSpeed ADCSelects the load balancing type for requests’ proxying (HTTPAJPFCGILSAPI). This logic can be disabled (0disabledfalse).
DOCKER_EXPOSED_PORTAllLists ports from the EXPOSE directive of the image’s dockerfile, which were opened via container firewall during the environment creation.
FULL_GC_AGENT_DEBUG+JavaEnables (true) or disables (false) the debug mode to track the Java GC processes in the logs.
FULL_GC_PERIOD+JavaSets the interval (in seconds) between the full GC calls; 900 by default, i.e. 15 minutes.
G1PERIODIC_GC_INTERVAL+ (for openJDK 12/13 only)JavaA frequency of the G1 Periodic Collection in milliseconds (G1PeriodicGCInterval – 15 minutes by default); set as 0 to disable.
G1PERIODIC_GC_SYS_LOAD_THRESHOLD+ (for openJDK 12/13 only)JavaAllows G1 Periodic Collection execution, if the average one-minute system load is below the set value. This condition is ignored if set as zero. Is equal to the {CPU_cores_number} * {GC_SYS_LOAD_THRESHOLD_RATE} by default.
GC_SYS_LOAD_THRESHOLD_RATE+ (for openJDK 12/13 only)JavaCustom multiplier to flexibly adjust the G1PeriodicGCSystemLoadThreshold value (0.3 by default).
GEM_HOME+RubyLocations (can be several) where gems can be found (should include GEM_PATH).
GEM_PATHRubyA location where gems will be installed by default.
GMS_LISTENER_PORTGlassFish (Payara)A port used by the group management service (GMS).
GO_BUILD_OPTIONS+GoOptions and flags that should be used for the Go application building.
GO_RUN+GoSets the name of the executable binary file. If not specified, the deployment script will try to locate one based on the project name.
GO_RUN_OPTIONS+GoOptions and flags that should be used to run the Go application.
GOPATHGoDefines the Go application deployment folder.
HAZELCAST_CONFIG+GlassFish (Payara)Sets a path to the hazelcast configuration file.
HOME_DIRGlassFish (Payara), WildFly, Spring Boot, Java Engine, Node.js, Shared StorageContainer home directory.
IRBRCRubyA path to the IRB configuration file.
JAVA_ARGS+JavaAllows passing some custom arguments to the main function of your application.
JAVA_HOMEJava, MavenPoints to the directory where the Java runtime environment (JRE) is installed.
JAVA_OPTS_CONFFILEJava, MavenPath to the variables.conf file.
JBOSS_HOMEWildFlyWildFly home directory.
JELASTIC_AUTOCONFIG+LLSMP, LiteSpeed Web Server, LiteSpeed ADCEnables (enabled) or disables (disabled) autoconfiguration of the LiteSpeed worker processes count based on the allocated RAM and number of CPU cores.
JELASTIC_EXPOSE+AllManages the auto-redirect functionality state with an ability to define the required port manually.
JELASTIC_MEMORY_AUTOCONFIG+WildFlyEnables (true) or disables (false) memory auto-configuration for WildFly.
JELASTIC_PORTS+ (before env creation)AllSpecifies custom ports, which should be opened in firewall during container creation.
JELASTIC_PRIORITY_PORTS+GlassFish (Payara)Sets a GlassFish HTTP listener port.
LAUNCH_JBOSS_IN_BACKGROUND+WildFlyEnables (true) or disables (false) start of an application server in the background mode.
LSWS_MAX_CHILDREN+LLSMP, LiteSpeed Web ServerRedefines the maximum children process limit for the server. The variable is hidden by default as Jelastic sets this value equal to the number of available CPU cores (usually ensures the best operability). You need to manually add this variable and restart the server to redefine the value.
MASTER_HOSTAllA short hostname for a master node within a layer.
MASTER_IDAllA unique node identifier of a master node within a layer.
MASTER_IPAllAn internal IP address of a master node within a layer.
MAVEN_DEPLOY_ARTIFACT+MavenDefines an artifact to be deployed (can be redefined for a particular project).
MAVEN_OPTS+MavenSets parameters to be used to start up the JVM running Maven and can be used to supply additional global options.
MAVEN_RUN_ARGS+MavenAllows passing some custom arguments for the application build (can be redefined for a particular project).
MY_RUBY_HOMERubyA path to the directory where the Ruby engine is located.
NODE_ENVNode.jsSpecifies the environment in which an application is running (e.g. developmentstagingproductiontesting, etc).
NODE_OPTIONS+Node.jsVariable for specifying the Node.js runtime v8 options.
NVM_DIRNode.jsA path to the NVM installation location.
ON_ENV_INSTALL+ (before env creation)AllA script (or link to it) to be executed after environment creation.
PACKAGE_MANAGER+Node.jsA variable that contains the name of a package manager for installing the javascript packages (npm or yarn).
PACKAGE_MANAGER_OPTS+Node.jsAdditional options for the package manager (refer to the official npm or yarn documentation).
PATHAllA default shell variable, with a list of paths to directories with executable programs.
PHPFPM_MAX_CHILDREN+NGINX PHPSets a number of child worker processes for PHP-FPM. It is equal to the number of CPU cores available for the container by default (but no less than 2).
PORT_4848_TCP_PORTGlassFish (Payara)A port for the admin console.
PROCESS_MANAGER+Node.jsVariable for choosing the Node.js process manager (i.e. npmpm2foreversupervisor).
PROCESS_MANAGER_FILENode.jsA path to the file that contains the start options for the process manager.
PSWD_FILEGlassFish (Payara)A path to the file with an admin user password.
REDIRECT_EXCLUDE_PORTS+Node.jsExcludes listed ports from the auto-redirect algorithm (e.g. 22,23,25,21,111,2049,8743,7979).
REDIS_COMMANDER+RedisDefines if the Redis Commander management tool should be enabled or disabled.
REDIS_ENABLED+PHPEnables (true) or disables (false) object caching with Redis. Service restart is required to apply changes.
REDIS_SENTINEL+RedisDefines if the Redis Sentinel high-availability and monitoring tool should be enabled or disabled.
ROOT_DIRNode.jsDisplays a path to the application deployment directory.
SERVER_WEBROOTLLSMP, LiteSpeed Web ServerDisplays a path to the application deployment directory.
STACK_NAMEAllThe name of the current stack.
STACK_PATHAllThe home directory of the stack.
STACK_USERAllThe name of the stack’s default user.
STANDALONE_MODE_CONFIG+WildFlyA configuration file to launch a standalone WildFly server.
TCP_BALANCING+HAProxyEnables (true) or disables (false) traffic proxying and balancing to TPC backends.
UPDATE_PACKAGES_ON_RESTART+Node.jsEnables (true) or disables (false) automatic packages installation after the nodejs service restart. If there is no node_modules directory inside the webroot one, such an update is called regardless of this variable.
UPSTREAM_KEEPALIVE+NGINX balancerSets the keepalive directive value for the upstream.
VERT_SCALING+JavaDefines if the default Java GC agent should be enabled (true) or disabled (false).
WAF+LLSMP, LiteSpeed Web ServerEnables (true) or disables (false) Web Application Firewall with the Comodo default ruleset for the LiteSpeed Web Server.
WEB_ROOTGoA path to the deployed application.
WEBROOTPHP, Tomcat (TomEE), GlassFish (Payara)Displays a path to the application deployment directory.
WORKER_PROCESSES+NGINX balancerSets a number of worker processes – can be autodetected by NGINX (auto) or set equal to the CPU cores count (define).
WP_PROTECT+LLSMP, LiteSpeed Web Server, LiteSpeed ADCConfigures an action for the WordPress Brute Force Attack Protection feature (off|on|drop|deny|throttle|captchaoff by default).
WP_PROTECT_LIMIT+LLSMP, LiteSpeed Web Server, LiteSpeed ADCSets a limit for the WordPress Brute Force Attack Protection feature (0|1|2-100010 by default).
Or use the categorized groups below to narrow the search.

Note: Variables marked with “+” in the Editable column can be freely adjusted to customize your container. Herewith, a restart is required to apply changes.

It is not recommended to adjust variables marked with “-” as such an action won’t apply any actual changes to the container; however, it may break some internal logic.

There are a number of options that can be used with all of the CirrusGrid-managed stacks:
Variable NameEditable*Description
{SOFTWARE}_VERSIONA version of the specified software (stack, engine, template, module, etc).
CLONE_ON_SCALE+Defines if new nodes upon horizontal scaling should be clones of a layer’s master (true) or created from scratch (false).
DOCKER_EXPOSED_PORTLists ports from the EXPOSE directive of the image’s dockerfile, which were opened via container firewall during the environment creation.
JELASTIC_EXPOSE+Manages the auto-redirect functionality state with an ability to define the required port manually.
JELASTIC_PORTS+ (before env creation)Specifies custom ports, which should be opened in firewall during container creation.
MASTER_HOSTA short hostname for a master node within a layer.
MASTER_IDA unique node identifier of a master node within a layer.
MASTER_IPAn internal IP address of a master node within a layer.
ON_ENV_INSTALL+ (before env creation)A script (or link to it) to be executed after environment creation.
PATHA default shell variable, with a list of paths to directories with executable programs.
STACK_NAMEThe name of the current stack.
STACK_PATHThe home directory of the stack.
STACK_USERThe name of the stack’s default user.
StackVariable NameEditable*Description
All JavaFULL_GC_AGENT_DEBUG+Enables (true) or disables (false) the debug mode to track the Java GC processes in the logs.
All JavaFULL_GC_PERIOD+Sets the interval (in seconds) between the full GC calls; 900 by default, i.e. 15 minutes.
All JavaG1PERIODIC_GC_INTERVAL+ (for openJDK 12/13 only)A frequency of the G1 Periodic Collection in milliseconds (G1PeriodicGCInterval – 15 minutes by default); set as 0 to disable.
All JavaG1PERIODIC_GC_SYS_LOAD_THRESHOLD+ (for openJDK 12/13 only)Allows G1 Periodic Collection execution, if the average one-minute system load is below the set value. This condition is ignored if set as zero. Is equal to the {CPU_cores_number} * {GC_SYS_LOAD_THRESHOLD_RATE} by default.
All JavaGC_SYS_LOAD_THRESHOLD_RATE+ (for openJDK 12/13 only)Custom multiplier to flexibly adjust the G1PeriodicGCSystemLoadThreshold value (0.3 by default).
All JavaJAVA_ARGS+Allows passing some custom arguments to the main function of your application.
All JavaJAVA_HOMEPoints to the directory where the Java runtime environment (JRE) is installed.
All JavaJAVA_OPTS_CONFFILEPath to the variables.conf file.
All JavaVERT_SCALING+Defines if the default Java GC agent should be enabled (true) or disabled (false).
Tomcat & TomEEWEBROOTDisplays a path to the application deployment directory.
GlassFish & PayaraADMIN_USERA login of the admin user for the administration console.
GlassFish & PayaraDASShows if there is a DAS node (required to configure cluster) for the current layer.
GlassFish & PayaraGMS_LISTENER_PORTA port used by the group management service (GMS).
GlassFish & PayaraHAZELCAST_CONFIG+Sets a path to the hazelcast configuration file.
GlassFish & PayaraHOME_DIRContainer home directory.
GlassFish & PayaraJELASTIC_PRIORITY_PORTS+Sets a GlassFish HTTP listener port.
GlassFish & PayaraPORT_4848_TCP_PORTA port for the admin console.
GlassFish & PayaraPSWD_FILEA path to the file with an admin user password.
GlassFish & PayaraWEBROOTDisplays a path to the application deployment directory.
WildFlyADMIN_USERA login of the admin user for the administration console.
WildFlyHOME_DIRContainer home directory.
WildFlyJBOSS_HOMEWildFly home directory.
WildFlyJELASTIC_MEMORY_AUTOCONFIG+Enables (true) or disables (false) memory auto-configuration for WildFly.
WildFlyLAUNCH_JBOSS_IN_BACKGROUND+Enables (true) or disables (false) start of an application server in the background mode.
WildFlySTANDALONE_MODE_CONFIG+A configuration file to launch a standalone WildFly server.
Spring BootHOME_DIRContainer home directory.
Java EngineHOME_DIRContainer home directory.
StackVariable NameEditable*Description
All PHPCACHE_MEM_LIMIT+Defines the portion of RAM, which should be reserved for the built-in Redis cache server, 10% of container total RAM by default.
All PHPREDIS_ENABLED+Enables (true) or disables (false) object caching with Redis. Service restart is required to apply changes.
All PHPWEBROOTDisplays a path to the application deployment directory.
NGINXPHPFPM_MAX_CHILDREN+Sets a number of child worker processes for PHP-FPM. It is equal to the number of CPU cores available for the container by default (but no less than 2).
LiteSpeed Web ServerADMIN_USERA login of the admin user for the administration console.
LiteSpeed Web ServerJELASTIC_AUTOCONFIG+Enables (enabled) or disables (disabled) autoconfiguration of the LiteSpeed worker processes count based on the allocated RAM and number of CPU cores.
LiteSpeed Web ServerLSWS_MAX_CHILDREN+Redefines the maximum children process limit for the server. The variable is hidden by default as Jelastic sets this value equal to the number of available CPU cores (usually ensures the best operability). You need to manually add this variable and restart the server to redefine the value.
LiteSpeed Web ServerSERVER_WEBROOTDisplays a path to the application deployment directory.
LiteSpeed Web ServerWAF+Enables (true) or disables (false) Web Application Firewall with the Comodo default ruleset for the LiteSpeed Web Server.
LiteSpeed Web ServerWP_PROTECT+Configures an action for the WordPress Brute Force Attack Protection feature (*off|on|drop
LiteSpeed Web ServerWP_PROTECT_LIMIT+Sets a limit for the WordPress Brute Force Attack Protection feature (0|1|2-100010 by default).
LLSMPADMIN_USERA login of the admin user for the administration console.
LLSMPADMINPANEL_ENABLED+The “true” and “1” values allow usage of the admin panel, while any other disables it. Restart is required to apply changes.
LLSMPCP_MEM_LIMIT+Defines the portion of RAM, which should be reserved for the application server, 50% of container total RAM by default.
LLSMPDB_MEM_LIMIT+Defines the portion of RAM, which should be reserved for the built-in MariaDB database server, 40% of container total RAM by default.
LLSMPJELASTIC_AUTOCONFIG+Enables (enabled) or disables (disabled) autoconfiguration of the LiteSpeed worker processes count based on the allocated RAM and number of CPU cores.
LLSMPLSWS_MAX_CHILDREN+Redefines the maximum children process limit for the server. The variable is hidden by default as Jelastic sets this value equal to the number of available CPU cores (usually ensures the best operability). You need to manually add this variable and restart the server to redefine the value.
LLSMPSERVER_WEBROOTDisplays a path to the application deployment directory.
LLSMPWAF+Enables (true) or disables (false) Web Application Firewall with the Comodo default ruleset for the LiteSpeed Web Server.
LLSMPWP_PROTECT+Configures an action for the WordPress Brute Force Attack Protection feature (off|on|drop|deny|throttle|captchaoff by default).
LLSMPWP_PROTECT_LIMIT+Sets a limit for the WordPress Brute Force Attack Protection feature (0|1|2-100010 by default).
LEMPADMINPANEL_ENABLED+The “true” and “1” values allow usage of the admin panel, while any other disables it. Restart is required to apply changes.
LEMPCP_MEM_LIMIT+Defines the portion of RAM, which should be reserved for the application server, 50% of container total RAM by default.
LEMPDB_MEM_LIMIT+Defines the portion of RAM, which should be reserved for the built-in MariaDB database server, 40% of container total RAM by default.
Variable NameEditable*Description
GEM_HOME+Locations (can be several) where gems can be found (should include GEM_PATH).
GEM_PATHA location where gems will be installed by default.
IRBRCA path to the IRB configuration file.
MY_RUBY_HOMEA path to the directory where the Ruby engine is located.
Variable NameEditable*Description
APP_FILE+The main Node.js application file to be launched.
AUTO_OLD_HEAP+Turns on/off (true/false) Jelastic memory autoconfiguration – sets the maximum size of an old heap based on the amount of memory on the container.
HOME_DIRContainer home directory.
NODE_ENVSpecifies the environment in which an application is running (e.g. developmentstagingproductiontesting, etc).
NODE_OPTIONS+Variable for specifying the Node.js runtime v8 options.
NVM_DIRA path to the NVM installation location.
PACKAGE_MANAGER+A variable that contains the name of a package manager for installing the javascript packages (npm or yarn).
PACKAGE_MANAGER_OPTS+Additional options for the package manager (refer to the official npm or yarn documentation).
PROCESS_MANAGER+Variable for choosing the Node.js process manager (i.e. npmpm2foreversupervisor).
PROCESS_MANAGER_FILEA path to the file that contains the start options for the process manager.
REDIRECT_EXCLUDE_PORTS+Excludes listed ports from the auto-redirect algorithm (e.g. 22,23,25,21,111,2049,8743,7979).
ROOT_DIRDisplays a path to the application deployment directory.
UPDATE_PACKAGES_ON_RESTART+Enables (true) or disables (false) automatic packages installation after the nodejs service restart. If there is no node_modules directory inside the webroot one, such an update is called regardless of this variable.
Variable NameEditable*Description
GO_BUILD_OPTIONS+Options and flags that should be used for the Go application building.
GO_RUN+Sets the name of the executable binary file. If not specified, the deployment script will try to locate one based on the project name.
GO_RUN_OPTIONS+Options and flags that should be used to run the Go application.
GOPATHDefines the Go application deployment folder.
WEB_ROOTA path to the deployed application.
StackVariable NameEditable*Description
HAProxyTCP_BALANCING+Enables (true) or disables (false) traffic proxying and balancing to TPC backends.
NGINXUPSTREAM_KEEPALIVE+Sets the keepalive directive value for the upstream.
NGINXWORKER_PROCESSES+Sets a number of worker processes – can be autodetected by NGINX (auto) or set equal to the CPU cores count (define).
LiteSpeed ADCADMIN_USERA login of the admin user for the administration console.
LiteSpeed ADCDEFAULT_CLUSTER+Selects the load balancing type for requests’ proxying (HTTPAJPFCGILSAPI). This logic can be disabled (0disabledfalse).
LiteSpeed ADCJELASTIC_AUTOCONFIG+Enables (enabled) or disables (disabled) autoconfiguration of the LiteSpeed worker processes count based on the allocated RAM and number of CPU cores.
LiteSpeed ADCWP_PROTECT+Configures an action for the WordPress Brute Force Attack Protection feature (off|on|drop|deny|throttle|captchaoff by default).
LiteSpeed ADCWP_PROTECT_LIMIT+Sets a limit for the WordPress Brute Force Attack Protection feature (0|1|2-100010 by default).
StackVariable NameEditable*Description
All DatabasesADMINPANEL_ENABLED (PHPMYADMIN_ENABLED)+The “true” and “1” values allow usage of the admin panel, while any other disables it. Restart is required to apply changes. The value in brackets is deprecated but can still be used on the MySQL and MariaDB databases.
RedisREDIS_COMMANDER+Defines if the Redis Commander management tool should be enabled or disabled.
RedisREDIS_SENTINEL+Defines if the Redis Sentinel high-availability and monitoring tool should be enabled or disabled.
CoachbaseADMIN_USERA login of the admin user for the administration console.
StackVariable NameEditable*Description
MavenJAVA_HOMEPoints to the directory where the Java runtime environment (JRE) is installed.
MavenJAVA_OPTS_CONFFILEPath to the variables.conf file.
MavenMAVEN_DEPLOY_ARTIFACT+Defines an artifact to be deployed (can be redefined for a particular project).
MavenMAVEN_OPTS+Sets parameters to be used to start up the JVM running Maven and can be used to supply additional global options.
MavenMAVEN_RUN_ARGS+Allows passing some custom arguments for the application build (can be redefined for a particular project).
MavenVERT_SCALING+Defines if the default Java GC agent should be enabled (true) or disabled (false).
Shared StorageHOME_DIRContainer home directory.

Powered by BetterDocs