Upgrade P4 Server from 2019.1 or later (single server) - Linux

You can upgrade P4 Server to allow users to take advantage of features introduced in later releases. Earlier P4 applications should continue to work with newer versions of P4 Server.

Upgrading to 2026.1 or later increases the default security level. This can affect:

  • Authentication behavior.

  • Password requirements.

  • API clients and scripts.

This can cause existing scripts or integrations to fail if they rely on previous authentication behavior. To learn more, see Important security update: Secure by default.

For multi-server environments, see Upgrade P4 Server from 2019.1 or later to latest (multi-server).

Before you upgrade

These steps help reduce the risk of data loss or upgrade failure. Ensure you complete the following:

  • Review the release notes for the version you are installing

  • Ensure you have super access to the server.

  • Inform users of planned downtime

  • If you installed P4 Server using Linux packages, ensure the Perforce package repository is configured. See Perforce Packages.

    The Perforce packaging key expired on 14 August 2023 and was renewed until 11 June 2026 (UTC).

    Package managers do not allow installation with an expired key. Ensure the updated key is installed on the system. See Perforce Packages.

  • If you have an installation of the Git Connector, upgrade your Git Connector installation before upgrading your P4 Server. See Upgrade Git Connector.
  • Confirm your license is valid for the P4 Server version you are upgrading to. To learn more, see License statements.

  • Identify P4ROOT.

  • Confirm journaling is enabled.

  • Take a checkpoint.

  • Verify file integrity.

To learn more, see Before you upgrade.

Upgrade for proxy, broker, and offline database

A proxy or broker only needs to get the latest binary.

You do not need to run p4d -xu against offline db.* files. An offline database is a set of db.* files periodically made current by replaying the journal files from the production server.

Hosts with multiple P4 Server instances

A single Linux host can run multiple P4 Server instances.

If you installed P4 Server using packages and want to prevent unintended upgrades, lock or pin the version:

APT (pin a version):

/etc/apt/preferences.d/p4d
Package: p4-server
Pin: version 2025.2.*
Pin-Priority: 1000

YUM/DNF (version lock):

Use version locking or --exclude to control upgrades.

The --exclude option supports wildcards.

The versionlock plugin does not allow patch-level upgrades.

Alternatively, you can install a base package to allow automatic patch updates:

apt-get install p4-server-base-r25.2
sudo update-alternatives --config p4-server

To run different P4 Server versions on the same host, update the p4dctl configuration for each server to use the required binary. For example:

  • For Server 1, run: /opt/perforce/sbin/p4d.23.1

  • For Server 2, run: /opt/perforce/sbin/p4d.22.2

Update P4 Server

Use an OS package manager to update an existing P4 Server installation on Linux:

  • Ubuntu (apt)

  • CentOS / Red Hat Enterprise Linux (RHEL) (yum or dnf)

  • SUSE Linux Enterprise Server (SLES) (zypper)

1. Verify and correct the P4D binary path

As a general rule:

  • If you installed P4 Server using a package, update using a package.

  • If you installed P4 Server with a binary, update using a binary.

The steps in this guide outline how to update using a package.

If your server was installed manually using a .tgz archive, the p4d binary may be located in a custom path such as /opt/perforce/bin/p4d. OS package installations typically use /usr/sbin/p4d.

Before upgrading, verify that the server is using the correct binary. To check the installed binary, run which p4d:

  • Expected output: /usr/sbin/p4d.

  • If the output shows a different path (for example, /opt/perforce/bin/p4d), the server is using a manually installed binary.

2. Check for an available update

To check if an update for your P4 Server is available, run one of the following:

  • Ubuntu:

    sudo apt-get update
    apt-cache madison p4-server
  • CentOS/RHEL:

    yum --showduplicates list p4-server
  • SUSE Linux Enterprise Server:

    sudo zypper search -s helix-p4d

If a newer version is available, it is listed in the output.

If you see the error "Unable to locate package helix-p4d or p4-server", you need to add the Perforce repository. See Perforce Packages.

3. Stop the server

To stop a running server, run the following as a user with the required access level:

p4 admin stop

This is a consistent and safe method to stop the server. To learn more, see p4 admin.

If using p4dctl, run p4dctl stop <service-name>.

Do not use p4dctl stop -a to stop a server, as this can stop multiple servers unintentionally.

4. Take a checkpoint

Skip this step if you have already taken a checkpoint.

To take a checkpoint, run one of the following:

  • p4d -r <P4ROOT> -jc

  • sudo -u perforce p4dctl checkpoint <service-name>

Verify that:

  • A checkpoint is created successfully.

  • No errors are reported.

5. Install the updated P4 Server package

Use your system package manager to install the latest version of P4 Server.

Examples:

  • Ubuntu/Debian:

    sudo apt update
    sudo apt-get install p4-server
  • RHEL/Rocky/AlmaLinux:

    sudo yum install p4-server
  • SUSE Linux Enterprise Server:

    sudo zypper install helix-p4d
Alternatively, get a new version of the P4D binary from the downloads page and replace the existing version on the file system.

The package manager updates the P4D binary but does not upgrade the server database. You must do this manually.

6. Important: Upgrade the database schema

Ensure all services are stopped before upgrading the database schema.

Upgrade using the standard method

  1. Run sudo p4d -r <P4ROOT> -xu.

  2. Wait for the success message.

If you are using offline databases, do not run  p4d -r <P4ROOT> -xu against offline db.* files. An offline database is a copy of the db.* files that is periodically updated by replaying journal files from the production server.

Running p4d -xu creates a file named state.xu in P4ROOT. This file records the database schema upgrade level and is checked each time the server starts. To learn more, see The state.xu file.

The database upgrade completes when the server starts.

If you are upgrading to P4 Server 2026.1 or later, a warning about increased security defaults is displayed. This is informational only. Review the new defaults to avoid disruptions to authentication or automation.

Upgrade using P4 Server Control (p4dctl)

If the server is managed by P4 Server Control, ensure that the database schema upgrade command is run with the correct user and environment.

To upgrade the database schema, run p4dctl exec -t p4d <service-name> -- -xu. This applies whether the P4 Server was created by configure-helix-p4d.sh or the server was manually configured to use p4dctl.

For more information, see exec in p4dctl commands.

7. Start the server

  1. To start the server services, run one of the following:

    • sudo systemctl start p4d

    • sudo -u perforce p4dctl start <service-name>.

  2. Verify the server is running. Run one of the following:

    • sudo systemctl status p4d

    • sudo -u perforce p4dctl status <service-name>.

    Expected output: <service-name> running.

8. Verify the upgrade

  1. Run p4 info.

  2. Confirm that:

    • The server version matches the expected release.

    • The server is running without errors.

9. Test basic operations

Run the following:

  • p4 users

  • p4 clients

Check that the commands run successfully and return the expected results.

The P4 Server upgrade is complete. Users can now resume normal operations.