In response to your many requests, we’re happy to announce our first semi-official (i.e. beta release) Neo4j-Docker image.
It is semi-official, because it doesn’t yet come with guarantees or official customer support and has not been as battle-tested as the rest of our product packaging. So expect the regular issues you might run into with any beta release.
First of all, I want to thank everyone in our community who already provided great Docker images for Neo4j. We took inspiration from those first attempts when creating our own. Special thanks to Abed Halawi, Kenny Bastani, and Ben Butler-Cole.
We’re also grateful for the feedback that we already got in the discussion with these authors around the requirements and realisation of the image.
# interactive with terminal docker run -i -t --rm --name neo4j -v $HOME/neo4j-data:/data -p 8474:7474 neo4j/neo4j # as daemon running in the background docker run -d --name neo4j -v $HOME/neo4j-data:/data -p 8474:7474 neo4j/neo4j
The data-directory, containing the
auth etc. resides on your host system outside of the image. It can be just any empty directory or a (copy of a) data directory of a (not-running) Neo4j-server. You can mount it with the
Then, access http://localhost:8474 (or whatever port you exposed) on your machine to use Neo4j.
On OSX you have to use
There are several tags available:
2.2.3: Neo4j Community 2.2.3 Stable Version
2.3-M02: Neo4j Community 2.3-M02 Milestone Preview
latest: latest stable version (now 2.2.3) (master)
These are built from the appropriate branches of the GitHub Repository.
There are also other branches (e.g. for creating Docker images on RedHat Enterprise Linux) which will be the focus of a follow-up article.Dockerfile on GitHub:
- based on ubuntu + java8 image
download and extract the correct Neo4j community version to
/datadirectory within volume
- update some configuration values (enable shell, set max tx-log-file size, data directory, fix RRD issue)
7473for http(s) and
add and run a start script named
- the start script sets some runtime configuration parameters
- starts Neo4j in console mode
1. Build & Run:
git clone https://github.com/neo4j-contrib/docker-neo4j cd docker-neo4j docker build . # note the resulting image-id # name your image with `--name` # run the image, `-i -t` stand for interactive and terminal so you can stop the server with ctrl-c # `--rm` deletes the image instance after it has stopped # pass in the path to an existing neo4j `data` directory or just an empty directory # `-d` would run it in detached daemon mode, which is the opposite of `-i -t` # docker run -i -t --rm --name neo4j -v </path/to/neo4j/data-dir>:/data -p <external port>:7474 <image-id> # for example: docker run -i -t --rm --name neo4j -v $HOME/neo4j-data:/data -p 8474:7474 <image-id>
2. Open in browser:
On OSX use boot2docker and replace localhost with the IP from
Please note that Neo4j 2.2.x requires authentication. You have to login with
neo4j/neo4j at the first connection and set a new password. Or use the appropriate [REST endpoint] to configure the initial password. The
auth credentials are stored in the
/data/dbms/auth file, which will reside in the data directory on your host filesystem.
You can also access the Neo4j log-files in
If you set an environment variable
NEO4J_NO_AUTH to a non-empty value, Neo4j’s authentication will be disabled when the Neo4j server in the image is started.