View and install the license file

This topic assumes you have read Server Licensing and received a license file.

View current license information

You can update an existing license file without stopping the P4 Server by using the p4 license command. .

  • If the server is up, any user can run p4 info to view basic licensing information. Hide sensitive information from unauthorized users of p4 info by setting the dm.info.hide configurable.
  • If the server is down, you can also obtain licensing information in any of these ways:
    • Run p4d -V from the server root directory where the license file resides.
    • Run p4d -V when the P4ROOT variable is set to the server’s root directory.
    • Run the p4d -V -r server_root command, where server_root represents the server root directory.
  • Administrators can use p4 license -u to obtain more detailed information about how many users and files are in use.
  • The p4 license -L command lists the server IP and MAC addresses to use when requesting a valid license from Perforce Support.

Install the license file

When you receive your license file, it might include the licensed host name, an IPv4 address, an IPv6 address, or a MAC address, as well as other identifying information.

  1. Ensure the address matches the required format.

    Type Format of the address

    MAC

     

    Use the colon (:) separator. For example,

    98:43:fa:2c:23:bd

    IPV6

     

    Enclose in square brackets. For example, on Windows:

    ssl6:[2001:db8:a::21d:4fff:fe4a:8c60]:1666

    and on Linux/macOS:

    ssl6:[2001:db8:a::21d:4fff:fe4a:8c60%2]:1666

    where %2 represents the "Interface" integer that appears when you run the p4 license -L command. For example,

    IPv6 Address (Interface 2): 2001:db8:a::21d:4fff:fe4a:8c60
    

    Square brackets avoid confusion with the P4PORT values that use colons. For example,

    ssl6:2001:db8:a::21d:4fff:fe4a:8c60:1666

    To learn more, see the set of P4PORT protocol values at P4PORT in the P4 CLI Reference.

    IPv4

    For example,

    10.90.1.85:1666

    FQDN Fully qualified domain name (FQDN) address:

    SE-1AB23CD.ab.cd:1666

    An FQDN address resolving to only an IPv6 address might have the prefix of tcp6, tcp64, or tcp46:

    tcp64:abcde.com:1602

  2. Copy the original license file in the P4ROOT directory to a safe place.

  3. Rename the license file you received to license.

  4. Add or update the license file.

    Do one of the following: Steps

    If the server address or port has changed:

     

    1. Stop the server:

      p4 -u User -p Server:Port admin stop
    2. Copy new license file to the P4ROOT directory of the server.

    3. Start the server:

    • Windows: Open an administrator command prompt and enter

      net start perforce
    • Linux/UNIX/MacOS: Run the server start-up script you usually use.
      If you do not have a start-up script,
      the command to start the server in Daemon Mode
      in the specified P4ROOT location might resemble the following:

      p4d -r /specify/path/to/P4ROOT -p 12.34.567.89:1666 -d

    If the server address and port remain unchanged and you are using P4 CLI:

     

    1. Display the current license, if it exists:

      p4 license -o
      
    2. Install your new license:

      cat license | p4 license -i
      

      or

      p4 license -i < license

    To learn more, see the p4 license command in the P4 CLI Reference.

    If the server address and port remain unchanged and you are using P4 Admin:

     

    1. Start P4V as a P4 Server superuser.

    2. Choose Tools > Administration, which opens P4 Admin in a new window.

    3. On the P4 Admin Home tab, click Load new license file and browse to the license file on your local disk.

    4. Verify that the Home tab is updated with the new license information.

    To learn more, see Install or update the license file in the P4 Admin Documentation.

Troubleshoot

If your license causes an error message about ExtraCapabilities:

ERROR:
Error in license specification.
Error detected at line 31.
Unknown field name 'ExtraCapabilities'.

upgrade your P4 Server to one of the following (or later) versions:

  • 2021.2 (2021.2/2201121)

  • 2021.1 patch 1 (2021.1/2156517)

  • 2020.2 patch 6 (2020.2/2152297)

  • 2020.1 patch 8 (2020.1/2138914)

  • 2019.2 patch 14 (2019.2/2136041)

If you are unable to upgrade at this point, you can use a 'Legacy' license without 'ExtraCapabilities'. You might already have this second license file. If not, Request Support.