23.2. Server Installation

Deployment Scenarios

As a developer, you may wish to download Neo4j and run it locally on your desktop computer. We recommend this as an easy way to discover Neo4j.

As a systems administrator, you may wish to install Neo4j using a packaging system so you can ensure that a cluster of machines have identical installs. See the section called “Linux Packages” for more information on this.

For information on High Availability, please refer to Chapter 25, High Availability.


With the exception of our Windows and Mac Installers, you’ll need a Java Virtual Machine installed on your computer. We recommend that you install OpenJDK 8 (preferred) or 7 or Oracle Java 8 (preferred) or 7.

Setting Proper File Permissions

When installing Neo4j Server, keep in mind that the bin/neo4j executable will need to be run by some OS system user, and that user will need write permissions to some files/directories. This goes specifically for the data/graph.db directory. That user will also need execute permissions on other files, such as those in bin/.

It is recommended to either choose or create a user who will own and manage the Neo4j Server. This user should own the entire Neo4j directory, so make sure to untar/unzip it as this user and not with sudo (UNIX/Linux/OSx) etc.

If data/graph.db is not writable by the user Neo4j won’t be able to write anything either to the store or its log files. As a result any logs would be appended to console.log. The following error message would indicate a possible permissions issue: Write transactions to database disabled.


Windows Installer

  1. Download the version that you want from http://neo4j.com/download/.

    • Select the appropriate version and architecture for your platform.
  2. Double-click the downloaded installer file.
  3. Follow the prompts.

The installer will prompt to be granted Administrator privileges. Newer versions of Windows come with a SmartScreen feature that may prevent the installer from running — you can make it run anyway by clicking "More info" on the "Windows protected your PC" screen.


If you install Neo4j using the windows installer and you already have an existing instance of Neo4j the installer will select a new install directory by default. If you specify the same directory it will ask if you want to upgrade. This should proceed without issue although some users have reported a JRE is damaged error. If you see this error simply install Neo4j into a different location.

Windows Console Application

  1. Download the latest release from http://neo4j.com/download/.

    • Select the appropriate Zip distribution.
  2. Right-click the downloaded file, click Extract All.

    • Refer to the top-level extracted directory as: NEO4J_HOME
  3. Consult Section 23.3, “Windows PowerShell module” for how to start or install Neo4j.

Some users have reported problems on Windows when using the ZoneAlarm firewall. If you are having problems getting large responses from the server, or if the web interface does not work, try disabling ZoneAlarm. Contact ZoneAlarm support to get information on how to resolve this.


Linux Packages

After installation you may have to do some platform specific configuration and performance tuning. For that, refer to Section 24.4, “Performance Guide”.

Unix Console Application

  1. Download the latest release from http://neo4j.com/download/.

    • Select the appropriate tar.gz distribution for your platform.
  2. Extract the contents of the archive, using: tar -xf <filename>

    • Refer to the top-level extracted directory as: NEO4J_HOME
  3. Change directory to: $NEO4J_HOME

    • Run: ./bin/neo4j console
  4. Stop the server by typing Ctrl-C in the console.

Linux Service

The neo4j command can also be used with start, stop, restart or status instead of console. By using these actions, you can create a Neo4j service. See the neo4j man page for further details.


This approach to running Neo4j as a service is deprecated. We strongly advise you to run Neo4j from a package where feasible.

You can build your own init.d script. See for instance the Linux Standard Base specification on system initialization, or one of the many samples and tutorials.


Mac OSX Installer

  1. Download the .dmg installer that you want from http://neo4j.com/download/.
  2. Click the downloaded installer file.
  3. Drag the Neo4j icon into the Applications folder.

If you install Neo4j using the Mac installer and already have an existing instance of Neo4j the installer will ensure that both the old and new versions can co-exist on your system.

Running Neo4j from the Terminal

The server can be started in the background from the terminal with the command neo4j start, and then stopped again with neo4j stop. The server can also be started in the foreground with neo4j console — then it’s log output will be printed to the terminal.

The neo4j-shell command can be used to interact with Neo4j from the command line using Cypher. It will automatically connect to any server that is running on localhost with the default port, otherwise it will show a help message. You can alternatively start the shell with an embedded Neo4j instance, by using the -path path/to/data argument — note that only a single instance of Neo4j can access the database files at a time.

OSX Service

Use the standard OSX system tools to create a service based on the neo4j command.

A note on Java on OS X Mavericks

Unlike previous versions, OS X Mavericks does not come with Java pre-installed. You might encounter that the first time you run Neo4j, where OS X will trigger a popup offering you to install Java SE 6.

Java SE 6 is incompatible with Neo4j 2.3.2-SNAPSHOT, so we strongly advise you to skip installing Java SE 6 if you have no other uses for it. Instead, for Neo4j 2.3.2-SNAPSHOT we recommend you install Java SE 8 (preferred) or 7 from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/index.html) as that is what we support for production use.

Multiple Server instances on one machine

Neo4j can be set up to run as several instances on one machine, providing for instance several databases for development.

For how to set this up, see the section called “Alternative setup: Creating a local cluster for testing”. Just use the Neo4j edition of your choice, follow the guide and remember to not set the servers to run in HA mode.