Question about hosting my own graphhopper server

Hello,

So I just download all locally and work fine at localhost:8989.
But I can’t understand clearly the github documentation. It says it use the GraphHopper Direction API under the hood and is free for development. I have some questions about this :

  • When I use my localhost:8989/route am I using my own server ressources to calculate the route or am I making a request to the Graphhopper Direction API ? Because I want to go production and don’t want to use graphhopper direction api paid version.

  • How can I add an API KEY protect just like the graphhopper paid but for my server. Because I don’t want someone who find my IP to make request. I want to make it secure with api.

Thank you in advance

The deployed GraphHopper Maps at https://graphhopper.com/maps/ is using the GraphHopper Directions API under the hood. But your local maps UI uses your local GraphHopper server (and nominatim for geocoding and omniscale for tiles. For both you’ll probably need a replacement when going production)

How can I add an API KEY protect just like the graphhopper paid but for my server.

You’ll have to protect your server with some frontend service like nginx or similar.

Thank you for your quick answer,
Okay so the localhost:8989/maps use GraphHopper Directions API but when I use localhost:8989/route I am using my server ?

The URL localhost:8989/maps uses localhost:8989/route under the hood for routing. But map tiles and geocoding are done via external services.

but when I use localhost:8989/route I am using my server ?

Yes, sure

Okay, it’s all clear now. Thank you a lot for your time and clear answer

Powered by Discourse