Configuration parameter precedence

Helix Server configuration parameters can be set in different ways. When a Helix Server application (such as p4 or P4V), or a Helix Server program (p4d) starts up, it reads its configuration parameters according to the following precedence, where 1 overrides 2, and 2 overrides 3, and so on:

  1. For Helix Server applications or a Helix Server (p4d), command-line flags, but these are not a persistent configuration.
  2. For a Helix Server (p4d), persistent configurables set with p4 configure.
  3. The P4CONFIG file, if P4CONFIG is set.
  4. User environment variables. See P4ENVIRO.
  5. System environment variables.
  6. Windows user registry or macOS user preferences set by p4 set.
  7. Windows system registry or macOS system preferences (set by p4 set -s).

When a Perforce service (p4s) starts up, it reads its configuration parameters from the environment according to the following precedence:

  1. Persistent configurables set with p4 configure
  2. Windows service parameters set by p4 set -S servicename
  3. System environment variables.
  4. Windows system registry or macOS user preferences (set by p4 set -s).

User environment variables can be set with any of the following:

  • Linux export, Windows command prompt set
  • The AUTOEXEC.BAT file
  • Windows User Variables tab under the System Properties dialog box in Control Panel

System environment variables can be set with:

  • Linux export, Windows System Variables tab under the System Properties dialog box in the Control Panel.
Note

The output of p4 set lists the value of each variable and how each variable was set, such as by config, enviro, set, or set -s