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
-
Install OpenJDK 17 or Oracle Java 17 if it is not already installed.
-
Download the latest release from the Neo4j Download Center.
- Select the tar.gz distribution for your platform.
- 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-256hash. - Use the appropriate command for your platform to display the downloaded file’s
SHA-256hash. - Confirm that the two hashes match.
- Extract the archive with
tar -xf, substituting the archive name for<filename>.
- For example:
tar -xf neo4j-community-5.7.0-unix.tar.gz
-
Place the extracted files in a suitable location on the server. This guide refers to the top-level directory as
NEO4J_HOME. -
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=yesin the environment. - Run
<NEO4J_HOME>/bin/neo4j-admin server license --accept-commercial.
- Set
- To accept the evaluation license, use one of the following options. See the evaluation agreement for details.
- Set
NEO4J_ACCEPT_LICENSE_AGREEMENT=evalin the environment. - Run
<NEO4J_HOME>/bin/neo4j-admin server license --accept-evaluation.
- Set
- 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.
-
Open
http://localhost:7474in a web browser. -
Sign in with the username
neo4jand default passwordneo4j. You will then be prompted to change the password. -
When running in console mode, press
Ctrl-Cto 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.