# DEPRECATED The functionality of the `mbtileserver-rs` has been migrated to the [Martin tile server](https://github.com/maplibre/martin). No further updates are planned for this project. > Note: This project started as a partial implementation of the API and features provided by [mbtileserver](https://github.com/consbio/mbtileserver) written in Go by [Brendan Ward](https://github.com/brendan-ward). It might diverge from that project in the future. ### mbtileserver [![Crates.io](https://img.shields.io/crates/v/mbtileserver.svg)](https://crates.io/crates/mbtileserver) [![Coverage Status](https://coveralls.io/repos/github/maplibre/mbtileserver-rs/badge.svg)](https://coveralls.io/github/maplibre/mbtileserver-rs) _Tested with rust 1.60_ A simple Rust-based server for map tiles stored in mbtiles format. ### Getting Involved Join the #maplibre slack channel at OSMUS: get an invite at [slack.openstreetmap.us](https://slack.openstreetmap.us/) ## Usage Run `mbtileserver --help` for a list and description of the available flags: ``` mbtileserver 0.1.7 A simple mbtiles server USAGE: mbtileserver [FLAGS] [OPTIONS] FLAGS: --disable-preview Disable preview map -h, --help Prints help information -V, --version Prints version information OPTIONS: --allowed-hosts "*" matches all domains and "." matches all subdomains for the given domain [default: localhost, 127.0.0.1, [::1]] -d, --directory Tiles directory [default: ./tiles] -H, --header
... Add custom header -p, --port Server port [default: 3000] ``` Run `mbtileserver` to start serving the mbtiles in a given folder. The default folder is `./tiles` and you can change it with `-d` flag. The server starts on port 3000 by default. You can use a different port via `-p` flag. You can adjust the log level by setting `RUST_LOG` environment variable. Possible values are `trace`, `debug`, `info`, `warn`, `error`. ### Endpoints | Endpoint | Description | |--------------------------------------------------------------|--------------------------------------------------------------------------------| | /services | lists all discovered and valid mbtiles in the tiles directory | | /services/\ | shows tileset metadata | | /services/\/map | tileset preview | | /services/\/tiles/{z}/{x}/{y}. | returns tileset tile at the given x, y, and z | | /services/\/tiles/{z}/{x}/{y}.json | returns UTFGrid data at the given x, y, and z (only for tilesets with UTFGrid) | ## Docker You can test this project by running `docker-compose up`. It starts a server on port 3000 and serves the tilesets in `./tiles` directory.