Vector Tile Server Setup


Setting a tile server can be very complicated and resource intense. Thanks to all the good folks from Openmaptiles we can setup a vector tile server in a matter of five minutes. We will use a Ubuntu system for this setup. It should run flawlessly with any version of Ubuntu after 16.04.

A very low end computer can be used to host this server, which I think is the greatest advantage and draw for me in this setup. I am hosting one in a Fourth Gen i3 processor with 4GB RAM for personal use. Surprisingly the performance is pretty good for the vector maps. This server also supports Rester tiles but on a low end system the performance was not adequate. If you want to cover the world map you will need about 55GB of space as of today. Smaller areas are also available as well for downloads. I would highly suggest to host the map data on a SSD or a NVME. These map data is free to use for personal projects. It can also be used for testing or developing commercial products.

Another great thing about this vector map is, it can be directly used with Mapbox GL JS library. This is one of the easiest vector tile server setup I have seen so far.

For this vector tile server setup, we will use Docker. If you don’t have Docker installed, please install it following my other tutorial Quick and Easy Docker Setup.

Setting Up Vector Tile Server

Once you have Docker installed it’s a matter of running a single command. Once done you have to create an account and download the map data. Yes it’s this simple.

Let’s set set this up.

docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/openmaptiles-server

That’s all, if you want to change the service port from 8080 to something else change the port number on the above command accordingly. To set the server and download the data we need to go to http://<server IP>:8080 This will ask some simple steps and finally will take you to the map data download page. Just download the map data and you are all ready to go.

Good Luck, happy mapping.

Leave a Reply

Your email address will not be published. Required fields are marked *