Windows installation
Before you install Neo4j on Windows, check System Requirements to see if your setup is suitable.
Windows console application
-
If it is not already installed, get OpenJDK 17 or Oracle Java 17.
-
Download the latest release from Neo4j Download Center.
Select the appropriate ZIP distribution.
-
Make sure to download Neo4j from Neo4j Download Center and always check that the SHA hash of the downloaded file is correct:
-
To find the correct SHA hash, go to Neo4j Download Center and click on
SHA-256
which will be located below your downloaded file. -
Using the appropriate commands for your platform, display the
SHA-256
hash for the file that you downloaded. -
Ensure that the two are identical.
-
-
Right-click the downloaded file and click Extract All.
-
Place the extracted files in a permanent home on your server, for example,
D:\neo4j\
. The top-level directory is referred to as NEO4J_HOME. -
From Neo4j v5.4 onwards, you are required to accept the license agreement before running the Neo4j Enterprise Edition. If you are using Community Edition, you can skip this step.
-
Use one of the following options to accept the commercial license agreement. See https://neo4j.com/terms/licensing/ for more information.
-
Set it as an environment variable using
set NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
. -
Run
<NEO4J_HOME>\bin\neo4j-admin server license --accept-commercial
-
-
Use one of the following options to accept the evaluation license agreement. See https://neo4j.com/terms/enterprise_us/ for more information.
-
Set it as an environment variable using
set NEO4J_ACCEPT_LICENSE_AGREEMENT=eval
. -
Run
<NEO4J_HOME>\bin\neo4j-admin server license --accept-evaluation
.
-
-
To run Neo4j as a console application, use:
<NEO4J_HOME>\bin\neo4j console
. -
To install Neo4j as a service use:
<NEO4J_HOME>\bin\neo4j windows-service install
. -
For additional commands and to learn about the Windows PowerShell module included in the Zip file, see Windows PowerShell module.
-
-
Visit http://localhost:7474 in your web browser.
-
Connect using the username 'neo4j' with default password 'neo4j'. You’ll then be prompted to change the password.
-
Stop the server by typing
Ctrl-C
in the console.
Windows service
Neo4j can also be run as a Windows service.
Install the service with bin\neo4j windows-service install
, and start it with bin\neo4j start
.
The available commands for bin\neo4j
are: version
, help
, console
, start
, stop
, restart
, status
, and windows-service
.
When installing a new release of Neo4j, you must first run |
Java options
When Neo4j is installed as a service, Java options are stored in the service configuration.
Changes to these options after the service is installed will not take effect until the service configuration is updated.
For example, changing the setting server.memory.heap.initial_size
in neo4j.conf will not take effect until the service is updated and restarted.
To update the service, run bin\neo4j update-service
.
Then restart the service to run it with the new configuration.
To update the service, run bin\neo4j windows-service update
.
The same applies to the path to where Java is installed on the system.
If the path changes, for example when upgrading to a new version of Java, it is necessary to run the update-service
command and restart the service.
Then the new Java location will be used by the service.
-
Install service
bin\neo4j windows-service install
-
Change memory configuration
echo server.memory.heap.initial_size=8g >> conf\neo4j.conf echo server.memory.heap.initial_size=16g >> conf\neo4j.conf
-
Update service
bin\neo4j windows-service update
-
Restart service
bin\neo4j restart
Windows PowerShell module
The Neo4j PowerShell module allows administrators to:
-
Install, start and stop Neo4j Windows® Services.
-
Start tools, such as
Neo4j Admin
andCypher Shell
.
The PowerShell module is installed as part of the ZIP file distributions of Neo4j.
System requirements
-
Requires PowerShell v2.0 or above.
-
Supported on either 32 or 64 bit operating systems.
Managing Neo4j on Windows
On Windows, it is sometimes necessary to Unblock a downloaded ZIP file before you can import its contents as a module. If you right-click on the ZIP file and choose "Properties" you will get a dialog which includes an "Unblock" button, which will enable you to import the module.
Running scripts has to be enabled on the system. This can, for example, be achieved by executing the following from an elevated PowerShell prompt:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
For more information, see About execution policies.
The PowerShell module will display a warning if it detects that you do not have administrative rights.
How do I import the module?
The module file is located in the bin directory of your Neo4j installation, i.e. where you unzipped the downloaded file. For example, if Neo4j was installed in C:\Neo4j then the module would be imported like this:
Import-Module C:\Neo4j\bin\Neo4j-Management.psd1
This will add the module to the current session.
Once the module has been imported you can start an interactive console version of a Neo4j Server like this:
Invoke-Neo4j console
To stop the server, issue Ctrl-C
in the console window that was created by the command.
How do I get help about the module?
Once the module is imported you can query the available commands like this:
Get-Command -Module Neo4j-Management
The output should be similar to the following:
CommandType Name Version Source
----------- ---- ------- ------
Function Invoke-Neo4j 5.8.0 Neo4j-Management
Function Invoke-Neo4jAdmin 5.8.0 Neo4j-Management
Function Invoke-Neo4jBackup 5.8.0 Neo4j-Management
Function Invoke-Neo4jImport 5.8.0 Neo4j-Management
Function Invoke-Neo4jShell 5.8.0 Neo4j-Management
The module also supports the standard PowerShell help commands.
Get-Help Invoke-Neo4j
Run the following to see examples of help commands:
Get-Help Invoke-Neo4j -examples
Was this page helpful?