Deploy Neo4j using the Neo4j RPM package

You can deploy Neo4j on Red Hat, CentOS, Fedora, or Amazon Linux distributions using the Neo4j RPM package.

Java prerequisites

Neo4j 5 requires the Java 17 runtime.

OpenJDK Java 17

Most of our supported Linux distributions have OpenJDK Java 17 available by default. Consequently, no extra setup is required if you are using OpenJDK Java, the correct Java dependency will be installed by the package manager when installing Neo4j.

Oracle Java 17

There is some minor setup required for compatibility with Oracle Java 17 because Oracle and OpenJDK provide incompatible RPM packages for Java 17.

We provide an adapter for Oracle Java 17 which must be installed before Neo4j. The adapter contains no code, but will stop the package manager from installing OpenJDK 17 as a dependency despite an existing Oracle Java 17 installation.

  1. Download and install the Oracle Java 17 JDK from the Oracle website.

  2. Install the adapter:

    sudo yum install

    The SHA-256 of the adapter package can be verified against

Zulu JDK 17 or Corretto 17

If you wish to use a non-default JDK, it must be installed prior to starting the Neo4j installation. Otherwise your package manager will install the default java distribution for your operating system, usually OpenJDK.

Installation instructions can be found on the manufacturer’s website:

Install on Red Hat, CentOS or Amazon Linux

Set up the repository

To use the repository for generally available versions of Neo4j, run the following as root to add the repository:

rpm --import
cat <  /etc/yum.repos.d/neo4j.repo
name=Neo4j RPM Repository

Install Neo4j

  • To install Neo4j Community Edition as root:

    yum install neo4j-5.2.0
  • To install Neo4j Enterprise Edition as root:

    yum install neo4j-enterprise-5.2.0

Neo4j supports Security-Enhanced Linux (SELinux), by default.

Non-interactive installation of Neo4j Enterprise Edition

When installing Neo4j Enterprise Edition, you will be required to accept the license agreement before installation is allowed to complete. This is an interactive prompt. If you require non-interactive installation of Neo4j Enterprise Edition, you can indicate that you have read and accepted the license agreement by setting the environment variable NEO4J_ACCEPT_LICENSE_AGREEMENT to yes:

NEO4J_ACCEPT_LICENSE_AGREEMENT=yes yum install neo4j-enterprise-5.2.0

Install on SUSE

For SUSE-based distributions the steps are as follows:

  1. Use the following as root to add the repository:

    zypper addrepo --refresh neo4j-repository
  2. Install Neo4j.

    • To install Neo4j Community Edition as root:

      zypper install neo4j-5.2.0
    • To install Neo4j Enterprise Edition as root:

      zypper install neo4j-enterprise-5.2.0

Offline installation

If you cannot reach to install Neo4j using RPM, perhaps due to a firewall, you will need to obtain Neo4j via an alternative machine which has the relevant access, and then move the RPM package manually.

It is important to note that using this method will mean that the offline machine will not receive the dependencies that are normally downloaded and installed automatically when using yum for installing Neo4j; Neo4j Cypher Shell and Java.

For information on supported versions of Java, see System requirements.

Downloading the RPM installers

The Cypher Shell RPM package can be downloaded from Neo4j Download Center.

  1. Run the following to obtain the required Neo4j RPM package:

    • Neo4j Enterprise Edition:

      curl -O
    • Neo4j Community Edition:

      curl -O
  2. Manually move the downloaded RPM packages to the offline machine.

If using Oracle Java 17, the same dependency issues apply as with the Oracle Java prerequisites. You will need to additionally download and install the Java adaptor described in that section.

Performing an offline installation

Before installing Neo4j, you must manually install the required Java 17 packages. Then, Neo4j and Cypher Shell can be installed by running the following commands as root user:

rpm --install <Cypher Shell RPM file name>
rpm --install <Neo4j RPM file name>

Offline upgrade from 4.4.0 or later

Before you begin, you will need to have Java 17 pre-installed and set to the default Java version. If using Oracle Java 17, the same dependency issues apply as with the Oracle Java prerequisites.

Due to strict dependencies between Neo4j and Cypher Shell, both packages must be upgraded simultaneously. Run the following on the offline machine as root, to install Neo4j Cypher Shell and Neo4j simultaneously:

rpm -U <Cypher Shell RPM file name> <Neo4j RPM file name>

This must be one single command, and Neo4j Cypher Shell must be the first package in the command.