Self-hosted ORS for car driving only


I want to self-host a reduced version of ORS with the following:

  • Matrix, routing and isochrones.
  • Car driving only. for which I need elevation.

I would like to reduce the size of the Europe PBF file to only contain the essential nodes/ways etc for routing, and only routing including the ability to cross border through ferry/shuttle routes.

Is this possible or should I systematically use an unalduterated version of the geofrabrik pbf file?

If yes what are the tags/nodes I need to retain to enable full routing capability?


for only activating specific profiles, have a look at this config option. If you only specify car, the ors will only build graphs for and allow routing for car.

As for reducing the pbf-file, this can be done and it does increase the speed with which the openrouteservice builds the graphs it uses for routing. It does not alter the size of the resulting graphs in any way.

However, this is a highly non-trivial task and I’d recommend against it, if you’re not planning to rebuild very often.

Best regards

Hi and thank you.

I am now configuring the config.json file as per the link you kindly provided.

I don’t plan to rebuild the graphs very often, however the host computer only has 16GB of RAM, hence the post re. reducing the size of the pbf file for Europe to contain and only contain the features used for car routing.

Please do correct me I am mis-interpreting your directions (no pun intended):

  • It is the size of the Graphs that matters re performance of the ORS routing service not the content of the pbf file (?).
  • The size of the pbf file matters but only re. the speed and performance of the initial build?



the ors needs to keep the graphs that are built from the .pbf-file in RAM.
For this, the size of the pbf file does not matter, since the ors filters all unnecessary tags by itself.

If you do this in a pre-processing step, this will speed up the process since no unneccessary tags are read and then disregarded. It will not change the size of the graphs.

16GB should be enough to build Europe graphs for car, so no worries :slight_smile:

Best regards

That’s very clear, thank you!
The docker container is building as we speak.


1 Like