Configure the target server for the build server

On the target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'., which we call london in this example, configure the build server. We might name the build server build-1667 because we will configure it to use port 1667:

p4 server build-1667

A default server spec appears.

Spec configuration

On the target server The immediately upstream server for replica servers, edge servers, standby servers, proxies and brokers. See also 'upstream server' and 'central server'., which we call london in this example on line 13, configure the server spec for the build server by adding some configurables and setting their values. In this example, the ServerID is build-1667, the build server host name is build, and its Address is build:1667:

Copy
ServerID:    build-1667
Name:        build-1667
Type:        server
Services:    build-server
Address:    build:1667
DistributedConfig:
    db.replication=readonly
    lbr.replication=readonly
    lbr.autocompress=1
    startup.1=pull -i 1
    startup.2=pull -u -i 1
    startup.3=pull -u -i 1
    P4TARGET=london:1666
    serviceUser=service
    monitor=1 # optional but required if using the 'p4 monitor show' command
    journalPrefix=/p4/journals/build # recommended
    P4TICKETS=/p4/.p4tickets # recommended
    P4LOG=/p4/logs/build.log # recommended
Description:
    Build server pointing to london:1666

For the optional fields, you can use your own naming conventions.

For the Address field, see Communicating port information.

The DistributedConfig: section might contain fields starting any#, such as

any#P4LOG=perforce.log

any#serverlog.file.2=logs/commands.csv

These are options configured on the target server that, by default, apply to any server for which it is a target server. To override such a configurable for the replica, add it before or after the fields containing any#

For example:

any#P4LOG=perforce.log

any#serverlog.file.2=logs/commands.csv

P4LOG=perforce.read-only.log

serverlog.file.2=logs/my-subdirectory/commands.csv

Service user creation

In replicated and multi-server environments, a service user is required. See p4 user in the P4 CLI Reference.

  1. Create the service user for the build server. For example:

    p4 user -f serviceuser

    The default user specification opens in your default editor. To make this user be of type service, add the following line:

    Type: service
  2. Consider creating a group for your service users. See Group for service users (recommended).

  3. The ticket for a service user defaults to unlimited in 2025.2 and later.
    For 2025.1 and earlier: To prevent the service user logins from timing out, you can use the p4 group command to add the service user to a group with the Timeout field set to unlimited. See Tickets and timeouts for service users.

  4. Set the access level for the service user or service user’s group to super in your protections table. See Access level for service users.

  5. Set the level of security to 4 or higher on the target server. See Server security levels.

    For example,

    $ p4 -u super configure set security=4
  6. Ensure the service user is protected with a strong password:
    p4 passwd service

Next step

Configure the build server