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

P4 Server Administration Documentation | 2026.1

# Run the broker

After you have created your configuration file, start the P4 Broker from the command line by issuing the following command:

    p4broker -c config_file

Alternatively, you can set `P4BROKEROPTIONS` before launching the broker and use it to specify the broker configuration file (or other options) to use.

For example, on Unix:

    export  P4BROKEROPTIONS="-c /usr/perforce/broker.conf" p4broker -d

and on Windows:

    C:\> p4 set -s P4BROKEROPTIONS="-c c:\p4broker\broker.conf"
    C:\> p4broker

The P4 Broker reads the specified broker configuration file, and on Unix platforms the `-d` option causes the P4 Broker to detach itself from the controlling terminal and run in the background.

To configure the P4 Broker to start automatically, create a startup script that sets `P4BROKEROPTIONS` and runs the appropriate `p4broker` command.

On Windows systems, you can also set `P4BROKEROPTIONS` and run the broker as a service. This involves the following steps:

    C:\> cd C:\p4broker\
    C:\p4broker\> copy p4broker.exe p4brokers.exe
    C:\p4broker\> copy "C:\Program Files\Perforce\Server\svcinst.exe" svcinst.exe
    C:\p4broker\> svcinst create -n P4Broker -e "C:\p4broker\p4brokers.exe" -a
    C:\p4broker\> p4 set -S P4Broker P4BROKEROPTIONS="-c C:\p4broker\p4broker.conf"
    C:\p4broker\> svcinst start -n P4Broker

`svcinst.exe` is a standard Windows program. `P4 Broker` is the name given to the Windows service. For more information, see the Perforce Knowledge Base article, Installing P4 Broker on Windows and Unix systems.

Your search for returned results