Brain Annex : Full-Stack Data/Knowledge Management with Neo4j
HomeTech StackGuideHistoryDownload/InstallContact
Install the Neo4j Database Administer Neo4j First-Time App Deployment Routine Upgrades Start Web App

Administer Neo4j


Start/Stop the database

Test Neo4j access

Containerized Neo4j




Start/Stop the Neo4j database

Upon the initial install, the database will be in a stopped state.

On a side note, if you ended up using the "Neo4j Desktop" program (NOT covered in this guide) with a local database, it's quite convenient to use that program to stop/start the database. (But beware, as mentioned in the install guide, about being on the correct version of the Neo4j database!)

Otherwise, do the following:


TO START neo4j:
sudo neo4j start
To stop it (needed before making changes to the configurations file, or before stopping the Virtual Machine):
sudo neo4j stop
And to view the current status of the Neo4j database server:
sudo neo4j status
PROBLEMS STARTING THE DATABASE? You can check the log file (may not be present initially) with:
more /var/log/neo4j/neo4j.log
(the location of the log file may vary in different operating systems, as detailed in the install section)




On Windows, Neo4j can be run as a console application or as a Windows service (to leave it running.)

ONE-TIME SETUP.

In the PowerShell (on Win10, it needs to be started in admin mode), issue the command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
That's needed to over-ride the default block against running scripts.



OPTION 1 * Running Neo4j as a console app (change the sample highlighted part to your own chosen location!)

To start Neo4j, enter in the PowerShell:
D:\neo4j\bin\neo4j console
When it's ready, the console shows a message about visiting http://localhost:7474 in a web browser. (See Test Neo4j access)


To stop Neo4j, Use CONTROL-C on the PowerShell window where you started it.



OPTION 2 * To install Neo4j as an always-running Windows service (change the sample highlighted part to your own chosen location!):
D:\neo4j\bin\neo4j install-service
If you enter services at the Windows search, you can start the "Services" app, and you'll find a Windows service named "Neo4j Graph Database - neo4j". You can right-click on it to start/stop it. Or, MORE SIMPLY, just use the PowerShell:
To start Neo4j:
D:\neo4j\bin\neo4j start
Once started, it will be automatically re-started if the computer gets rebooted.

To stop it (for example, to make changes to the configurations file):
D:\neo4j\bin\neo4j stop
And to view the current status of the Neo4j database server:
D:\neo4j\bin\neo4j status
You can check the log file (may not be present initially) with:
cat D:\neo4j\logs\neo4j.log



Test Neo4j access thru its Browser Interface

Did the installation go well? You can test it by means of the "Neo4j Browser Interface" (a web app that comes with Neo4j), by opening a browser tab and going to either
localhost:7474   or   http://YOUR_IP_ADDDRESS:7474
Note that it's http , not https

If the page doesn't load up, and if not on localhost, did you remember to open up the needed ports (see section on Neo4j ports) and did you change the config file? (see section Neo4j Database Configuration)


Log in as follows:

Note that two separate port numbers are involved: 7474 (for the web app that comes with Neo4j), and 7687 (to transfer data from/to the database.)

Common mistake: forgetting to change the "Connect URL" pulldown menu to "bolt://"

If it's your first login, you'll be asked to change your password.

If you also installed the APOC library earlier (optional, but highly recommended), to verify that its installation worked, issue the following command inside the neo4j browser app:
RETURN apoc.version()
It should return the version number (such as 4.4.0.34)


Advanced topics: Containerized Neo4j

We have used, but don't currently support, Docker to provide a containerized version of the Neo4j database.

In a not-to-distant future, we expect to support this modality as a handy way to have multiple instances of Neo4j running on a virtual machine or desktop, to provide independent databases, or master/slave configurations, or perhaps even some sharding support.



Install the Neo4j Database Administer Neo4j First-Time App Deployment Routine Upgrades Start Web App