This section describes how to install Neo4j on Debian, and Debian-based distributions like Ubuntu, using the Neo4j Debian package.
To install Neo4j on Debian you need to make sure of the following:
An OpenJDK Java 11 runtime is installed or available through your package manager.
The repository containing the Neo4j Debian package is known to the package manager.
Neo4j 4.4 requires the Java 11 runtime.
Java 11 is not included in Ubuntu 16.04 LTS or Debian 9 (stretch) and will have to be set up manually prior to installing or upgrading to Neo4j 4.4, as described below.
Debian 9 users can find OpenJDK 11 in backports.
Debian 10 and Ubuntu 18.04 onwards already have the Openjdk Java 11 package available through
Neo4j is compatible with Oracle Java on Debian/Ubuntu Linux, but should be installed via tarball. The Debian installer may still be used, but it will install OpenJDK Java 11 in addition to any existing Java installations.
This is due to changes in Oracle’s Debian package manifest between Java versions 8 and 11.
Java 11 must be installed before installing Neo4j on Debian 9 (stretch) systems. If you do not already have Java 11 installed, run the following commands to install OpenJDK Java 11:
echo "deb http://httpredir.debian.org/debian stretch-backports main" | sudo tee -a /etc/apt/sources.list.d/stretch-backports.list sudo apt-get update sudo apt-get install openjdk-11-jre
If you already had a different version of Java installed, see Dealing with multiple installed Java versions to make sure Java 11 is the default version. You are now ready to install Neo4j.
Add the official OpenJDK package repository to
sudo add-apt-repository -y ppa:openjdk-r/ppa sudo apt-get update
You are now ready to install Neo4j, which will install Java 11 automatically if it is not already installed. See Dealing with multiple installed Java versions to make sure you can start Neo4j after install.
It is important that you configure your default Java version to point to Java 11, or Neo4j 4.4.3 will be unable to start.
Do so with the
First list all your installed version of Java with
Your results may vary, but this is an example of the output:
java-1.11.0-openjdk-amd64 1071 /usr/lib/jvm/java-1.11.0-openjdk-amd64 java-1.8.0-openjdk-amd64 1069 /usr/lib/jvm/java-1.8.0-openjdk-amd64
Identify your Java 11 version, in this case it is
java-1.11.0-openjdk-amd64. Then set it as the default with (replacing
<java11name>with the appropriate name from above)
sudo update-java-alternatives --jre --set <java11name>
The Debian package is available from https://debian.neo4j.com.
To use the repository for generally available versions of Neo4j, run:
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add - echo 'deb https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list sudo apt-get update
To avoid the risk of the
aptpackage manager accidentally forcing a database upgrade, different major and minor releases of Neo4j are also available separately inside the repository. To install Neo4j this way, specify the major and minor version required, in place of
We recommend the following method for production or business critical installations:
wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add - echo 'deb https://debian.neo4j.com stable 4.4' | sudo tee -a /etc/apt/sources.list.d/neo4j.list sudo apt-get update
Once the repository has been added into
apt, you can verify which Neo4j versions are available by running:
apt list -a neo4j
In Ubuntu server installations you will also need to make sure that the
This can be fixed by running the command:
To install Neo4j Community Edition:
sudo apt-get install neo4j=1:4.4.3
To install Neo4j Enterprise Edition:
sudo apt-get install neo4j-enterprise=1:4.4.3
Note that the version includes an epoch version component (
1:), in accordance with the Debian policy on versioning.
Versions of Neo4j that are not yet generally available may differ in naming.
The naming structure of packages are normally composed as
Refer to the download page for more information regarding the name of packages.
When installing Neo4j Enterprise Edition, you will be prompted to accept the license agreement. Once the license agreement is accepted installation begins. Your answer to the license agreement prompt will be remembered for future installations on the same system.
To forget the stored answer, and trigger the license agreement prompt on subsequent installation, use
debconf-communicate to purge the stored answer:
echo purge | sudo debconf-communicate neo4j-enterprise
For Neo4j Enterprise Edition, the license agreement is presented in 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 using
echo "neo4j-enterprise neo4j/question select I ACCEPT" | sudo debconf-set-selections echo "neo4j-enterprise neo4j/license note" | sudo debconf-set-selections
If you cannot reach
https://debian.neo4j.com, perhaps due to a firewall, you will need to obtain Neo4j via an alternative machine which has the relevant access, and then move the package manually.
It is important to note that using this method will mean that the offline machine will not receive the dependencies that
are that are normally downloaded and installed automatically when using
Run the following to download the required Debian package:
Neo4j Enterprise Edition:
curl -O https://dist.neo4j.org/deb/neo4j-enterprise_4.4.3_all.deb
Neo4j Community Edition:
curl -O https://dist.neo4j.org/deb/neo4j_4.4.3_all.deb
Manually move the downloaded Debian package to the offline machine.
Run the following on the offline machine to install Neo4j:
sudo dpkg -i <deb file name>
File locations for all Neo4j packages are documented here.
Most Neo4j configuration goes into neo4j.conf.
For operating systems using
systemd, some package-specific options are set in neo4j.service and can be edited using
systemctl edit neo4j.service.
For operating systems that are not using
systemd, some package-specific options are set in /etc/default/neo4j.
|Environment variable||Default value||Details|
Timeout in seconds when waiting for Neo4j to stop. If it takes longer than this then the shutdown is considered to have failed. This may need to be increased if the system serves long-running transactions.
Maximum number of file handles that can be opened by the Neo4j process.
Was this page helpful?