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

P4 CLI Documentation | 2026.1

# P4ROOT

The directory in which the P4 Server stores its database files. The versioned files Source files stored in the depot, including one or more revisions to each file. Also known as archive files, archives, and depot files. Versioned files typically use the naming convention 'filename,v' or '1.changelist.gz'. are also stored in this directory by default, but another location can be configured with the server.depot.root configurable.

## Usage notes

Used by Client? | Used by Server? | Command-Line Alternative | Can be set in P4CONFIG file?
--- | --- | --- | ---
No | Yes | `p4d -r directory` | N/A

## Value if not explicitly set

Operating System | Value
--- | ---
All | The current working directory when p4d is run. Windows administrators running the P4 Server back-end process as a service should use `p4 set -S svcname P4ROOT=directory` to set the value of `P4ROOT` for the named service.

## Notes

Create the server root directory before starting the versioning service (`p4d`).

Only the account running `p4d` needs to have read/write permissions in the server root directory.

For more information on setting up a P4 Server installation, see Installing the server in the P4 Server Administration Documentation.

### Show the value of P4ROOT

All Platforms | Windows only
--- | ---
If the server is running, the p4 info command shows the value of `Server root` directory. | Whether the server is running or not, the Windows user who is the Windows administrator can see the value of `P4ROOT` in the output of `p4 set -S Perforce` where Perforce is the service name associated with the P4 Server. In addition to the service name, a Windows service also has a display name. In older versions, such as 2017.1, the display name was also `Perforce`, but later versions have `Helix Core Server` or `P4 Server` as the service display name.

Your search for returned results