Skip to content
Modular rewrite of the OSRM frontend using LRM
Branch: gh-pages
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
css Display several turn icons for one lane overlapped (#284) Jul 27, 2018
debug Update bundle Mar 11, 2019
docker Make use of local routing service Oct 23, 2017
i18n Add Japanese Localization Mar 22, 2019
images Display several turn icons for one lane overlapped (#284) Jul 27, 2018
scripts Fix OSRM_CENTER not working (#303) May 7, 2019
src Add Japanese Localization Mar 22, 2019
.eslintignore add eslint Sep 3, 2015
.eslintrc spaces and dangles Sep 3, 2015
.gitignore fix merge Sep 28, 2015
CNAME Switch to new frontend Sep 28, 2015
LICENSE add files Sep 2, 2015
Makefile Fix Makefile format Sep 29, 2015 Fixes Docker container OSRM_BACKEND env var docs, resolves #256 Aug 17, 2017
bundle.js Update bundle Mar 11, 2019 Update bundle Mar 11, 2019
bundle.raw.js Update bundle Mar 11, 2019
favicon.ico add favicon Sep 8, 2015
index.html utf-8 charset Mar 28, 2017
package-lock.json Update bundle Mar 11, 2019
package.json osrm-text-instructions@0.13.1 (#286) Jul 25, 2018


This is the frontend served at This frontend builds heavily on top of Leaflet Routing Machine. If you need a simple OSRM integration in your webpage, you should start from there.

Using Docker

The easiest and quickest way to setup your own routing engine backend is to use Docker images we provide. We base our Docker images on Alpine Linux and make sure they are as lightweight as possible.

Serves the frontend at http://localhost:9966 running queries against the routing engine backend:

docker run -p 9966:9966 osrm/osrm-frontend

Per default routing requests are made against the backend at http://localhost:5000. You can change the backend by using -e OSRM_BACKEND='http://localhost:5001' in the docker run command.

In case Docker complains about not being able to connect to the Docker daemon make sure you are in the docker group.

sudo usermod -aG docker $USER

To build the docker image locally:

docker build . -f docker/Dockerfile -t osrm-frontend
docker run -p 9966:9966 osrm-frontend


Install dependencies via

npm install

Then compile assets and start the local server with

npm start

On Windows with no Unix tools installed (bash, sed, cp) the server could be started with two other commands executed by npm start internally:

npm run compile
npm run start-index

Changing Backends

In src/leaflet_options.js adjust:

services: [{
  label: 'Car (fastest)',
  path: 'http://localhost:5000/route/v1'

For debug tiles showing speeds and small components available at /debug adjust in debug/index.html

"osrm": {
  "type": "vector",
  "tiles" : ["http://localhost:5000/tile/v1/car/tile({x},{y},{z}).mvt"]
You can’t perform that action at this time.