Skip to content

Docker Image and Virtual Machine for a minimal effort OpenStreetMap tile server

License

Notifications You must be signed in to change notification settings

zedxxx/osm-tile-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read this in other language: Русский

Quick Start

  1. Install VMware Workstation Pro or VirtualBox
  2. Download the pre-configured virtual machine osm-tile-server-vm.zip
  3. Extract it to a drive with sufficient capacity, preferably an SSD
  4. Launch VMware/VirtualBox, open the extracted virtual machine and power it on
  5. After boot completes, log in as root with password alpine
  6. Import a small test region (Europe, Luxembourg) using command osm import europe/luxembourg
  7. After import completes, start the server: osm up and wait a few seconds
  8. Open your browser at http://<your-vm-ip-address>/#10/49.8163/6.1331
  9. Verify that the map displays properly
  10. Import your desired region: osm import <your-region-name>

Notes:

  • If you're using VirtualBox, before starting the virtual machine for the first time, you need to add two hard drives in the following order: first system.vmdk, then data.vmdk. Also, make sure the network settings are correct
  • You can find the machine's IP address with command ifconfig eth0
  • The first time you import a region, approximately 2 GB of data will be downloaded from the internet, including the region's latest .osm.pbf file, the Docker image and external data containing country and sea boundaries. Subsequent imports will only download the region file. When running the import command without specifying a region name (osm import), cached data will be imported without an initial download. If you do not need the country and sea boundaries, change the cache folder in the /osm/docker-compose.yml file from /mnt/data/cache to /mnt/data/cache-empty – this will save several minutes during import.
  • Regions are downloaded from geofabrik.de. You can find the exact region name from the URL of your desired region
  • Only one region can be imported; each subsequent import removes results of the previous one
  • If you need to import two or more regions, they must be merged into one. Use the osmium utility for this (Windows 64-bit version here). The merged file should be copied to /mnt/data/region.osm.pbf (the region.poly file with region boundaries is optional)
  • To access the virtual machine via SSH, use PuTTY, for FTP and SFTP use WinSCP. A portable "all-in-one" package can be found here.

Additional Information

Repository structure:

  • image - scripts and Docker file for building the docker image. The ready image is available at DockerHub
  • tools - scripts that facilitate interaction with the OSM server. Available commands are described in tools/readme.md
  • vm - script and instructions for setting up a virtual machine "from scratch"
  • docker-compose.yml - configuration for creating and running the docker container

About

Docker Image and Virtual Machine for a minimal effort OpenStreetMap tile server

Topics

Resources

License

Stars

Watchers

Forks

Contributors 30