Helix Core Server Administrator Guide: Fundamentals (2019.1)

Environment block

An environment block defines environment variables that are applied to one or more services. You can have more than one environment block. Server-specific environment blocks settings override corresponding settings in global environment blocks.

An environment block is defined using the following syntax:

Environment
{
   variable = value
}

An environment block might be inside or outside of a server block.

  • If the block is outside a server block, the variables it contains are applied to the environment of all processes created by p4dctl.
  • If the block is inside a server block, the variables it defines are set only in the environment of that server’s processes, but they do override corresponding settings at the environment level.

For example, the following settings outside a server block ensure that the owner is set to perforce, logging is enabled, and the correct P4CONFIG files are used.

Environment
{
     P4DEBUG     =  "server=1" # Embedded = requires quotes
     P4LOG       =  log
     P4CONFIG    =  .p4config
}