Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Environment variables

This page lists the environment variables Exponential 6 reads, what each one does and who sets it. It is for administrators, hosts and developers who configure a server, a container or a deployment pipeline.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/guides/environment-variables.md

On this page

Environment variables

This page lists the environment variables Exponential 6 reads, what each one does and who sets it. It is for administrators, hosts and developers who configure a server, a container or a deployment pipeline.

Warning

.htaccess slows down every request. When .htaccess files are enabled (AllowOverride anything but None), let alone used, Apache looks for them and reads and evaluates them on every request, in every directory of the path, and page loading times go up drastically (measured). The only real fix is to switch the feature off for the virtual host: AllowOverride None in the HTTPS virtual host, and the rules in the virtual host's own configuration as mod_rewrite rules. That is far faster in production speed tests and well worth the time it takes to optimize a production configuration. Switch over right away: copy the rules of the example HTTPS virtual host into your virtual host (with the static cache, also staticcache_offload.conf), set AllowOverride None, run apachectl configtest, reload Apache and test the site. The same rules for other servers: nginx, LiteSpeed, Caddy, IIS, Velocity (built in); where virtual host rules go in a control panel: Plesk, cPanel, DirectAdmin, ISPConfig. On LiteSpeed or OpenLiteSpeed, the server's own page cache can also answer anonymous visitors and crawlers without PHP: Page caching with LiteSpeed and OpenLiteSpeed.

Exponential is configured through its INI files (settings/) and, for a few things that must be known before the settings are read, through constants in config.php and config.env.php (EXP_ENV, EZP_INI_FILEMTIME_CHECK and the like). Environment variables are used where the setting must belong to one server process and must never travel with a copy of the settings: demo mode, the engine archive, passwords handed to an installer, and values one command passes to the processes it starts.

PHP reads an environment variable with getenv(). Under PHP-FPM that also returns the FastCGI parameters of the request (env[...] in the pool, SetEnv in Apache with mod_proxy_fcgi, fastcgi_param in nginx); under Apache with mod_php and LiteSpeed with lsphp a SetEnv arrives the same way. Persistent workers (Exponential Velocity, FrankenPHP) inherit the environment of the server process when it starts.

Contents

  1. Variables you set
  2. Variables Exponential sets for its own processes
  3. Constants that are not environment variables
  4. Where to set an environment variable
  5. Related pages

Variables you set

VariableValuesWhat it doesRead by
EXP_DEMO_MODE1 (exactly)Demo mode for a public demo: administrator passwords cannot be changed or reset by any path, the installers accept a well-known or short administrator password (publish, publishing; never an empty one), the administration shows a banner, and each process records demo/mode in security.log and system.demo.mode in the audit. Any other value, or none, leaves it off. Read on every call (getenv(), then $_SERVER); never from an INI file or a request. Under Velocity never from the shared /etc/vc/envvars (use the site envvars). Never set it for a real site. Demo modeexpDemoMode (kernel/classes/expdemomode.php)
EXP_ENGINE_PHARthe path of an engine archiveRuns the kernel and library classes from that archive instead of the files on disk (only when the file exists). exp:velocity sets it for the servers it starts when an archive is configured. Velocity enginesautoload.php, expVelocity
EXP_INSTALL_DB_PASSWORDa passwordThe database password for exp:install when --db-password is not given, so it does not appear in the process list or the shell history. Chapter 7bin/php/install.php
EXP_KICKSTART_LOG00 turns off var/log/kickstart.log of exp:kickstarter run. Chapter 6the kickstarter
EXP_BENCHMARK_AUTHuser:passwordHTTP basic authentication for exp:benchmark when --auth is not giventhe benchmark command
EXP_MONGO_TRACEa file pathWrites every MongoDB statement to that file before it runs, to find a statement that never returns. Off and free when unsetthe MongoDB driver (lib/ezdb/classes/expmongodb.php)
EXP_SETUP_LOG_DIRa directoryWhere setup.log and the web setup's state are kept instead of var/log (the tests use it so they never rotate a real installation's log)expSetupLog
PHP_CLI_SERVER_WORKERSa numberPHP's own variable: the workers of PHP's built-in web server, which Velocity's php engine usesPHP; reported by Setup > System information

Variables Exponential sets for its own processes

These are set by one Exponential command for a process it starts. Do not set them yourself.

VariableSet byMeaning
EXP_SETUP_RUNthe setup, for the commands it runsthe commands work with the settings as they are before the installation; the audit does not look the user up
EXP_KICKSTART_LOG_CHILDexp:kickstarter runthe run is the logged child process
EXP_PRELOAD_DETACHED, EXP_PRELOAD_ERRORSthe preloader's background jobthe job runs detached; where its errors go
EXP_PHAR_REEXECexp:phar buildthe build re-ran itself with phar.readonly off
EXP_VELOCITY_ENGINE, EXP_VELOCITY_ROOT, EXP_VELOCITY_STATIC_PATHS, EXP_VELOCITY_NEVER_STATIC, EXP_VELOCITY_FOLLOW_SYMLINKSexp:velocity for the php and frankenphp enginesthe engine's name, the document root and which files are served as they are

Constants that are not environment variables

EXP_ENV (the environment name, config.env.php), EZP_INI_FILEMTIME_CHECK, EZP_DIR_MODE_MAX, EZP_FILE_MODE_MAX and the other EZP_* / EXP_* names in config.php-RECOMMENDED and config.env.php.example are PHP constants, defined in those files. Setting an environment variable of the same name does nothing. The reverse holds for EXP_DEMO_MODE: defining a constant of that name in config.php does nothing; demo mode comes only from the environment.

The two files have different jobs. config.env.php holds only what differs per machine, the environment name EXP_ENV; it is copied from config.env.php.example by hand and is not touched by the console. config.php holds the constants of the installation (file modes, INI checks, cluster storage, log rotation); it is put into place with ./console exp:setup:config --apply and read and changed with ./console exp:config:list, exp:config:get, exp:config:set and exp:config:unset. To take a value from an environment variable into config.php, set it at deploy or container start: ./console exp:config:set CLUSTER_STORAGE_HOST "$CLUSTER_DB_HOST" --apply. See Setting up .htaccess and config.php from the console.

Where to set an environment variable

Where PHP runsHow
Apache (mod_php, or PHP-FPM through mod_proxy_fcgi)SetEnv NAME value in the virtual host or the site's .htaccess (mod_env)
LiteSpeed / OpenLiteSpeed with lsphpSetEnv in .htaccess (LiteSpeed reads it like Apache), or the virtual host's environment
PHP-FPMenv[NAME] = value in the site's pool, then reload that pool's master
nginx with PHP-FPMfastcgi_param NAME value; where requests are passed to PHP-FPM, or the pool
Exponential Velocityexport NAME=value in /etc/vc/envvars: the server reads the file at every start and exports what it sets into its own environment before it forks, so every worker sees it and a restart or deploy from any shell keeps it. The environment of the process that runs exp:velocity start (Environment= in its systemd unit or a drop-in, or export in the shell) wins over the file. /etc/vc/envvars is read by the server of every installation on the host; a variable for one installation only goes in its site envvars, /etc/vc/sites-available/<site>.envvars, which exp:velocity start passes to that installation's server only and which wins over both. EXP_DEMO_MODE is taken only from there (or the start environment): a worker refuses it from the shared file. The files are read, never run, and refuses PATH, LD_*, DYLD_*, MALLOC_*, HTTP_*, PHPRC, PHP_INI_SCAN_DIR, GLIBC_TUNABLES, HOME, USER and the other names listed in the on-disk layout
crona NAME=value line at the top of the crontab
consoleexport NAME=value, or NAME=value command for one command
containersENV in the image, -e, --env-file or environment: / env_file: for one service

Examples for demo mode, one per place: Demo mode examples.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x