Connect to Neo4j

We can use the Neo4j Docker container to run Neo4j without needing to deal with a complicated setup. For this demo, the following command can be run from a terminal to start the Docker container:


docker run --rm \
-d \
--publish=7475:7474 --publish=7688:7687 \
--name=neo4j \
--env NEO4J_AUTH=neo4j/test \
neo4j:latest

We can navigate to the Neo4j Browser via the specified port: http://localhost:7475/browser/. To connect to Neo4j, we then fill in the rest of the information specified in the command; note that NEO4J_AUTH contains the username and password for the Neo4j database in the Docker container (Fig 3). Do not forget to change the port settings in the browser window, the neo4j or bolt connection needs to be set to 7688 rather than the default 7687.

Interface of Neo4j Browser with bolt://localhost:7688 as connecting URL and username / password authentication.
Figure 3: Interface of Neo4j Browser with bolt://localhost:7688 as connecting URL and username / password authentication.