Back to services

TileServer GL

Vector and raster maps with GL styles. Server side rendering by Mapbox GL Native. Map tile server for Mapbox GL JS, Android, iOS, Leaflet, OpenLayers, GIS via WMTS, etc.

View alternatives to TileServer GL
Suggest edit
Open source
Self-hostable
BSD-2-Clause
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Overview

TileServer GL is an open-source map tile server maintained by MapTiler. It can publish vector tiles and GL styles (Style JSON) directly, and it can also render vector tiles into raster tiles (PNG/JPEG, etc.) on the server side. This lets clients and GIS software that don't support WebGL vector rendering use the same map.

Key features

  • Style serving: Provides style JSON, fonts, icons and other resources for direct use by vector map clients such as MapLibre GL JS.
  • Raster tile rendering: Renders vector data into raster tiles on the server according to a style, suitable for traditional raster clients such as Leaflet and OpenLayers.
  • WMTS capabilities document: Provides a WMTS Capabilities endpoint, making it easy to connect desktop GIS software such as QGIS.
  • Static map images: Generates static map images from a center point, zoom level or extent, which can be embedded in web pages, emails or reports.
  • Source data access: Serves the underlying vector tile data directly, and outputs TileJSON metadata and TileJSON arrays.
  • Static files, font list and health check: Makes operations monitoring and front-end integration easier.
  • Remote tile fetching: Supports fetching tiles from remote sources, with a configurable timeout.
  • Hot configuration reload: The configuration file can be reloaded without fully restarting the service.

Target users and use cases

Suited to developers, GIS engineers and enterprise teams who need to host their own map service. For example, building a private basemap from OpenStreetMap-derived data, serving maps in an intranet or offline environment, or avoiding the billing and quotas of commercial map APIs.

Installation and deployment

The official documentation offers three installation methods:

  1. Docker: The official image works out of the box and is the easiest way to deploy. You can mount a directory containing tile data and run it; the documentation also explains how to set --port in a Docker environment.
  2. npm: Install tileserver-gl globally through npm; a Node.js environment is required. Because it includes native rendering dependencies, it has certain system library requirements.
  3. tileserver-gl-light: A lightweight version without native dependencies. It is simpler to install, but does not support server-side raster rendering and only provides services such as vector tiles and styles.

The simplest usage is to start the server with a tile data file as an argument, then open the built-in preview page in a browser to view the map. For more complex scenarios you can use a JSON configuration file, in which the options, styles and data sections set global options, styles and data sources respectively.

Production deployment recommendations

The official documentation includes a production deployment guide:

  • Use Nginx as a reverse proxy and cache
  • Configure Cloudflare caching rules to speed up tile delivery
  • Guard against Host header poisoning (HNP) attacks

Notable characteristics

  • A single set of vector data and styles can output both vector and raster formats, compatible with both new and old clients.
  • A built-in preview page makes it easy to debug styles and data.
  • Maintained by MapTiler, with close ties to the MapLibre ecosystem.