Setting up Neo4j Enterprise Edition Windows Calver - tomgeudens/practical-neo4j GitHub Wiki
Disclaimer: This document aims at getting a Neo4j database up-and-running in the context of a training or experiment. It is not fit for production installation purposes. It also assumes a single user developer installation and is in that respect similar to a Neo4j Desktop installation (which also provides the Enterprise Edition). For that purpose the Neo4j Enterprise Edition software requires no further licensing. For any other purpose ... it does !
Version: this document is current for calendar version 2025.03.0 (enterprise edition)
(__)
(oo)
/-------\/
/ | ||
* ||----||
^^ ^^
Last Update: 2025/04/16 - Neo4j 2025.03.0, GDS 2.16.0
Important: All of the below is executed in a regular (non-elevated) powershell window! If you or you organisation haven't jumped on the new open source powershell releases yet, it's about time. Seriously. The below has been tested with version 7.5.0. It will work with the earlier proprietary versions too (that has not been tested but any powershell 5 and up is usually fine).
This document will assume everything (software, installation, database) is going to happen in a single neo4j folder (which is created below). This folder must reside in a location that is writable for the user with which you are logged on. No elevated rights will be needed (and try to avoid using an Administrator user). The C:\users<your user>\Documents folder is perfect.
PS C:\Users\Your User> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.0
...
PS C:\Users\Your User> cd .\Documents\
PS C:\Users\Your User\Documents> mkdir neo4j
PS C:\Users\Your User\Documents> mkdir .\neo4j\scripts
PS C:\Users\Your User\Documents> cd .\neo4j\
PS C:\Users\Your User\Documents\neo4j> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy ByPass
PS C:\Users\Your User\Documents\neo4j>
Right, so setting the execution policy will allow you to excute scripts (this is sometimes blocked). And these are the scripts we are going to download and execute :
PS C:\Users\Your User\Documents\neo4j> $WebClient = New-Object System.Net.WebClient
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/download.ps1", (Get-Location).Path + "\scripts\download.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/environment.ps1", (Get-Location).Path + "\scripts\environment.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/move.ps1", (Get-Location).Path + "\scripts\move.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/settings.ps1", (Get-Location).Path + "\scripts\settings.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/start.ps1", (Get-Location).Path + "\scripts\start.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/unpack.ps1", (Get-Location).Path + "\scripts\unpack.ps1")
PS C:\Users\Your User\Documents\neo4j> $WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/version.ps1", (Get-Location).Path + "\scripts\version.ps1")
Do verify the sizes match up ...
PS C:\Users\Your User\Documents\neo4j> dir .\scripts\
... Length Name
... ------ ----
... 2819 download.ps1
... 396 environment.ps1
... 1367 move.ps1
... 2473 settings.ps1
... 396 start.ps1
... 1525 unpack.ps1
... 287 version.ps1
Yes it is possible to do things completely manual, however :
- This is quite error-prone and may eat up a great deal of time in a training or experiment
- If you can not run the scripts (because of limitations on your laptop) it’s unlikely that you’ll be able to run Neo4j anyway ... (the Desktop installation will very likely also fail to start a database).
So with the scripts in place we are ready for the next step ...
In this step a subfolder install will be created and the following softwares will be put into it :
What | Location |
---|---|
Java JRE | install/OpenJDK17U-jre_x64_windows_hotspot_21.0.6_7.zip |
Neo4j Enterprise Server | install/neo4j-enterprise-2025.03.0-windows.zip |
GDS library | install/neo4j-graph-data-science-2.16.0.zip |
The instructions below will use a simple script to accomplish this. Note that this is one of the scripts you downloaded earlier.
PS C:\Users\Your User\Documents\neo4j> .\scripts\download.ps1
Setting the versions ... Done!
Downloading - there is no progress indicator! Please be patient!
Creating 'install' folder ... Done!
Downloading neo4j to: C:\Users\Your User\Documents\neo4j\install\neo4j-enterprise-2025.03.0-windows.zip ... Done!
Downloading jre to: C:\Users\Your User\Documents\neo4j\install\OpenJDK21U-jre_x64_windows_hotspot_21.0.6_7.zip ... Done!
Downloading gds to: C:\Users\Your User\Documents\neo4j\install\neo4j-graph-data-science-2.16.0.zip ... Done!
Downloading Complete
Do check that the sizes match with yours !
PS C:\Users\Your User\Documents\neo4j> dir .\install\
... Length Name
... ------ ----
... 308375062 neo4j-enterprise-2025.03.0-windows.zip
... 56781705 neo4j-graph-data-science-2.16.0.zip
... 48865456 OpenJDK21U-jre_x64_windows_hotspot_21.0.6_7.zip
Next up ... unpacking the softwares ...
In this step, everything that is compressed will be unpacked. Typically that's the Neo4j software, the Java software and the Graph Data Science zip.
PS C:\Users\Your User\Documents\neo4j> .\scripts\unpack.ps1
Unpacking the downloads...
Setting the versions ... Done!
Unpacking neo4j to: C:\Users\Your User\Documents\neo4j\ ... Done!
Unpacking jre to: C:\Users\Your User\Documents\neo4j\ ... Done!
Unpacking gds to: C:\Users\Your User\Documents\neo4j\install ... Done!
Unpacking Complete
With all the plugins now in jar form, it's time to move them into the plugins folder.
PS C:\Users\Your User\Documents\neo4j> .\scripts\move.ps1
Setting the versions ... Done!
Moving the plugins...
Moving gds to: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\plugins ... Done!
Moving apoc-core to: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\plugins ... Done!
Moving Complete
Do check that the sizes match with yours !
PS C:\Users\Your User\Documents\neo4j> dir .\neo4j-enterprise-2025.03.0\plugins\
... Length Name
... ------ ----
... 2984266 apoc-2025.03.0-core.jar
... 64247008 neo4j-graph-data-science-2.16.0.jar
... 2266 README.txt
Most of the default settings of Neo4j are fine for the purposes of a training or experimentation, but not all. The script below fixes what needs fixing and also sets the initial password for the database to morpheus. Alternatively you can also modify the neo4j.conf file manually, the statement shows all the changes you need to make.
PS C:\Users\Your User\Documents\neo4j> .\scripts\settings.ps1
Setting the versions ... Done!
Adding config to C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\conf\neo4j.conf
* # Custom - Generic
* server.config.strict_validation.enabled=false
*
* # Custom - Metrics
* server.metrics.enabled=true
* server.metrics.filter=*
* server.metrics.csv.enabled=false
* server.metrics.prometheus.enabled=false
* server.metrics.graphite.enabled=false
* server.metrics.jmx.enabled=true
*
* # Custom - Query Log
* db.logs.query.enabled=OFF
*
* # Custom - Miscellaneous
* dbms.db.timezone=SYSTEM
* dbms.security.procedures.unrestricted=apoc*,gds*
* browser.remote_content_hostname_whitelist=*
*
* # Custom - Memory
* server.memory.heap.initial_size=2g
* server.memory.heap.max_size=2g
* server.memory.pagecache.size=1g
* dbms.memory.transaction.total.max=2000m
* db.memory.transaction.max=1g
*
* # Custom - Network Settings
* server.default_listen_address=0.0.0.0
* # no usage data collection please
* dbms.usage_report.enabled=false
Done!
Adding config to C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\conf\apoc.conf
* apoc.export.file.enabled=true
* apoc.import.file.enabled=true
* apoc.import.file.use_neo4j_config=true
Done!
Importing Neo4j Modules ... Done!
Setting neo4j initial password ... Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time.
0
Done!
Settings Complete
It is important to note that if the changing of the password did not work, it's unlikely that the database start in the next step will.
We are going to be running the database in console mode. That means that the command we are going to issue will continue running in the foreground (so do not close that terminal window unless you want to bring down the database).
PS C:\Users\Your User\Documents\neo4j> .\scripts\start.ps1
Starting Neo4j!
Setting the versions ... Done!
Importing Neo4j Modules ... Done!
Directories in use:
home: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0
config: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\conf
logs: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\logs
plugins: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\plugins
import: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\import
data: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\data
certificates: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\certificates
licenses: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\licenses
run: C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\run
Starting Neo4j.
2025-04-16 12:24:28.382+0000 INFO Logging config in use: File 'C:\Users\Your User\Documents\neo4j\neo4j-enterprise-2025.03.0\conf\user-logs.xml'
2025-04-16 12:24:28.388+0000 INFO The license agreement was accepted with environment variable NEO4J_ACCEPT_LICENSE_AGREEMENT=yes when the Software was started.
2025-04-16 12:24:28.406+0000 INFO Starting...
2025-04-16 12:24:30.179+0000 INFO ======== Neo4j 2025.03.0 ========
2025-04-16 12:24:30.204+0000 INFO This instance is ServerId{xxxxxxxx} (xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb)
2025-04-16 12:24:30.302+0000 INFO Prometheus: disabled GDS Metrics Server: disabled
2025-04-16 12:24:30.303+0000 WARN GDS metrics disabled
2025-04-16 12:24:30.305+0000 WARN [gds] The configuration gds.model.store_location is missing.
2025-04-16 12:24:30.308+0000 INFO Progress tracking: enabled
2025-04-16 12:24:30.308+0000 INFO Memory usage guard: minimum estimate
2025-04-16 12:24:30.310+0000 INFO Register GDS Memory Facade...
2025-04-16 12:24:30.310+0000 INFO GDS Memory Facade registered.
2025-04-16 12:24:30.314+0000 INFO Building Graph Data Science extension...
2025-04-16 12:24:30.315+0000 INFO Register Graph Data Science...
2025-04-16 12:24:30.315+0000 INFO Graph Data Science registered.
2025-04-16 12:24:30.316+0000 INFO Register Metrics...
2025-04-16 12:24:30.316+0000 INFO Metrics registered.
2025-04-16 12:24:30.317+0000 INFO Register Task Registry Factory...
2025-04-16 12:24:30.317+0000 INFO Task Registry Factory registered.
2025-04-16 12:24:30.317+0000 INFO Register Task Store...
2025-04-16 12:24:30.317+0000 INFO Task Store registered.
2025-04-16 12:24:30.317+0000 INFO Register User Log Registry Factory...
2025-04-16 12:24:30.317+0000 INFO User Log Registry Factory registered.
2025-04-16 12:24:30.318+0000 INFO Register License State...
2025-04-16 12:24:30.318+0000 INFO License State registered.
2025-04-16 12:24:30.319+0000 INFO Register Model Catalog...
2025-04-16 12:24:30.319+0000 INFO Model Catalog registered.
2025-04-16 12:24:30.320+0000 INFO Graph Data Science extension built.
2025-04-16 12:24:30.320+0000 INFO Building Graph Data Science Extras extension...
2025-04-16 12:24:30.320+0000 INFO Register Graph Data Science Extras...
2025-04-16 12:24:30.321+0000 INFO Graph Data Science Extras registered.
2025-04-16 12:24:30.321+0000 INFO Graph Data Science Extras extension built.
2025-04-16 12:24:30.853+0000 INFO Resolved endpoints with LIST{endpoints:'[localhost:6000]'} to '[localhost:6000]'
2025-04-16 12:24:30.958+0000 INFO Resolved endpoints with LIST{endpoints:'[localhost:6000]'} to '[localhost:6000]'
2025-04-16 12:24:32.057+0000 INFO Default database 'neo4j' is created
2025-04-16 12:24:33.823+0000 INFO Bolt enabled on 0.0.0.0:7687.
2025-04-16 12:24:33.826+0000 INFO Bolt (Routing) enabled on 0.0.0.0:7688.
2025-04-16 12:24:34.474+0000 INFO HTTP enabled on 0.0.0.0:7474.
2025-04-16 12:24:34.475+0000 INFO Remote interface available at http://localhost:7474/
2025-04-16 12:24:34.476+0000 INFO id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2025-04-16 12:24:34.476+0000 INFO name: system
2025-04-16 12:24:34.476+0000 INFO creationDate: 2025-04-16T14:24:31.415+02:00
2025-04-16 12:24:34.476+0000 INFO Started.
Don't worry about the following (possible) issues:
--> None at the moment
Enjoy!
Note that a CTRL-C will stop the database and that you obviously only have to repeat this final step to start the database again!
The observation has been made that it can be hard to correctly cut-and-paste the commands from in between the output and the explanation. Below you'll therefore find just the necessary commands.
Setup
The assumption is that you have positioned yourself in the location where the self-contained setup needs to go
mkdir neo4j
mkdir .\neo4j\scripts
cd .\neo4j\
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy ByPass
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/download.ps1", (Get-Location).Path + "\scripts\download.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/environment.ps1", (Get-Location).Path + "\scripts\environment.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/move.ps1", (Get-Location).Path + "\scripts\move.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/settings.ps1", (Get-Location).Path + "\scripts\settings.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/start.ps1", (Get-Location).Path + "\scripts\start.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/unpack.ps1", (Get-Location).Path + "\scripts\unpack.ps1")
$WebClient.DownloadFile("https://raw.githubusercontent.com/tomgeudens/practical-neo4j/master/scripts/calver/ee/windows/version.ps1", (Get-Location).Path + "\scripts\version.ps1")
Installation
The assumption is that you have positioned yourself in the neo4j folder (created in Setup)
.\scripts\download.ps1
.\scripts\unpack.ps1
.\scripts\move.ps1
.\scripts\settings.ps1
Running
Whereas Setup and Installation are only executed once, this one is repeated every time you want to start the database. The assumption is that you have positioned yourself in the neo4j folder (created in Setup)
.\scripts\start.ps1