How-To: Install And Configure Neo4j On Ubuntu 22.04

This guide contains instructions on how to install and perform basic configuration of the community edition of Neo4j on a Ubuntu 22.04 machine.

Installation

01. Open a terminal window

02. Update the package repository list

$ sudo apt update

03. Install Java. This will install the default JDK, currently OpenJDK 11 at the time of this writing. Other possible candidates are Oracle Java 8 or IBM Java 8. Enter with y, when asked to confirm installation. For installation and management of Java, see here[link to article].

$ sudo apt install default-jdk

04. Verify that Java has been installed.

$ java -version

05. Update the package repository to include Neo4j.

$ sudo wget -O - https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
$ echo 'deb https://debian.neo4j.com stable latest' | sudo tee /etc/apt/sources.list.d/neo4j.list
$ sudo apt-get update

06. Install Neo4j, Enter y when asked to confirm.

$ sudo apt install neo4j

07. Verify that Neo4j has been installed.

$ neo4j --version

Accept database connection from anywhere

Use only in a development environment, this poses a security concern when applied in a production environment.

01. Edit the neo4j configuration

$ sudo nano /etc/neo4j/neo4j.conf

02. Un-comment the following config to make the Neo4j web browser accessible anywhere.

dbms.default_listen_address=0.0.0.0

 

03. Restart the services to apply the changes

$ sudo service neo4j restart

Disable web authentication

Use only in a development environment, this poses a security concern when applied in a production environment.

01. Edit the neo4j configuration

$ sudo nano /etc/neo4j/neo4j.conf

02. Un-comment the following config to disable authentication.

dbms.security.auth_enabled=false

03. Restart the services to apply the changes

$ sudo service neo4j restart

Accessing the web console

01. View the important information by performing a curl on http://127.0.0.1:7474.

02.  Access the web console at http://127.0.0.1:7474 or http://{[public-ip-address}}:7474 or the domain when mapped with a DNS.

Note: The following images uses ports that are 37474 and 37687, these are tunnelling through a different port. If installed on a local machine it will be accessible via http://127.0.0.1:7474 and the bolt direct at bolt://127.0.0.1:7687.

The default password for the neo4j user is neo4j, but if authentication was disabled, this can be left blank.

Uninstalling Neo4j

01. Uninstall neo4j. Confirm the removal with “y”.

$ sudo apt remove neo4j

02. Perform cleanup, removing unused packages like the Cypher Shell.

$ sudo apt autoclean$ sudo apt autoremove

 

Previous Listen Up: Meet Our Multicloud Mindset Series On Twitter Spaces
Next New European Union Cybersecurity Proposal Takes Aim At Cybercrime