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.

Not the right match-up?
FeatureOSRMValhalla
Deploy effortUnder-an-hour setupUnder-an-hour setup
Health score92 · Excellent91 · Excellent
CategoryMaps & GISMaps & GIS
LicenseBSD-2-ClauseMIT
LanguageC++C++
Setup difficultyHardHard
Min. RAM8,192 MB8,192 MB
Deploymentdocker, bare-metaldocker, bare-metal
GitHub stars★ 8,103★ 6,247
First released20122015
ReplacesGoogle Directions APIGoogle 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++
OSRM details

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++
Valhalla details

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.

Related comparisons