macOS installation

Unix console application

  1. If it is not already installed, get OpenJDK 11 or Oracle Java 11.

  2. Download the latest release from Neo4j Download Center.

    Select the appropriate tar.gz distribution for your platform.

  3. Make sure to download Neo4j from Neo4j Download Center and always check that the SHA hash of the downloaded file is correct:

    1. To find the correct SHA hash, go to Neo4j Download Center and click on SHA-256 which will be located below your downloaded file.

    2. Using the appropriate commands for your platform, display the SHA-256 hash for the file that you downloaded.

    3. Ensure that the two are identical.

  4. Extract the contents of the archive, using tar -xf <filename>

    Refer to the top-level extracted directory as: NEO4J_HOME

  5. Change directory to: $NEO4J_HOME

    Run ./bin/neo4j console

  6. Stop the server by typing Ctrl-C in the console.

When Neo4j runs in console mode, logs are printed to the terminal.

macOS service

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

macOS file descriptor limits

The limit of open file descriptors may have to be increased if a database has many indexes or if there are many connections to the database. The currently configured open file descriptor limitation on your macOS system can be inspected with the launchctl limit maxfiles command. The method for changing the limit may differ depending on the version of macOS. Consult the documentation for your operating system in order to find out the appropriate command.

If you raise the limit above 10240, then you must also add the following setting to your neo4j.conf file:

dbms.jvm.additional=-XX:-MaxFDLimit

Without this setting, the file descriptor limit for the JVM will not be increased beyond 10240. Note, however, that this only applies to macOS. On all other operating systems, you should always leave the MaxFDLimit JVM setting enabled.

Uninstall Neo4j

Here are the steps to uninstall Neo4j on macOS:

  1. (Optional) Create a backup to avoid losing your data.

  2. Stop all Neo4j running services:

    ---
    sudo systemctl stop neo4j
    sudo systemctl disable neo4j
    ---
  3. Delete NEO4J_HOME and the file /lib/systemd/system/neo4j.service:

    ---
    rm /lib/systemd/system/neo4j.service
    rm -rf NEO4J_HOME
    ---