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

P4 CLI Documentation | 2026.1

# p4 configure

Set, view, and manage server configuration variables, including comments.

## Syntax

    p4 [g-opts] configure set [--comment=comment] [serverid#]variable=value
    p4 [g-opts] configure unset [--comment=comment] [serverid#]variable
    p4 [g-opts] configure show [allservers | serverid | variable]
    p4 [g-opts] configure history [allservers | serverid | variable]
    p4 configure history [--iteration=N] --comment=comment variable
    p4 configure help

Syntax and naming conventions

## Description

Configuration variables are used to control and customize the behavior of the P4 service. A configurable setting might affect the client, the server, or a proxy.

The configuration variables are described both in this documentation and via the command line:

Documentation | Command line
--- | ---
See Configurables reference | p4 help configurables shows the Name and Use. p4 configure help shows additional information. See the help option.
See Environment and registry variables | p4 help environment

The super user can use p4 [g-opts] configure history [allservers | serverid | variable] to display the history of configurables, which are recorded by the server since the 2019.2 release. See the Options.

An alternative is using p4 server, which conveniently allows some configuration in the server spec. See the p4 server topic on the DistributedConfig: field.

### Default value and p4 configure help

The default value of each configurable is shown in two places:

- Configurables reference

- The output of `p4 configure help` command, which provides additional information. Some configurables have both a `DefaultValue` and a `RecommendedValue`. To learn more, see the help option.

### Precedence

The following table shows how the value of a configurable or environment variable is set, where 1 overrides 2, 2 overrides 3, and 3 overrides 4.

Precedence | How the value is set | Persistent configuration?
--- | --- | ---
1 | Command line "-v" options that are passed at server startup. For example: p4d -v net.keepalive.idle=2700 | No, but the option can be supplied each time the server is started,
2 | Using the `p4 configure set` command to set the specified configurable or environment variable for a named server or for any server. A configurable set for a named server overrides on that particular server a configurable set for any server. See Viewing the values of configuration variables on all servers. | Yes
3 | Using environment variables. For Windows, use p4 set -S Perforce, such as p4 set -S Perforce P4DEBUG="net.keepalive.idle=2700" and the value will persist. On Unix, use the `export` command, which does not persist. Certain server-related configurables are read-only. For example, the `p4 configure` or `p4 configure set` commands cannot change the value of the `P4ROOT` or `P4JOURNAL` environment variables. | Yes only for Windows
4 | Using default values (no action required). | Yes

You can use `K` and `M` to represent large numbers. For example, `10M` is the default value for the dm.shelve.maxfiles configurable.

### Viewing the values of configuration variables on one server

To display the configuration state of the current server, a named server, or any configurable, including a P4 environment variable, use:

`p4 configure show`

In the following table, each configurable is shown along with its value, where the entry in the parentheses ( ) indicates how the value was set.

If the output line is ... | the value was set by ...
--- | ---
P4PORT=20192 (-p) | p4d -p
monitor=2 (-v) | p4d -v
net.parallel.max: 10 (configure) | p4 configure
serverid=commit (serverid) | p4 serverid

Note that monitor is set to 2. To find out whether a specific configurable variable has been set in more than one way, specify that configurable variable:

p4 configure show monitor

which might output:

    monitor=2 (-v)
    monitor=10 (configure)

to indicate that p4d -v set monitor to 2, and p4 configure set monitor to 10. Because p4d has precedence over p4 configure, the output of p4 configure show indicates that monitor is set to 2.

### Viewing the values of configuration variables on all servers

To display the configuration across all servers, use:

p4 configure show allservers

The output might be similar to:

    any: lbr.autocompress = 1
    any: submit.allowbgtransfer = 1
    paris-edge: P4LOG = /home/perforce/servers/edge1/log
    headquarters-commit: P4LOG = /home/perforce/servers/commit-hq/log

where any means a configurable or environment variable defined on the commit server that is used by all connected servers unless specifically overridden in a named server's configuration. See Precedence.

### Unsetting a value

To remove a custom setting of a configurable, use the `p4 configure unset` command. For example, to revert net.parallel.shelve.threads to its default value of unset (0), the command would be:

p4 configure unset net.parallel.shelve.threads

See the Secure the server section of P4 Server Administration Documentation.

### Stopping the server for some configurables

Changes to most configurables take effect immediately. For example, `monitor` (enable/disable the `p4 monitor` command) security (set the security level).
Changes to `P4AUTH`, `P4PORT`, the startup.N configurables used in replicated environments, `net.tcpsize`, and `net.backlog` require a restart. To restart the server, use `p4 admin restart`.
For certain configurables, such as ssl.tls.version.min. To learn more, see Explicit stop and restart.

### Setting configurables in multi-server environments

Servers can be identified by name. In replicated and multi-server environments, a central server The one server that is innermost in a multi-server deployment. In the server specification form field for Services, the central server might be specified as “standard” or “commit-server”. If edge servers are part of the multi-server deployment, the central server must be a commit server. See also 'upstream server'. can control the settings of multiple replicas by specifying the server name as part of the configurable. For example, the following command sets the value of the `serviceUser` configurable for an edge server (`tokyo_edge`). The command is executed on the commit server.

    p4 configure set tokyo_edge#serviceUser=svc_tokyo_edge

See Deployment architecture in the P4 Server Administration Documentation.

### Accessing configurables when the server is down

If the P4 Server is not running or you cannot access the server, you can use the ``p4d`` command to list, set, and unset server configurables:

- To list all server configuration variables, use the `-cshow` option. For example:

      p4d -r $P4ROOT -cshow

- To set or unset values, use `-cset` or `-cunset`. For example:

      p4d -r $P4ROOT "-cset myServer#auth.ldap.timeout=30"
      p4d -r $P4ROOT "-cunset myServer#db.replication"

For more information, see the Perforce Knowledge Base article, Accessing Server Configuration Variables.

### Adding a comment

You can create and view comments about a configurable. See the `--comment` option.

## Options

Option | Description
--- | ---
`set `variable`=`value`` | Sets the named variable to the provided value. For a list of configuration variables, see the Configurables reference run `p4 help configurables` at the command line.
`unset variable` | Unsets the named configuration variable.
`show` | Displays the current configuration of this server, that is, the server currently specified by `P4PORT`. The output also includes the last modified DateTime for a given configurable. Regarding the maximum size of the `db.monitor` table, see the `db.monitor.shared` configurable. The `p4 configure show` command indicates the actual maximum, but `p4 configure show allservers` indicates a manual preference that is only enforced if sufficient memory is available.
`show allservers` | Shows the configuration variables for all servers known to the system.
`show variable` | Shows the setting(s) of the specified variable. This variant of the command shows all the settings of the variable that it can find, in order of precedence, and can be useful for understanding why a particular variable is not configured with the value that you expect, because variable settings can come from multiple sources.
`show serverid` | Shows the settings of the named server.
`--comment=comment` | An optional explanation about why the value of a configurable was set. The comment can be provided when setting the configurable. The comment can also be provided any time later on. See Examples of p4 configure history. The dm.configure.comment.mandatory configurable can be set to ensure that a comment is provided when the setting of a configurable is changed.
`history` | `p4 configure history` displays the history of configurables' values recorded by the 2019.2 server onwards. Passing the long option `--comment` sets the comment for the most recent history. The optional `--iteration=N` option can be used to retroactively set a comment on a specific history entry. In the history of a configurable, each “iteration” corresponds to a change associated with a configurable, such as setting or unsetting the value of a configurable. See Examples of p4 configure history.
`history allservers` | Shows the history of configuration variables for all servers known to the system.
`history serverid` | Shows the history of the settings of the named server.
`history variable` | Shows the history of the specified configuration variable.
`help` | Shows details about all the documented and supported configurables. The output is best redirected to a file because it has about 4,000 lines. For each configurable, shows some or all of the following:
Output | Meaning
--- | ---
`Configurable` | Name of the configurable.
`Description` | The effect of setting this configurable.
`ValueType` | Usually `INT`, but might be `STRING` or `DIR_NAME` for directory name.
`MinValue` | Minimum value
`MaxValue` | Maximum value
`DefaultValue` | Generally stays the same for backward compatibility, even if it might not be optimal for the current release.
`RecommendedValue` | Might differ from the `DefaultValue` because it is not constrained by backward compatibility.
`Applicability` | One or more of the following: `Client`, `Server`, `Proxy`, `Broker`
`RestartRequired` | Whether a server restart is required for a change in value to take effect:
`No` | Immediately, without a server restart
`Yes` | After a server restart
`ExplicitStop` | After a server has been explicitly stopped, then restarted
`ReferToDoc` | Special conditions apply, which are explained in the row for that configurable at the Configurables `URL`
`SupportLevel` | `Doc` means supported.
`Category` | One or more of the following: `Archive-Management`, `DVCS`, `Extensions`, `Licensing`, `Monitoring`, `Network`, `Performance` (could affect performance in a positive or negative way), `Replication`, `Security`, `Streams`, `Triggers` or `Miscellaneous`, if none of the other categories apply.
`URL` | Link to a row within the Configurables section of this Reference. For an environment variables, the URL corresponds to the environment variable's page in the Environment and registry variables section. (Used by P4 Admin)
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `super` available to an operator user

The output of `p4 configure show` only shows those configurables that have been changed from their default value at least once. Such configurables continue to show even if the value is specifically set to the default value.

## Examples

p4 configure set "Replica1#startup.1=pull -i 1" | On the server named Replica1, set the startup.N configurable to poll 1 every second
p4 configure set rpl.labels.global=1 | The server returns: For server 'any', configuration variable 'rpl.labels.global' set to '1' where 'any' means this setting applies to ALL servers, unless there is a local override for the same setting.
`p4 configure unset server` | Revert a setting, such as `p4 configure set server=3`, to the default value.

### Examples of p4 configure history

Suppose the output of `p4 configure history` has no comment for iteration 2:

    any#dm.user.setinitialpasswd changed from 'unset' to '0' (iteration 1) by 'usuper' on 2022/10/17 01:54:55 local to server NoServerId with comment 'security'
    any#server.allowfetch changed from 'unset' to '1' (iteration 2) by 'usuper' on 2023/10/20 10:22:55 local to server NoServerId
    any#server.allowfetch changed from '1' to 'unset' (iteration 3) by 'usuper' on 2023/10/31 17:28:45 local to server NoServerId with comment 'unset fetch'

The admin can revise the history to add a comment:

    p4 configure history --comment="for DVCS" --iteration=2 server.allowfetch

which changes the output of `p4 configure history` to this:

    any#dm.user.setinitialpasswd changed from 'unset' to '0' (iteration 1) by 'usuper' on 2022/10/17 01:54:55 local to server NoServerId with comment 'security'
    any#server.allowfetch changed from 'unset' to '1' (iteration 2) by 'usuper' on 2023/10/20 10:22:55 local to server NoServerId with comment 'for DVCS'
    any#server.allowfetch changed from '1' to 'unset' (iteration 3) by 'usuper' on 2023/10/31 17:28:45 local to server NoServerId with comment 'unset fetch'

To require the inclusion of a comment when the value of a configurable is changed with `p4 configure`, set the dm.configure.comment.mandatory configurable.

## Related commands

The `p4 configure` command replaces many of the settings formerly set by `p4 counter`.

To list all counters and their values | `p4 counters`
To set P4 Server system variables | p4 set

Your search for returned results