[GIS] How to serve OSM map tiles (mbtiles) from a Raspberry PI 2

mbtilespythonraspberry pitiles

My main processing machine is a Ubuntu box running 14.04 with PostGIS and TileMill. I generated my tiles and the resulting mbtiles export is about 250MB (megs, not gigs). The PI runs python, has a storage card big enough to keep the mbtiles export, and wifi. At most, I might have 2-3 devices accessing the endpoint requesting tiles. Typically, only one device will be requesting tiles.

Keeping in mind, I prefer simplicity with minimal hardware requirements over a feature-rich server, what are my options for serving up the tiles from the mbtiles with a PI 2?

Best Answer

Based on available documentation, it sounds like you need to :

  1. Install a webserver on the Pi, like Apache
  2. Place the tiles (which you said you've already generated) into a known directory structure within your web server.
  3. Per the previously link: Change the OpenLayers instance to use your own tileserver instead of the main one

The link in the 2nd point offers alternatives to using a webserver. There was a Ruby/Python implementation which may also suffice.

Related Question