An introduction to how Neo4j runs in a Docker container.
The Neo4j Docker image, and instructions on how to start using it, can be found here: https://hub.docker.com/_/neo4j/.
By default, the Docker image exposes three ports for remote access:
Note that when Docker is used, Neo4j is configured automatically to allow remote access to the HTTP, HTTPS, and Bolt services. This is different than the default Neo4j configuration, where the HTTP, HTTPS, and Bolt services do not allow remote connections. For more information on configuring connections, see Section 4.7, “Configure connectors”.
The Docker image also exposes the following volumes.
Directories on the host can be mounted using the
See Section 4.2, “File locations” for details about the directories used by default in different Neo4j distributions.
It is often desirable to keep database and logs outside of the container. The following command will start a container with ports for Bolt and HTTP published, and with the /data and /logs volumes mapped to directories on the host.
docker run \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/data:/data \ --volume=$HOME/neo4j/logs:/logs \ neo4j:3.5
Point your browser at
http://localhost:7474 on Linux or
http://$(docker-machine ip default):7474 on OS X.
All the volumes in this documentation are stored under
$HOME in order to work on OS X where
$HOME is automatically mounted into the machine VM.
On Linux the volumes can be stored anywhere.
By default Neo4j requires authentication and requires you to login with
For security reasons Neo4j will run as the
neo4j user inside the container.
You can specify which user to run as by invoking docker with the
For example, the following would run Neo4j as your current user:
docker run \ --publish=7474:7474 --publish=7687:7687 \ --volume=$HOME/neo4j/data:/data \ --volume=$HOME/neo4j/logs:/logs \ --user="$(id -u):$(id -g)" \ neo4j:3.5
Tags are available for both Community Edition and Enterprise Edition.
Version-specific Enterprise Edition tags have an
-enterprise suffix, for example:
Community Edition tags have no suffix, for example
The latest Neo4j Enterprise Edition release is available as
In order to use Neo4j Enterprise Edition you must accept the license agreement.
© Network Engine for Objects in Lund AB. 2018. All Rights Reserved. Use of this Software without a proper commercial license with Neo4j, Inc. or its affiliates is prohibited.
Email inquiries can be directed to: firstname.lastname@example.org
More information is also available at: https://neo4j.com/licensing/
To accept the license agreement set the environment variable
To do this you can use the following docker argument: