Prerequisites
If using Martin with PostgreSQL database, you must install PostGIS with at least v3.0+, v3.1+ recommended.
Binary Distributions
You can download martin from GitHub releases page.
Building with Cargo
If you install Rust, you can build martin from source with Cargo:
cargo install martin --locked
martin --help
Homebrew
If you are using macOS and Homebrew you can install martin using Homebrew tap.
brew tap maplibre/martin
brew install martin
Docker
Martin is also available as a Docker image. You could either share a configuration file from the host with the container via the -v
param, or you can let Martin auto-discover all sources e.g. by passing DATABASE_URL
or specifying the .mbtiles/.pmtiles files or URLs to .pmtiles.
export PGPASSWORD=postgres # secret!
docker run -p 3000:3000 \
-e PGPASSWORD \
-e DATABASE_URL=postgresql://user@host:port/db \
-v /path/to/config/dir:/config \
ghcr.io/maplibre/martin --config /config/config.yaml