Use Docker
You can use Docker to run the Open Street Map tile server on a Windows machine using the Windows Subsystem for Linux (WSL) or directly on an Ubuntu server. This approach allows you to quickly set up and run the tile server without needing to install all dependencies manually.
This example assumes that Docker is already deployed on a Windows machine and that Ubuntu 22.04 LTS is the distribution in use.
These steps are described in more detail on the Using a Docker container page at Switch2OSM.
Start the Ubuntu application on your Windows machine.
Download data for your region of interest to the home directory of the Ubuntu user (assumed to be renderaccount in this example).
wget https://download.geofabrik.de/europe/united-kingdom-latest.osm.pbfCreate a docker volume for the data:
docker volume create osm-dataInstall it and import the data:
docker run -v /home/renderaccount/united-kingdom-latest.osm.pbf:/data/region.osm.pbf -v osm-data:/data/database/ -v osm-tiles:/data/tiles/ overv/openstreetmap-tile-server importCheck for the following message at the end of the process:
INFO:root: Import completeStart the tile server:
docker run -p 8080:80 -v osm-data:/data/database --shm-size="192m" -v osm-tiles:/data/tiles/ -d overv/openstreetmap-tile-server runNote: The amount of shared memory for the docker container has been increased to 192 MB to ensure successful processing of the united-kingdom-latest.osm.pbf data. It might be necessary to further increase the amount of shared memory for other larger datasets.
Check to see that it is working by browsing to:
http://your.server.ip.address:8080If this installation is on your own computer, you can browse to:
http://localhost:8080
