Environment variables

Since version 5.5.0 you can use environment variables in config file, for example "log-file": "${USERPROFILE}/xmrig.log", A complete list of environment variables can be obtained by using command set on Windows and printenv on Linux.

Supported options
  • "worker-id" in "api" object.
  • "log-file".
  • "user", "pass" and "rig-id" for each pool.
  • "loader" in "opencl" and "cuda" object.
Additional variables
nameversiondescription
XMRIG_VERSION5.5.0+Version, for example 5.5.0.
XMRIG_EXE_DIR5.5.0+Directory where executable located, with (before v5.10.0) or without (v5.10.0+) trailing separator.
XMRIG_CWD5.5.0+Current working directory, with (before v5.10.0) or without (v5.10.0+) trailing separator.
XMRIG_EXE5.10.0+Executable path.
XMRIG_DATA_DIR5.10.0+Data directory, if not specified in config equal to XMRIG_EXE_DIR
XMRIG_HOME_DIR5.10.0+Current user’s home directory.
XMRIG_TEMP_DIR5.10.0+Temp directory.