logoalt Hacker News

mattrighettitoday at 2:03 PM2 repliesview on HN

Does anyone self host maps? Id you do, mind sharing the pros, cons and tools to do that?


Replies

homebrewertoday at 2:11 PM

We've been self-hosting protomaps (aka pmtiles) for several years. The only thing you need server-side is a web server that can serve static files and supports range requests (so anything works; I've tried caddy and nginx). The map is one large file, it's easy to share it between however many servers you need.

https://docs.protomaps.com/guide/getting-started

Downsides? Nothing major that I can think of. You have to add another client-side dependency (support for their custom protocol); the library is pretty small and easy to audit.

Editing map styles is slightly more difficult because generic maplibre styles won't work with it: they add a bit of custom sauce on top. IIRC this editor worked fine, you can import one of protomaps styles and base your work off it:

https://maputnik.github.io/editor

That's probably it.

show 1 reply
linsomniactoday at 2:50 PM

We use mod_tile+renderd: https://github.com/openstreetmap/mod_tile

In short: We have a script that builds a pbf of the area we are interested in (Colorado, USA) from OSM, then set up a openstreetmap-tile-server container with that data, bring in our styles, and then set up renderd.