Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MBTiles and PMTiles File Sources

Martin can serve any type of tiles from PMTile and MBTile files. To serve a file from CLI, simply put the path to the file or the directory with *.mbtiles or *.pmtiles files. A path to PMTiles file may be a URL. For example:

martin  /path/to/mbtiles/file.mbtiles  /path/to/directory   https://example.org/path/tiles.pmtiles

You may also want to generate a config file using the --save-config my-config.yaml, and later edit it and use it with --config my-config.yaml option.

tip

See our tile sources explanation for a more detailed explanation on the difference between our available data sources.

Autodiscovery

For mbtiles or local pmtiles files, we support auto discovering at startup. This means that the following will discover all mbtiles and pmtiles files in the directory:

martin  /path/to/directory

warning

For remote PMTiles, we don’t currently support auto-discovery. If you want to implement this feature, please see https://github.com/maplibre/martin/issues/2180

We also don’t currently support refreshing the catalog at runtime. If you want to implement this feature, please see https://github.com/maplibre/martin/issues/288 instead.

Serving PMTiles from local file systems, http or Object Storage

The settings avaliable for a PMTiles source depend on the backend:

For local sources, you need to provide the path or URL. For example:

martin  path/to/tiles.pmtiles

The available schemes are:

  • file:///path/to/my/file.pmtiles
  • path/to/my/file.pmtiles

You can also configure this via the configuration file:

pmtiles:
  sources:
    tiles: file:///path/to/my/file.pmtiles