selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Valhalla logo

Self-host Valhalla

3.9.1

Open-source routing engine for OpenStreetMap data

ReleaseOpen SourceOther
Updatedlast month
LanguageC++
Setup difficultyAdvanced
Stars
6 429
Port
8002 (HTTP API service)
Docker
ghcr.io/valhalla/valhalla-scripted
Install with Docker

What is Valhalla?

Valhalla is an open-source routing engine and library suite for OpenStreetMap data. It offers turn-by-turn routing for auto, pedestrian, bicycle, and transit modes, plus isochrone generation, time-distance matrices, map matching, elevation sampling, and traveling salesman optimization. The engine uses a tiled hierarchical data structure for efficient memory use and offline routing. It can be self-hosted via Docker images (base, scripted, and dev variants), built from source on Linux, macOS, and Windows, or used through Python and Node.js bindings. A public demo server is available at valhalla.openstreetmap.de. The project is MIT-licensed and actively maintained with regular releases.

Should you self-host Valhalla?

Valhalla scores 71/100 on selfhost.directory (how scoring works) and ranks #1 of 7 in Navigation. It has 6 429 GitHub stars, +146 in the last 30 days.

It shipped 10 stable releases in the past year. The latest, 3.9.1, came out on 6 October 2026. New versions land roughly every 5 weeks.

Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is Other-licensed and written mostly in C++.

Its closest alternative on selfhost.directory is Open Source Routing Machine (OSRM) (71/100, 8 197 stars). Valhalla scores higher overall. See Valhalla vs Open Source Routing Machine (OSRM) side by side.

Features

  • Dynamic costing
  • Elevation sampling
  • HTTP API service
  • Isochrone generation
  • Map Matching
  • Node.js Bindings
  • Offline routing
  • One-shot CLI mode
  • Python Bindings
  • Tiled hierarchical data structure
  • Time-dependent routing
  • Time-distance matrix
  • Tour optimization (TSP)
  • Transit routing (GTFS)
  • Turn-by-turn routing

Valhalla README

 ██▒   █▓ ▄▄▄       ██▓     ██░ ██  ▄▄▄       ██▓     ██▓    ▄▄▄
▓██░   █▒▒████▄    ▓██▒    ▓██░ ██▒▒████▄    ▓██▒    ▓██▒   ▒████▄
 ▓██  █▒░▒██  ▀█▄  ▒██░    ▒██▀▀██░▒██  ▀█▄  ▒██░    ▒██░   ▒██  ▀█▄
  ▒██ █░░░██▄▄▄▄██ ▒██░    ░▓█ ░██ ░██▄▄▄▄██ ▒██░    ▒██░   ░██▄▄▄▄██
   ▒▀█░   ▓█   ▓██▒░██████▒░▓█▒░██▓ ▓█   ▓██▒░██████▒░██████▒▓█   ▓██▒
   ░ ▐░   ▒▒   ▓▒█░░ ▒░▓  ░ ▒ ░░▒░▒ ▒▒   ▓▒█░░ ▒░▓  ░░ ▒░▓  ░▒▒   ▓▒█░
   ░ ░░    ▒   ▒▒ ░░ ░ ▒  ░ ▒ ░▒░ ░  ▒   ▒▒ ░░ ░ ▒  ░░ ░ ▒  ░ ▒   ▒▒ ░
     ░░    ░   ▒     ░ ░    ░  ░░ ░  ░   ▒     ░ ░     ░ ░    ░   ▒
      ░        ░  ░    ░  ░ ░  ░  ░      ░  ░    ░  ░    ░  ░     ░  ░
     ░

Valhalla is an open source routing engine and accompanying libraries for use with OpenStreetMap data. Valhalla also includes tools like time+distance matrix computation, isochrones, elevation sampling, map matching and tour optimization (Travelling Salesman).

How to install Valhalla

Install Valhalla with Docker

Docker

docker run -dt --name valhalla -p 8002:8002 -v $PWD/custom_files:/custom_files ghcr.io/valhalla/valhalla-scripted:latest

Scripted image with environment variable configuration; map a volume to /custom_files for persistent data

How to configure Valhalla

  • tile_urlsSupports single or multiple (space-separated) URL(s) pointing to OSM PBF files

    values: URL(s) to .osm.pbf files

  • use_tiles_ignore_pbfTrueTrue uses a local tile.tar file if available and skips building

    values: True, False

  • force_rebuildFalseTrue forces a rebuild of the routing tiles and sets build_tar to Force

    values: True, False

  • build_elevationFalseTrue downloads elevation tiles covering the routing graph; Force deletes existing elevation tiles first

    values: True, False, Force

  • build_adminsTrueTrue builds the admin db needed for driving side and border-crossing penalties; Force deletes existing db first

    values: True, False, Force

Valhalla releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Navigation

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…