Skip to content

Packages Graphhopper

github-actions[bot] edited this page Oct 5, 2026 · 2 revisions

graphhopper

GraphHopper, the offline router behind the browser map's car, bike, foot and hiking routes

  • Version recorded: 11.1
  • Categories: navigation-maps
  • Upstream: https://github.com/graphhopper/graphhopper
  • Needs first: default-jre-headless
  • Needs Java: 17 or newer — read with java -version at plan time (a metapackage's version does not say which Java it brings); deferred from a profile on a machine below it, refused by name, nothing fetched to meet it

What it does

Installs GraphHopper, an offline route planner, as one Java file under /usr/local/share/hammunition/graphhopper/. hammunition reference serve runs it on this machine only while the browser map is open, over the route graph graphhopper-graph builds from your map regions, and the map's Route control draws its car, bike, foot and hiking routes, with turn-by-turn directions. Its hiking profile reads how hard a trail is (sac_scale), and its foot profile keeps off mountain paths.

Why you would want it

The browser map shows where things are; this lets it say how to get there, from your GPS position when the tether is running, with no network. It is the offline alternative to GraphHopper's own website and to a phone's map app. On the desktop, QMapShack's routers (Routino and BRouter) and CoMaps' own routing do the same job in their programs; this is the one for the browser page.

Before it will work

Java (default-jre-headless, installed with it). The route graph from graphhopper-graph, which needs your map regions set in station config. Then hammunition reference serve and the map at http://127.0.0.1:8480/map/; the tether (hammunition maps gps-tether) for routes from where you are.

How it installs

What it changes on your machine

  • installed tree — /usr/local/share/hammunition/graphhopper is created and handed to the operator who ran the install by an explicit chown step in the plan (D-043): the software keeps settings, logs or data beside its executable, so the tree has to be writable by whoever runs it. On a shared machine that means anyone who can act as that user can change what the launcher runs.
    • /usr/local/share/hammunition stays root-owned; the tree itself is replaced whole on every install, so anything the software wrote inside it is lost then
    • undo: hammunition uninstall graphhopper removes the tree

Known problems

GraphHopper's own server answers every web page with Access-Control-Allow-Origin: * and checks no Host header (measured on 11.1). It listens on 127.0.0.1 only, on a port the system chooses each time reference serve starts, and the map reaches it through the reference server, which checks both; but while it runs, a web page from elsewhere in your browser that found that port could ask it for routes over your regions. Stop reference serve when you are not using the map. GraphHopper's own page at /maps/ on that port loads online base maps and is not used. Routes are flat: GraphHopper's elevation sources are downloaded online, and none reads the Copernicus tiles Hammunition installs. Not yet confirmed on hardware: a route drawn in a desktop browser on the field laptop; it was run on the development host over a synthetic region.

Keeping it current

  • probe: github release (graphhopper/graphhopper)
  • strategy: reinstall
  • A few releases a year. A new release is a new jar on Maven Central: download it once, check its sha256 against Central's .sha256 beside it, and bump the URL, the digest, the signature URL, the tree marker (the jar is named by version) and version. The route graph is rebuilt on the next install, because its record names the jar that built it, and a graph from another jar is never served.

Where to get help with the software itself

The project's GitHub issues and its forum, https://discuss.graphhopper.com/; the profiles and custom models are documented in the repository's docs/ directory.

Source: catalog/packages/graphhopper.yaml

Clone this wiki locally