Downloading and Installing Neo4j on macOS

Installing on macOS

Before installing Neo4j on macOS, review the system requirements to ensure that your environment is suitable.

Unix console application

  1. Install OpenJDK 17 or Oracle Java 17 if it is not already installed.

  2. Download the latest release from the Neo4j Download Center.

  • Select the tar.gz distribution for your platform.
  1. Always verify that the downloaded file has the correct SHA hash.
  • In the Neo4j Download Center, click the item below the downloaded file to obtain the correct SHA-256 hash.
  • Use the appropriate command for your platform to display the downloaded file’s SHA-256 hash.
  • Confirm that the two hashes match.
  1. Extract the archive with tar -xf, substituting the archive name for <filename>.
  • For example: tar -xf neo4j-community-5.7.0-unix.tar.gz
  1. Place the extracted files in a suitable location on the server. This guide refers to the top-level directory as NEO4J_HOME.

  2. Starting with Neo4j v5.4, you must accept the license agreement before running Neo4j Enterprise Edition. Skip this step for Community Edition.

  • To accept the commercial license, use one of the following options. See Neo4j licensing for details.
    • Set NEO4J_ACCEPT_LICENSE_AGREEMENT=yes in the environment.
    • Run <NEO4J_HOME>/bin/neo4j-admin server license --accept-commercial.
  • To accept the evaluation license, use one of the following options. See the evaluation agreement for details.
    • Set NEO4J_ACCEPT_LICENSE_AGREEMENT=eval in the environment.
    • Run <NEO4J_HOME>/bin/neo4j-admin server license --accept-evaluation.
  1. Start Neo4j.
  • To run it as a console application, run <NEO4J_HOME>/bin/neo4j console.
  • To run it as a background process, run <NEO4J_HOME>/bin/neo4j start.
  1. Open http://localhost:7474 in a web browser.

  2. Sign in with the username neo4j and default password neo4j. You will then be prompted to change the password.

  3. When running in console mode, press Ctrl-C to stop the server.

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

macOS service

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

macOS file descriptor limit

If the database has many indexes or connections, you may need to increase the open file descriptor limit. Check the current limit on macOS with launchctl limit maxfiles. The method for changing it varies by macOS version, so consult the operating-system documentation for the appropriate command.

If you raise the limit to 10240 or higher, also add the following setting to neo4j.conf:

server.jvm.additional=-XX:-MaxFDLimit

Without this setting, the JVM file descriptor limit will not increase beyond 10240. This applies only to macOS. On all other operating systems, leave the MaxFDLimit JVM setting enabled.

Source