Windows installation: Quickstart
If you already have an installation and now want a more recent version, see Upgrade P4 Server.
To learn how to install and secure a P4 Server on Windows, watch this video or read the instructions following the video.
Install P4 Server
These steps assume you are installing P4 Server for the first time. If you are upgrading P4 Server, see Upgrade P4 Server.
-
Log on to Windows with Administrator privileges.
-
Download P4 Server for Windows from the Perforce website.
-
Install P4 Server using the downloaded installer binary.
-
In Select Applications:
-
Choose the features to install. By default, P4 Server (P4D) and P4 CLI (P4) are selected.
-
(Optional:) Change the primary install directory. By default, this is
C:\Program Files\Perforce.
-
-
In Server Configuration:
-
Enter a Port Number. By default, this is
1666. -
In P4ROOT, create or choose the default server location. For example,
C:\P4ROOT.
-
-
In Client Configuration:
-
In Server, type in
<machine-name>:1666where<machine-name>is the name of your machine and port number is what you entered previously. To run P4 Server on your machine, enterlocalhost:1666. -
In User Name, enter a user name. The user name is required to create the first Perforce user account that will connect to your P4 Server. This first user will be the super user.
When you first open P4 Server, you must assign a password to the super user. To learn more, see Create a password for the first user.
-
-
Click Next and then Install.
-
Once the installation is complete, check that P4 Server is running by opening a command window and running the following:
p4 -p <machine name>:1666 info
For example, p4 -p localhost:1666 info
If the server has been installed, this outputs information about the server.
Create a password for the first user
As of P4 Server 2026.1, new server installations automatically use a secure by default configuration that aligns with Perforce security best practices. As part of this configuration, all users, including super users, must have a password assigned to them. To learn more, see Important security update: Secure by default.
When you install P4 Server, the first user account is created during installation. This user is the super user, but no password is assigned to the account. You must assign a password before using the account to administer the server.
To assign a password to a super user:
-
Open a command window:
-
Run
p4 passwd -
Enter a secure password for the super user.
A
Password updatedsuccess message is shown.
(Optional:) To test to password:
-
Run
p4 logout -
Run
p4 login -
Enter your password. For a new installation, there is only one user account.
If working correctly, a
User <username> logged insuccess message is shown.
You can now connect to the server using your super user account.
Connect to P4 Server using P4V
To connect to P4 Server, you need a client application such as P4V.
To install P4V:
-
Download P4V for Windows from the Perforce website.
-
Install P4V using the downloaded installer binary.
-
On the Select Applications screen, select all applications. This includes:
-
P4 Visual Client (P4V) (P4V)
-
P4 Merge - A merging and file comparison tool
-
P4 Admin - A visual administration client for P4 Server
-
P4 - The command-line client for P4 Server
-
-
Click Next.
-
On the Client Configuration screen, enter or select the following information:
-
Server: This is your P4 Server address. If you are setting up P4 Server on your machine, enter
localhost:1666. Otherwise, enter<machine-name>:1666, where<machine-name>is the name of your machine. -
User Name: This is the user name for the super user created during the P4 Server installation.
-
Text Editing Application: Accept the default editor or click Browse to select a different application.
-
-
Click Next.
-
On the Ready to install screen, click Install to start installation. If you are prompted to allow the installer to make changes to your computer, click Yes.
-
When the installation is complete, click Exit.
P4V opens, unless you selected not to open it.
P4V is now installed. You can now connect P4 Server and P4V. For more information on setting up the initial connection, see Connect to P4 Server. in the P4 Visual Client (P4V) Documentation.
If you see the error message about distributed version control
If you see the error message, "Helix Versioning Engine cannot be installed because setup has detected that this machine is already configured for distributed version control":
- Locate the
p4d.exefile in the DVCS folder. - Remove it or rename it.
- Run the installer.
This is a legacy message and Helix Core has now been renamed to P4.
To learn more, see the Perforce Knowledge Base article, Error Installing P4 Server on Windows.
Support for long file names on Windows
On Windows systems, file paths are traditionally limited to 260 characters. P4 Server can be configured to support long file names and paths that exceed this limit.
You typically only need to review or modify this setting if:
-
You are using a version of P4 Server older than 2015.2.
-
You work with tools that generate very deep directory structures.
-
You encounter errors related to Windows path length limits.
Default behavior
For P4 Server 2015.2 and later, long file name support is enabled by default. For earlier versions, it is disabled by default and must be enabled manually by setting filesys.windows.lfn=1.
For example:
p4 configure set filesys.windows.lfn=1
When enabled, P4 Server supports:
-
Paths up to 32,767 characters
-
Individual path components up to 255 characters
Client and proxy considerations
Depending on the depth of your workspace paths, you might also need to enable long file name support on:
-
Client machines
-
Proxies (which operate as clients)
To enable long file name support for a Windows proxy service, run:
p4 set -S "Perforce Proxy" P4DEBUG=filesys.windows.lfn=1
Only set this value when required by your environment.
What's next
After you have set up P4 Server and P4V, you can:
-
Configure an administrative user. See the Configure an administrative user in the Getting Started with P4 documentation.
-
Secure your P4 Server. See Secure the server.
To learn how to start, stop, and manage the P4 Server service, see Manage the P4 Server Windows service.