User Tools

Site Tools


terra4d:osmserver

OpenStreetMap tile server

For a detailed instruction please check her: https://switch2osm.org/serving-tiles/using-a-docker-container/

Installation

  • Set up and install linux server; we recommend an Debian or Ubuntu LTS server installation
  • Install Docker CE to the server
  • Check the documentation of the openstreetmap-tile-server docker image
  • Create a docker volume for the OSM data:
    docker volume create osm-data
  • Download the OSM data (.osm.pbf) from GeoFabrik or similar service for the interested area
  • Import the downloaded .osm.pbf:
    docker run \
        -v /absolute/path/to/luxembourg.osm.pbf:/data/region.osm.pbf \
        -v osm-data:/data/database/ \
        overv/openstreetmap-tile-server \
        import 
  • Or download and import the dataset with one command (no extra download required):
    docker run \
        -e DOWNLOAD_PBF=https://download.geofabrik.de/europe/luxembourg-latest.osm.pbf \
        -e DOWNLOAD_POLY=https://download.geofabrik.de/europe/luxembourg.poly \
        -v osm-data:/data/database/ \
        overv/openstreetmap-tile-server \
        import
  • The processing can take a long time (depending on assign/used CPU/disk/memory). The processing of Italy (about 2G of PBF data) takes about 2 hours.
  • Note: The import is limited to one dataset (one pbf file). If you need more than one country/dataset you have to combine the datasets first, there are two options:
    • using osmium-merge:
      osmium merge washington.pbf oregon.pbf california.pbf -o westcoast.pbf
    • using osmconvert:
      osmconvert washington.pbf --out-o5m | osmconvert - oregon.pbf -o=westcoast.pbf
  • Finally start the tile server:
    docker run \
        --name osm-tile-server \
        -p 8080:80  \
        -v osm-data:/data/database/ \
        -d overv/openstreetmap-tile-server \
        run
        

Styles

Internal documentation

terra4d/osmserver.txt · Last modified: 2026/02/12 15:46 by editor