Self-host Open Source Routing Machine (OSRM)
v26.11.0C++ routing engine for OpenStreetMap data
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf || echo "osrm-extract failed"- Stars
- 8 197
- Port
- 5000 (osrm-routed HTTP routing API)
ghcr.io/project-osrm/osrm-backendWhat is Open Source Routing Machine (OSRM)?
OSRM is a road-routing engine written in C++ that turns OpenStreetMap data into a queryable service aimed at developers building navigation, logistics or geo applications. The self-hosted server osrm-routed exposes six HTTP services - route, nearest, table, match, trip and tile - and the same engine can be embedded through a C++ library interface with Node.js and Python bindings on top. Routing behaviour comes from Lua profiles shipped for car, bicycle and foot, and prepared data can follow one of two pipelines: Contraction Hierarchies or the recommended Multi-Level Dijkstra, which is the one that lets you re-apply live traffic speeds without re-partitioning. Running it yourself means downloading an .osm.pbf extract, processing it with the published container images and then starting osrm-routed on port 5000; a separate frontend image can be started alongside for a map UI. Datasets can be loaded into shared memory with osrm-datastore so several routed processes serve them with zero-copy access. Responses are JSON by default with a faster binary flatbuffers option, and queries are answered over plain HTTP rather than through an app login. Pre-processing is the slow part - the docs note a 550 MB Mexico extract took roughly 30 minutes. The project is released under the 2-clause BSD licence, maintained as a community effort and funded via GitHub Sponsors and PayPal.
Open Source Routing Machine (OSRM) alternatives
smsSelf-hosted vector tile server serving OSM data from MBTiles with hiking/cycling routing, SAC ratings, and MCP for LLM agents to plan tours.Comparesms with Open Source Routing Machine (OSRM)
GraphHopperGraphHopper is a self-hosted, open-source OpenStreetMap routing engine with A-to-B routing, isochrones, map matching, and GTFS transit. Runs as Java server or library.CompareGraphHopper with Open Source Routing Machine (OSRM)
OpenStreetMapOpen-source, self-hosted Ruby on Rails app powering the OpenStreetMap website and its XML/JSON editing API, with accounts, GPX traces and diaries, backed by PostgreSQL.CompareOpenStreetMap with Open Source Routing Machine (OSRM)
openstreetmap-tile-serverSelf-hosted OSM tile server in Docker: imports .osm.pbf, renders tiles via renderd/mod_tile, serves via Apache, optional auto-updates from OSM replication.Compareopenstreetmap-tile-server with Open Source Routing Machine (OSRM)
facilmapFacilMap is a self-hosted, open-source OpenStreetMap web map for collaborative maps with markers, routes, live editing, multiple styles, routing, and GPX/GeoJSON import.Comparefacilmap with Open Source Routing Machine (OSRM)
OpenTripPlannerSelf-hosted, open-source trip planner for scheduled public transit plus walking, cycling and bikeshare, built from GTFS/NeTEx and OpenStreetMap data.CompareOpenTripPlanner with Open Source Routing Machine (OSRM)
roadbookRoadbookMaker is a self-hosted, open-source web app for creating travel itineraries on interactive maps with AI-assisted planning and offline-first design.Compareroadbook with Open Source Routing Machine (OSRM)
Weave RouterOpen-source LLM model router for coding agents like Claude Code, Codex, and Cursor; self-hosted with Docker Compose, it picks the cheapest capable model per request.CompareWeave Router with Open Source Routing Machine (OSRM)
Should you self-host Open Source Routing Machine (OSRM)?
Open Source Routing Machine (OSRM) scores 71/100 on selfhost.directory (how scoring works) and ranks #1 of 7 in Navigation. It has 8 197 GitHub stars, +73 in the last 30 days.
It shipped 17 stable releases in the past year. The latest, v26.11.0, came out on 1 November 2026. New versions land roughly every 6 days.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is BSD-2-Clause-licensed and written mostly in C++.
Its closest alternative on selfhost.directory is Valhalla (71/100, 6 427 stars). Open Source Routing Machine (OSRM) scores higher overall. See Open Source Routing Machine (OSRM) vs Valhalla side by side.
Features
- Address snapping
- Binary response format
- Customizable routing profiles
- Distance/duration matrix
- Live traffic updates
- Map Matching
- Node.js Bindings
- Python Bindings
- REST API
- Route finding
- Shared-memory dataset serving
- Trip planning (TSP)
- Two routing algorithm pipelinesMLD is the recommended default
- Vector tile generation
Open Source Routing Machine (OSRM) README
More in Navigation
OpenStreetMapOpen-source, self-hosted Ruby on Rails app powering the OpenStreetMap website and its XML/JSON editing API, with accounts, GPX traces and diaries, backed by PostgreSQL.
OpenTripPlannerSelf-hosted, open-source trip planner for scheduled public transit plus walking, cycling and bikeshare, built from GTFS/NeTEx and OpenStreetMap data.
Project OSRMOpen Source Routing Machine - C++ backend
roadbookRoadbookMaker is a self-hosted, open-source web app for creating travel itineraries on interactive maps with AI-assisted planning and offline-first design.
smsSelf-hosted vector tile server serving OSM data from MBTiles with hiking/cycling routing, SAC ratings, and MCP for LLM agents to plan tours.
Sun-PanelSelf-hosted icon navigation panel and browser start page for servers, NAS boxes and Docker containers, with multi-account isolation and no external database.
ValhallaValhalla is a self-hosted, open-source routing engine for OpenStreetMap with turn-by-turn navigation, isochrones, matrix computation, map matching, and tour optimization.
Vanchor-NGSelf-hosted GPS autopilot turning a trolling motor into a virtual anchor with routing and fishing modes — runs offline on Raspberry Pi or in simulation.
facilmapFacilMap is a self-hosted, open-source OpenStreetMap web map for collaborative maps with markers, routes, live editing, multiple styles, routing, and GPX/GeoJSON import.
GraphHopperGraphHopper is a self-hosted, open-source OpenStreetMap routing engine with A-to-B routing, isochrones, map matching, and GTFS transit. Runs as Java server or library.
HaukHauk is an open-source, self-hosted real-time location sharing service with PHP backend and Android app. Run your own server and share location via generated links.
MBCompassAn open-source, self-hosted-on-device Android compass app: GPS location, track recording, GPX export, offline Mapsforge maps, zero ads or tracking.

0 comments