Upgrade or patch Neo4j 5

This page is an overview of what needs to be checked and completed to ensure your upgrade goes smoothly and as planned.

It is recommended to read the Introduction before continuing.

Review changes

Review the Release Notes to see what has been introduced or changed in the new version.

Standalone

The steps to upgrade a standalone Neo4j server (one that’s not part of a cluster) are:

  1. Stop the old Neo4j server.

  2. Install the new version of Neo4j.

  3. Start the new Neo4j server.

We recommend the use of a package manager to install Neo4j 5. If you use a package manager then an upgrade can be performed with one command:

(sudo) yum update neo4j

When you restart the Neo4j server, it is a good idea to monitor the logs for any errors or warnings caused by the upgrade. The neo4j.log file contains information on the upgrade.

Follow the links to some walkthroughs of upgrading a range of Neo4j standalone installations:

Clusters

There are two strategies to upgrade a basic cluster:

  • New server rolling upgrade - A new server is added before an existing server is taken offline. This approach keeps the cluster available and fault-tolerant throughout the upgrade. This approach is suitable for deployments that use replaceable cloud or container resources.

  • In-place rolling upgrade - Each server is taken offline and upgraded one at a time. The server is reconnected to the cluster before the next is taken offline. This approach keeps the cluster available throughout the upgrade. However, it does reduce fault tolerance while each server is offline.

Should the data stores fall out of sync during the process, you may need to re-seed the cluster. For more information, see Operations Manual → Seed a cluster.
If you want to upgrade from a version in the range [5.0-5.6] to a version in the range [5.10-5.15], first upgrade to version 5.9 before upgrading to the desired version. For example, to upgrade a cluster from 5.4 to 5.13, it is necessary to first upgrade to version 5.9 before upgrading to version 5.13. Upgrading to version 5.16 does not require any intermediate steps. For example, a 5.4 cluster can be upgraded directly to the latest version.

Follow the links to some walkthroughs of upgrading a range of Neo4j cluster installations:

To upgrade a analytics cluster, that is, a cluster with a single primary for system and one or more system secondaries (using the setting server.cluster.system_database_mode), it is important to upgrade the secondaries before you upgrade the primary. If not, the primary automatically updates the system database, and the secondaries are no longer compatible. Similarly to in-place rolling upgrades, the steps for an individual server are identical to upgrading a standalone server.