Open Street Map Tile Server

You can think of Open Street Map as an open-source, self-hosted alternative to Google Maps.
I’ll show you how to build your own OpenStreetMap tile server on Ubuntu 20.04.

Speak to Me

Why OpenStreetMap?

  • OpenStreetMap data is and open and free to download and use. There are no subscription fees, no page-view fees and no API fees.
  • OpenStreetMap data covers the entire planet, making it easy to support users in any country or every country.
  • OpenStreetMap data is updated every minute of every hour of every day, and these updates are available to you in real-time.
  • Did I mention it was free?

Hardware Requirements

The required RAM and disk space depend on which country’s map you are going to use. For example,

  • UK map needs a minimum of 12G RAM and 60GB disk space.
  • The whole planet map requires at least 32G RAM and 1TB SSD disk. I recommend SSD for the full planet map, old school HDD will be too slow.

If you want to pre-render tiles you’ll need a bunch more disk space, but it will significantly speed up loading in the browser. Check the Open Street Map Wiki for exactly how much (the map data just keeps getting bigger and bigger).

OSM Tile Server (Part 1)

In this post we’re going to get a functional OpenStreetMap tile server up and running. We’ll deploy a small map initially just to make sure everything is working correctly.

Optimise Postgres for Whole World Import

Depending on the specification of your server; you may want to adjust the postgres configuration to optimize performance, especially if you are planning on a ‘Whole World’ install.