Lurker News
Hi HN,

After 9 years of running my own OpenStreetMap tile server infra for MapHub (https://news.ycombinator.com/item?id=11389989), I've open-sourced it and launched OpenFreeMap.
You can either self-host or use our public instance. Everything is open-source, including the full production setup — there’s no 'open-core' model here. Check out the repo (https://github.com/hyperknot/openfreemap). The map data comes from OpenStreetMap.
I also provide weekly full planet downloads both in Btrfs and MBTiles formats.
I aim to cover the running costs of the public instance through donations.
Looking forwards for your feedback.

Comments (234) 54 threads

Earlier comments
vanillax1 reply#
I know the github says docker free.... What would it take to dockerize so people can self host, say on kubernetes.
hyperknot#
Someone making a Docker image from this. Instead of using Fabric's commands like c.sudo('git clone ...') it'd use the RUN commands.

I think it would be quite a straightforward task to transform it into a Docker file. I'd be happy to link to it on GitHub.

vinibrito3 replies#
About displaying the vector tiles, which project goes well with it? I like Leaflet and worked extensively with it, but it has some compatibility problems with vector tiles and other small issues when dragging vector tiles for example. Is Maplibre the gold standard for vector tiles now?
maelito1 reply#
Yes. It's active. But it's imperative. I didn't find a good React interface to MapLibre.

See Streetcomplete switching to MapLibre.

maelito#
Well, they should rewrite the home page. It says MapBox everywhere and MapLibre nowhere.
petre#
Maplibre works fine, there is even a plugin so you can use it in Leaflet. And it's a well maintained project.

The other one is Mapbox GL from which Maplibre was forked. But you only use that with their tiles now.

hyperknot#
Yes, MapLibre is the gold standard now.
kisamoto1 reply#
I am currently exploring the open source mapping world and trying to get a better grasp of what's available.

How does this project compare to Apache Baremaps (incubating)?
https://baremaps.apache.org/

hyperknot#
They are providing the building blocks for making a self-hosted vector tiles server, they don't actually host the tiles.
the-rc1 reply#
Hard links are to deduplicate identical tiles, right? How much does that save and how close is the tile with most links (empty one(s)?) to the filesystem limits? Inquiring minds want to know...
hyperknot2 replies#
Yes, exactly, it's to save space. For example there is one such tile for "ocean", which covers 70% of earth.

In total, there are 271 million hard links. So out of 300 million files 271 are hard links!
The file system limit is 64k hard-links for the same file, so I have to handle the case when it's reached and then start a new file for the next 64k.

mdaniel1 reply#
> The file system limit is 64k hard-links for the same file

I had never heard that, so I went sniffing around and it seems to be ext4 specific[1] but I wasn't able to easily get the limits for ZFS (or xfs, etc), so depending on how much glucose one wished to spend it may be better to use a different FS than all that renaming work around
1: https://en.wikipedia.org/wiki/Hard_link#Limitations

hyperknot#
The whole extract_mbtiles.py file is 97 lines of code. This contains parsing MBTiles, writing metadata and some CLI specific lines. It's actually quite a concise script for doing this while taking care of the hard-link limits.
fegu2 replies#
Just out of curiosity, is there no clever way to solve this within nginx with rules instead?
jaakl#
In nutiteq mobile maps SDK (later Carto, now abandonware) we used specifically compressed bitmap to represent 'water' and 'empty land' tilemasks to cover these two special cases. We provided planet-scale mobile embedded mbtiles package in 30GB if I remember well. This tile mask (quite instant bitmap index) concept should work well for server case also.
hyperknot#
The Linux kernel's filesystem cache is actually really efficient at doing this. I doubt we could come up with a nginx scripting solution which could be equally efficient.

Load more comments