Debian-based distributions (.deb)
You can install Neo4j on Debian, and Debian-based distributions like Ubuntu, using the Neo4j Debian package.
Java prerequisites
Neo4j 2025.x requires the Java 21 runtime (default). Starting with Neo4j 2025.10, Java 25 is also supported.
OpenJDK Java 21
Most of the supported Linux distributions have OpenJDK Java 21 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 JDK, Zulu JDK, or Corretto JDK
If you wish to use a non-default JDK, it must be installed before starting the Neo4j installation. Otherwise, your package manager installs the default Java distribution for your operating system, usually OpenJDK.
Java download and installation instructions can be found on the manufacturer’s website:
Dealing with multiple installed Java versions
You must configure your default Java version to point to Java 21 or Java 25 (starting with Neo4j 2025.10), or Neo4j 2025.10.0 will be unable to start.
Do so with the update-java-alternatives
command.
-
List all your installed versions of Java with
update-java-alternatives --list
.Your results may vary, but this is an example of the output:
java-1.25.0-openjdk-amd64 2511 /usr/lib/jvm/java-1.25.0-openjdk-amd64 java-1.21.0-openjdk-amd64 2111 /usr/lib/jvm/java-1.21.0-openjdk-amd64 java-1.17.0-openjdk-amd64 1711 /usr/lib/jvm/java-1.17.0-openjdk-amd64
-
Identify your Java 21 version (default) from the list of installed Javas. In this case, it is
java-1.21.0-openjdk-amd64
. -
Set Java 21 as the default by replacing
<java21name>
with its name:sudo update-java-alternatives --jre --set <java21name>
-
Confirm which version of Java is the default using
java -version
.
Installation
Add the repository
The Debian package is available from https://debian.neo4j.com.
-
To add the Neo4j repository to the package manager, run the following as a
sudo
user:wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' | sudo tee -a /etc/apt/sources.list.d/neo4j.list sudo apt-get update
-
Once the repository has been added to
apt
, you can verify which Neo4j versions are available by running:apt list -a neo4j
In Ubuntu server installations, you also need to make sure that the
universe
repository is enabled. If theuniverse
repository is not present, the Neo4j installation will fail with the errorDepends: daemon but it is not installable
.This can be fixed by running the command:
sudo add-apt-repository universe
Install Neo4j
To install Neo4j, run one of the following commands depending on which version you want to install.
Note that the version includes an epoch version component (1:
), following the Debian policy on versioning.
-
Neo4j Community Edition (CE):
sudo apt-get install neo4j=1:2025.10.0
-
Neo4j Enterprise Edition (EE):
sudo apt-get install neo4j-enterprise=1:2025.10.0
You will be prompted to accept either the commercial or the evaluation license agreement before the 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
If you require non-interactive installation of Neo4j Enterprise Edition, you can indicate that you have read and accepted the license agreement using
debconf-set-selections
:echo "neo4j-enterprise neo4j/accept-license select Accept commercial license" | sudo debconf-set-selections
Offline installation
If you cannot reach https://debian.neo4j.com
, perhaps due to a firewall, you need to obtain Neo4j via an alternative machine that has the relevant access, and then move the package manually.
It is important to note that using this method means that the offline machine will not receive the dependencies that are normally downloaded and installed automatically when using
|
-
Run the following to download the required Debian software package:
-
Neo4j Community Edition:
curl -O https://dist.neo4j.org/deb/neo4j_2025.10.0_all.deb
-
Neo4j Enterprise Edition:
curl -O https://dist.neo4j.org/deb/neo4j-enterprise_2025.10.0_all.deb
To list all files that the Debian software package (
.deb
file) installs:dpkg --contents neo4j_2025.10.0_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
File locations for all Neo4j packages are documented here.
Operation
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 |
---|---|---|
NEO4J_SHUTDOWN_TIMEOUT |
120 |
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. |
NEO4J_ULIMIT_NOFILE |
60000 |
Maximum number of file handles that can be opened by the Neo4j process. |
Starting the service automatically on system start
On Debian-based distributions, run the following command to ensure that Neo4j starts automatically at boot time:
sudo systemctl enable neo4j
Before starting up the database for the first time, it is recommended to use the If the password is not set explicitly using this method, it will be set to the default password For more information, see Set an initial password. |
For more information on operating the Neo4j system service, see Neo4j system service.
Access Neo4j
By default, Neo4j Community Edition does not include graph tools such as visualization, data exploration, and monitoring. However, you can use the Neo4j Aura console to access these features for free. No subscription is required.
-
Sign up or log in to the Aura Console.
-
On the Instances page, click the Self-managed tab and then + Add deployment button.
-
Select URL Connection.
-
Provide a Name and Connection URL. If you have installed Neo4j locally on your system, you can connect to http://localhost:7474.
-
Click the Connect dropdown to launch various graph tools such as Query, Explore, and Dashboards.
-
Type the username
neo4j
and your password or the default passwordneo4j
. You will be prompted to change the latter upon first login.
You are now connected and can use the Aura Console to run Cypher queries, visualize graphs, and optionally monitor your local Neo4j database in Neo4j Aura. For details, see Get started with Neo4j.
Alternatively, you can use the Neo4j Browser, a web-based user interface for interacting with Neo4j that is included with the Neo4j installation.
To access the Neo4j Browser, open a web browser and navigate to http://localhost:7474.
Connect using the username neo4j
with your password or the default password neo4j
.
If the default password is used, you will be prompted to change it upon first login.
Uninstall Neo4j
Follow these steps to uninstall Neo4j:
-
(Optional) Create a backup to avoid losing your data.
-
Uninstall Neo4j by running the following command:
sudo apt remove neo4j