List of environment variables understood by WebHare and/or the
Essential environment variables
WebHare installation directory.
$WEBHARE_DIR/bin/wh must be the
wh command. In docker, this is usually
WebHare data root. If set, all datadirs are looked up relative to this path. In docker, this is usually
If not set, WEBHARE_DATAROOT is set to '$WEBHARE_DIR/whdata'. If whdata is a symlink,
wh will set WEBHARE_DATAROOT to
the expanded symlink. This allows you to specify a 'default' WebHare installation for a checked out soure tree.
The base port number for various connections. If not set, assumed to be 13679.
Lock the DTAP stage. Must be one of 'production', 'acceptance', 'test' or 'development'. If not set, configurable in WebHare.
Override the server name
If non-zero, this WebHare is configured a 'restored' installation which may not run tasks with external effects.
The user currently accessing the server. You should ensure this is set to the user executing commands for proper auditing.
Set if we're running inside a docker environment, and not from a source installation
Current semantic WebHare version number, eg 4.27.0
WebHare source directory, if you're running WebHare from source.
Directory for temporary files. If not set, $WEBHARE_DATAROOT/tmp will be used.
Maintenance window time offset, in minutes. All tasks with the 'maintenance' timezone will be offset this many minutes.
Additional modulepath to search. Separate by colon (':'). In docker, this is usually
If set, no connectinfo will be written to the installationroot. This allows you to run a secondary WebHare installation from the same tree without confusing your text editor.
If set, at every start/softreset a server configuration file will be downloaded from this location (either https:// or file:// url) and applied. For https:// urls, some variables describing the current installation will added.
Points to a script that will be sourced by 'wh' and can filter any command passed to it
Set to 1 to enable the debugflag for the Chrome headless runner
Set debuglevel for whfs/events.whlib. 1 = log actions, 3 = traces too
Set to 1 to enable debug for various potential startup issues
Set to 1 to allow the WebHare docker to run on ephemeral storage such as overlayfs.
wh testdocker and
wh testmodule support some extra variables that are useful in CI environments
A URL whose contents will be sourced by the tests and from which any environment variables starting
WEBHARE_ will be set in the CI environment (except for
You need to make sure you fully control and trust whatever the URL points to as any shell code in the script it points to may be executed by the test runner as well.
This variable can be setup as eg a GitLab CI/CD environment variable. Please make sure you protect it !
If set, two separate WebHares are running. This enables some additional tests
Tips and tricks
To easily run multiple installations in parallel, setup aliases in your .profile. Eg:
alias wh-moe2="WEBHARE_DATAROOT=$HOME/projects/whdata/moe2 WEBHARE_NOINSTALLATIONINFO=1 WEBHARE_BASEPORT=13300 wh"
You can then access or start this installation using eg
wh-moe2 console or
wh-moe2 sql 'select * from system.ports'
If you're running WebHare from source, you can create a file
$WEBHARE_DATAROOT/settings.sh for installation specific
settings. Please note that this file is ignored by docker installations.
These variables are only used during the WebHare build proces or by 'from source' installations. They have no effect on a running WebHare or on Docker versions
Number of processors to use (the
make -j parameter). Estimated based on CPU cores and/or memory if not set.