GWC MBTiles layer plugin

This plugin allows adding a GWC MBTiles Layer to GeoServer’s cached Tile Layers configuration so that GeoServer can load cached tiles from ready-to-use MBTiles.


As a community module, make sure you have downloaded the

To install the module, unpack the zip file contents into the GeoServer WEB-INF/lib directory and restart GeoServer.

Configuring a MBTilesLayer

The configuration of a new MBTilesLayer can be done by editing the geowebcache configuration file located in <data_dir>/gwc/geowebcache.xml

Locate the layers section of the config or add it if missing.

Then define a new mbTilesLayer node for each new MBTilesLayer you want to add. A GWC configuration containing a configured MBTiles Layer would look like this:

  <!-- ... -->
    <!-- Other layer definitions may be here -->
        <description>Raster Layer with Countries</description>
    <!-- Other layer definitions may be here -->

A few note on the above configuration elements of an mbtilesLayer definition:

  • tilesPath (mandatory) is the path to the MBTiles file containing the tiles.

  • tileSize is the size of the tiles stored on the MBTiles file. When not set, it will be defaulted to 256.

  • name (optional) represents the name to be assigned to the layer. If not specified, the name field of the metadata table stored in the MBTiles file will be used. Make sure to define it in case the MBTiles metadata is missing it.

  • metaInformation with title and description are optional tags. They will be exposed in the capabilities document when available.