Perforce Public Knowledge Base - P4D: Installing A New License File
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



P4D: Installing A New License File

« Go Back


How do I install a new license file?


  1. If you have purchased Helix4Git in addition to Helix Core, you will receive 2 separate emails containing separate license files for each product. Please install only the license file specifically for Helix4Git, as this will allow you to use the functionality of both products. The other license file is for your records and, if installed, would only enable you to use Helix Core.
  2. Before you continue, rename the new license file to be 'license.txt'.

In order to avoid confusion for sites that have multiple servers, your new license file may be named using the license host or IP address, along with other identifying information. Regardless of what the file is named when you receive it, be sure to change the name to license.txt. If you have already an existing file called license in your P4ROOT directory, remove it.

When you add new users, extend support, or when the Perforce Server's IP address or port number changes, you need to install a new license file. To install a new license file, use one of the following three methods:

1. Install the File and Restart the Server

If there are no changes to the IP address or port number in your license file or you are not switching from an unlicensed to a licensed server, you can copy the new license file over the existing license in the P4ROOT directory and the P4 Server will continue running. However, with older server versions (2007.2 and earlier), or if you are changing an unlicensed server to new licensed server, you must restart the Perforce Server instance. 

If the Perforce Server's IP address changes, or the port number in the license file changes, you must also stop and restart the Perforce Server.

Stopping and Restarting

To stop any P4 Server instance: 
p4 -u User -p Server:Port admin stop

To restart the Perforce Server, it depends upon your environment:
  • Windows: open an administrator command prompt and enter this command: 
net start perforce

Note: you can also enter "services.msc" to go to the Service Management Console, find "Perforce", and select "Start".
  • Linux/Unix/Mac: Run the Perforce Server startup script you usually use. If you do not have a Perforce startup script, the following command will start the Perforce Server in Daemon Mode in the specified P4ROOT location. For example:
p4d -r /specify/path/to/P4ROOT -d   

Note: The actual startup string or configuration used in your production environment might be very different than the basic server invocation above.

2. Use the p4 license Command

First available in the 2006.2 Perforce Server, the p4 license command enables Perforce 'super' users to update or display the Perforce license file. This command requires a valid license file already in the Perforce server root directory.

To display your current license:
p4 license -o

To install a new license, enter the command:
cat license.txt | p4 license -i

Or the command:
p4 license -i < license.txt

Note: The general use case for the p4 license command is adding new users or extending support without stopping the server. However, when the server IP address or port number has changed in the license file, the p4 license command will not work. For example, if the IP address changed in the new license file, then you will receive the following message:

Server license IPaddress changed, cannot proceed.

In this case, you must stop and restart the server as detailed above.

Also if 'p4 info' does not indicate a license file update, you must also stop and restart the P4 Server instance.  The reason for the restart can be seen in your Perforce log file.

3. Use the P4V Administration Tool

For server versions 2006.2 and later, you can use the Administration Tool in P4V (available in P4V 2008.1 and later), assuming the IP address or port number has not changed. To install your new licenses using P4V:

  1. Launch P4V (version 2008.1 and later) as a Perforce superuser.
  2. Choose Tools > Administration.
  3. On the Administration Home page, click on the "Load new license file" link and browse to the license file on your local disk.

After successful installation, the Administration tool Home page is updated with the new license information.

Helix Swarm is a free add-on for Perforce.

Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255