Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.2

# Using multiple configuration files

You can modularize your configuration by creating multiple configuration files and directories and having include statements in your `/etc/perforce/p4dtcl.conf` configuration file.

- To include a specific file, use the following syntax:

      include pathToFile

- To include directories, use the following syntax:

      include directoryPath

  When including directories, `p4dctl` requires that names for files included end with the `.conf` extension.

The following example shows a multiple file configuration.

    Environment
    {
      PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/sbin
    }

    include /etc/perforce/p4dctl.conf.d

The `include` reference causes P4DCTL to pick up further configuration from any `.conf` files in the directory specified.

The sub-directory `/etc/perforce/p4dctl.conf.d` contains a file called `README` with example content for a server `.conf` file that can be placed in the directory. That directory will also contain template files where packages have been used for installation of other P4 products. These can be used as the basis for your own configuration.

Package Name | Template File
--- | ---
`p4-server` | `p4d.template`
`p4-proxy` | `p4p.template`
`p4-broker` | `p4broker.template`

The content of the template files for p4d, p4p, and is shown below with placeholders:

Placeholder | Description
--- | ---
`%NAME%` | service name
`%ROOT%` | P4ROOT directory
`%TARGET%` | P4TARGET P4 Server port for the proxy
`%PORT%` | P4PORT that the service is listening on

    #-------------------------------------------------------------------------------
    # Template p4dctl configuration file for P4 Server
    #-------------------------------------------------------------------------------
    p4d %NAME%
    {
        Owner = perforce
        Execute = /opt/perforce/sbin/p4d
        Umask = 077
        # Enabled by default.
        Enabled = true
        Environment
        {
            P4ROOT = %ROOT%
            P4SSLDIR = ssl
            PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/bin:/opt/perforce/sbin
            # Enables nightly checkpoint routine
            # This should *not* be considered a complete backup solution
            MAINTENANCE = true
    }

    #-------------------------------------------------------------------------------
    # Template p4dctl configuration file for  Helix Core Proxy
    #-------------------------------------------------------------------------------
    p4p %NAME%
    {
        Owner = perforce
        Execute = /usr/sbin/p4p
        Umask = 077
        Environment
        {
            P4PCACHE=/opt/perforce/servers/%NAME%/
            P4TARGET=%TARGET%
            P4PORT=%PORT%
            PATH=/bin:/usr/bin:/usr/local/bin
        }
    }

    #-------------------------------------------------------------------------------
    # Template p4dctl configuration file for Helix Core Broker
    #-------------------------------------------------------------------------------
    p4broker %NAME%
    {
        Owner = perforce
        Execute = /usr/sbin/p4broker
        Umask = 077
        Environment
        {
            P4BROKEROPTIONS = "-c /opt/perforce/servers/%NAME%/broker.conf"
            P4SSLDIR = ssl
            PATH = /bin:/usr/bin:/usr/local/bin
        }
        # Enabled by default.
        Enabled = true
    }

Your search for returned results