OSRM vs Valhalla
A side-by-side comparison of two self-hosted maps & gis options — licensing, setup difficulty, resource needs, and what each one replaces.
| Feature | OSRM | Valhalla |
|---|---|---|
| Deploy effort | Under-an-hour setup | Under-an-hour setup |
| Health score | 92 · Excellent | 91 · Excellent |
| Category | Maps & GIS | Maps & GIS |
| License | BSD-2-Clause | MIT |
| Language | C++ | C++ |
| Setup difficulty | Hard | Hard |
| Min. RAM | 8,192 MB | 8,192 MB |
| Deployment | docker, bare-metal | docker, bare-metal |
| GitHub stars | ★ 8,103 | ★ 6,247 |
| First released | 2012 | 2015 |
| Replaces | Google Directions API | Google Directions API |
What are OSRM and Valhalla?
OSRM
OSRM, the Open Source Routing Machine, is a fast routing engine for shortest paths in road networks using OpenStreetMap data. It computes routes, travel times, and distance matrices in milliseconds.
- Millisecond routing
- Distance matrices
- Map matching
- Customizable profiles
Valhalla
Valhalla is an open-source routing engine and accompanying libraries for use with OpenStreetMap data. It supports car, bicycle, pedestrian, and transit routing along with isochrones and map matching.
- Multimodal routing
- Isochrone generation
- Map matching
- Tiled routing data
OSRM vs Valhalla: key differences
Both projects are written in C++. Licensing differs — BSD-2-Clause for OSRM versus MIT for Valhalla. OSRM is the more established project (first released 2012), while Valhalla arrived in 2015.
Why pick each one
Choose OSRM if…
- Released under the BSD-2-Clause license
- First-class Docker support for quick deployment
- Mature project with 8.1k GitHub stars
- Written in C++
Choose Valhalla if…
- Released under the MIT license
- First-class Docker support for quick deployment
- Mature project with 6.2k GitHub stars
- Written in C++
Frequently asked questions
Is OSRM or Valhalla better?
Neither is universally better. OSRM has the larger community; both share a hard setup difficulty, so the decision comes down to features and licensing.
Are OSRM and Valhalla free and open-source?
Yes. OSRM is licensed under BSD-2-Clause and Valhalla under MIT. Both can be self-hosted at no software cost.
Can I run OSRM and Valhalla with Docker?
OSRM: yes. Valhalla: yes.