Public Repository

Last pushed: a year ago
Short Description
Full Description


Docker Pull Command

Comments (5)
a year ago

FROM kevinjiang/tileserver-mapnik-fm:2.0
MAINTAINER kevinjiang

RUN rm -rf /project/*

VOLUME /data
DEST_DATA_DIR=/project \
PORT=8888 \

CMD ["/usr/src/app/"]

a year ago

sudo docker run -v /fm-dev/mapData:/data --net=host -p 8888:8888 kevinjiang/tileserver-mapnik-fm:3.0

a year ago

Serve Raster Tiles with Docker
You can render raster tiles from a Mapbox Studio Classic .tm2 style project and a vector tile MBTiles file with the help of Docker and tileserver-mapnik.

For a single map you can serve up to 50 users concurrently with a standard 4GB VPS server with Docker installed.

Download MBTiles
Clone a tm2 project (visual style)
Add both to the same directory
Download MBTiles

On the server download your desired extract of a country or the entire world MBTiles of the Downloads page.

wget -c
You can also download a smaller extract like Zurich.

wget -c
Clone the Style Project

Clone your custom style project or in this example the official OSM Bright style.

git clone
Run the raster tile server
Make sure you have the style project and the MBTiles file in the same directory.

├── mapbox-studio-osm-bright.tm2
└── world.mbtiles
Now run Docker via the command line to serve raster tiles. The raster tiles will be exposed at port 8080 of your Docker host.

docker run -v $(pwd):/data -p 8080:80 klokantech/tileserver-mapnik
Use the Raster Tiles
If you visit your Docker host on port 8080 you should see your map appearing in the interface. If you click on the map thumbnail you will get the configuration of the most common GIS clients and mapping libraries.

Mapping libraries configuration

Choose Source code in Leaflet to get the source code for e.g. Leaflet.

Leaflet configuration

The server will now provide a TileJSON endpoint at the service URL of the map. For this example the TileJSON endpoint is You need to reference this TileJSON endpoint in the Leaflet configuration.


a year ago

Mapnik-based tile server generating raster tiles from tilelive-js sources (MapBox Studio project + custom vector tiles for example). It supports also static maps API.

How to use


The easiest way to run tileserver-mapnik is using the precompiled docker container (

Detailed instructions how to use the tileserver-mapnik with docker:

Without docker

Follow the commands in Dockerfile to install the necessary packages, download common fonts and prepare the environment.

Usage: node bin/tessera.js [options]


-c CONFIG - Configuration file
-p PORT - HTTP port [8080]
-C SIZE - Cache size in MB [10]
-S SIZE - Source cache size (in # of sources) [10]
Example configuration file

"/style1": {
"source": "tmstyle://./style1.tm2"
"/style2": {
"source": "tmstyle:///home/user/style2.tm2"
"/vector": {
"source": "mbtiles:///home/user/data.mbtiles"
Note: For tm2 styles, you need to make sure the content of style's project.yml (its source property) points to a valid mbtiles file (e.g. source: "mbtiles://./data.mbtiles").

Available URLs

If you visit the server on the configured port (default 8080) you should see your maps appearing in the browser.
The tiles itself are served at /{basename}/{z}/{x}/{y}[@2x].{format}
The optional @2x part can be used to render HiDPI (retina) tiles
Static images are rendered at:
/{basename}/static/{lon},{lat},{zoom}/{width}x{height}[@2x].{format} (center-based)
/{basename}/static/{minx},{miny},{maxx},{maxy}/{zoom}[@2x].{format} (area-based)
TileJSON at /{basename}/index.json "# tileserver-mapnik-customs"