| Forum | GitHub | Maps | Blog

Installing Graphhopper on a Windows Server


I’m looking for advice on installing the Graphhopper routing engine on a Windows server. I’ve tried following the Quick Start instructions ( but get stuck at step 3, when I try to start Graphhopper Maps. I get the following error message:

“If no graph.location is provided you need to specify an OSM file”

This is the command I’m running:

java -jar C:\Graphhopper\graphhopper-web-0.10-0-with-dep.jar jetty.resourcebase=webapp config= C:\Graphhopper\ datareader.file= C:\Graphhopper\berlin-latest.osm.pbf

I’ve already changed the parameter “osmreader.osm” as it gave an error message saying that this has been replaced with the parameter “datareader.file”. I have the file “berlin.latest.osm.pbf” in the specified folder.

Can anyone help?




Sorry, my mistake - I had a rogue space character in the command!


I’ve progressed a bit further with this but I’ve hit another stumbling block!

When I run the java command to build the graph for planet-latest.osm.pbf it gets so far then gets stuck, despite leaving it running for 24 hours. I’m using a Dell PowerEdge R710 windows server with 96GB of RAM and 2 x 3.06GHz Hex-Core processors, so I’m guessing this is powerful enough to do the job, as the server isn’t being used for any other tasks. At one point in messages being output it says “OutOfMemoryError: Java heap space” but there is plenty of memory on the server, so I don’t know if this is just a spurious warning message.

When I run the java command with the berlin-latest-pdf fiile it runs successfully in under a minute. Any ideas of what might be going wrong?


You need to increase the -Xmx setting. See a few more tips here


Thanks. I tried adding “-Xmx17000m -Xms17000m” to the java command, which is what was suggested for worldwide coverage, but it gave the following error:

Invalid maximum heap size: -Xmx17000m
The specified size exceeds the maximum representable size.


It looks like the latest error was due to me using the 32Bit version of Java instead of the 64Bit version! I’ve reinstalled Java so fingers crossed!


I’ve added “-Xmx17000m -Xms17000m” to the java command. It runs for longer but I’m still getting OutOfMemory errors. Is it a case of trial and error with these settings (increasing them from 17000 until it runs OK), or is there a value at which it should always work?


The rule of thumb is to look how much space the folder uses on your disc and then add 2GB or a bit more depending on the actual volume and usage or … just use 80% of the server capacity :wink:
(It is recommended to keep Xmx under 95% of the server RAM if there are no other services on it)