Skip to content

Installation

Prerequisites

If using Martin with PostgreSQL database, you must install PostGIS with at least v3.0+. PostGIS v3.1+ is recommended.

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=postgres://user@host:port/db \
           -v /path/to/config/dir:/config \
           ghcr.io/maplibre/martin:1.16.1 \
           --config /config/config.yaml

Note

The default image is lean and does not include server-side style rendering. If you need it, use the batteries-included -full image variant instead, tagged :latest-full or :<version>-full. It is larger because it bundles the maplibre_native runtime libraries.

From Binary Distributions Manually

You can download martin from GitHub releases page.

Platform x64 ARM-64
Linux .tar.gz (gnu)
.tar.gz (gnu, full)
.tar.gz (musl)
.deb
.tar.gz (gnu)
.tar.gz (gnu, full)
.tar.gz (musl)
macOS .tar.gz
Windows .zip

Note

The standard binaries do not include server-side style rendering. The -full Linux-gnu tarballs do. They add the rendering feature and its bundled native libraries.

Rust users can install pre-built martin binary with cargo-binstall and cargo.

cargo install cargo-binstall
cargo binstall martin
martin --help

From package

To install with apt source and others, we need your help to improve packaging for various platforms.

Homebrew

If you are using Homebrew you can install martin using

brew install martin
martin --help

Debian packages (x86_64) manually

curl -O https://github.com/maplibre/martin/releases/latest/download/debian-x86_64.deb
sudo dpkg -i ./debian-x86_64.deb
martin --help
rm ./debian-x86_64.deb

Arch Linux

The AUR carries martin, maintained by the community. With an AUR helper such as yay:

yay -S martin
martin --help

Nix

nixpkgs carries martin, usually a release or two behind.

nix-shell -p martin --run 'martin --help'

Building from source

If you install Rust, you can build martin from source with Cargo:

cargo install martin --locked
martin --help

Optional features

Features prefixed with unstable- are not included in default builds, Homebrew, Debian packages, or the Docker image. To experiment with them, build Martin from source with the feature enabled:

cargo install martin --locked --features=unstable-duckdb

The currently available unstable features are unstable-cog for COG sources and unstable-duckdb for DuckDB / GeoParquet sources.

Server-side style rendering is also left out of the default feature set. To include it (Linux only), add the rendering feature. You will need its build dependencies first (just install-dependencies).

cargo install martin --locked --features rendering

Platform-Specific Build Notes

Windows

When building from source on Windows, please note the following feature limitations:

  • rendering: This feature is not available on Windows. It requires maplibre_native which currently only supports MacOS and Linux. For updates, see maplibre/maplibre-native-rs.