Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 2.19 KB

local_server_debian.md

File metadata and controls

48 lines (27 loc) · 2.19 KB

How to run a local VersaTiles server on debian

In this guide, we will explain how to set up and run a local VersaTiles server. We will also discuss how to download the necessary files and start the server with an optional frontend.

Note

The VersaTiles server is written in Rust (Repo: versatiles-rs).

Step 1: Install the VersaTiles tool

We provide precompiled binaries for multiple plattforms and architectures. See Installing Versatiles: Downloading the binary.

But you might prefer to compile it from source using Rust and Cargo: See Installing Versatiles: Building from source.

Step 2: Download the VersaTiles planet

The VersaTiles data file is a compact file containing all map tiles for the entire planet. You can download it with wget:

wget -c https://download.versatiles.org/osm.versatiles

If you need only a part of the planet, e.g. only a continent/country/city, you can download this part using the versatiles tool. See: download tiles

Once the download is complete, save the .versatiles file in a directory of your choice.

Step 3: Download the optional frontend

The frontend might be helpful because it includes JavaScript libraries, map styles, and fonts. You can download the latest frontend using wget by running the following command:

wget "https://github.com/versatiles-org/versatiles-frontend/releases/latest/download/frontend.br.tar"

Save the frontend.br.tar file in the same directory as the .versatiles file.

Step 3: Start the VersaTiles server

To start the VersaTiles server, open a shell, navigate to the directory where you saved the .versatiles file and the frontend file, and run:

versatiles serve -s frontend.br.tar "[osm]osm.versatiles"

The VersaTiles server will now be running locally on your machine. To test it open http://localhost:8080 in your browser.

For more information, see the documentation on using the VersaTiles server.