MCPSERV.CLUB
TileServer GL

TileServer GL

Self-Hosted

Serve vector and raster tiles with MapLibre rendering

Active(100)
2.6kstars
0views
Updated 10 days ago
TileServer GL screenshot

Overview

Discover what makes TileServer GL powerful

TileServer GL is a high‑performance, self‑hosted map tile server that renders vector and raster tiles on the fly using **MapLibre GL Native**. It serves tiles to a wide range of clients, including MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, and GIS software via WMTS. The core engine is written in **Node.js** (v18+), with optional Docker images for rapid deployment. The server parses MBTiles, GeoJSON, and raster sources defined in a JSON configuration file, then streams the resulting tiles over HTTP/HTTPS.

Server‑side rasterization

Full MapLibre GL style support

WMTS & HTTP tile endpoints

Extensible configuration

Overview

TileServer GL is a high‑performance, self‑hosted map tile server that renders vector and raster tiles on the fly using MapLibre GL Native. It serves tiles to a wide range of clients, including MapLibre GL JS, Android, iOS, Leaflet, OpenLayers, and GIS software via WMTS. The core engine is written in Node.js (v18+), with optional Docker images for rapid deployment. The server parses MBTiles, GeoJSON, and raster sources defined in a JSON configuration file, then streams the resulting tiles over HTTP/HTTPS.

Key Features

  • Server‑side rasterization of vector tiles, allowing lightweight clients that only need PNG/JPEG tiles.
  • Full MapLibre GL style support – any JSON‑style stylesheet that works in the browser can be rendered on the server.
  • WMTS & HTTP tile endpoints for compatibility with legacy GIS stacks.
  • Extensible configuration: styles, data sources, and access controls are defined in a single JSON file.
  • Docker‑ready: pre‑built images on Docker Hub, with volume mounting for data and config.

Technical Stack

LayerTechnology
RuntimeNode.js (18+), MapLibre GL Native (C++ bindings)
Data storageMBTiles (SQLite) or GeoJSON files, raster image files
NetworkingExpress‑style HTTP server, supports HTTPS via self‑signed or external certs
ContainerizationDocker images (maptiler/tileserver-gl, maptiler/tileserver-gl-light)
Build toolingnpm, CI pipelines on GitHub Actions

The server parses the MBTiles database with sqlite3, then feeds tile data to MapLibre GL Native, which performs GPU‑accelerated rendering. The resulting PNG/JPEG tiles are cached in memory for subsequent requests, providing sub‑second latency for most tile ranges.

Core Capabilities

  • Tile Rendering API: GET /tiles/{z}/{x}/{y}.png or .pbf, with optional query parameters for style overrides.
  • Style Customization: Inline JSON or external .json files; supports dynamic property expressions.
  • Access Control: Basic auth and API key support via environment variables or config flags.
  • Metrics & Logging: Built‑in Prometheus metrics endpoint and structured logs for observability.
  • Extensibility Hooks: Plugins can intercept tile requests, modify styles on the fly, or add custom data sources.

Deployment & Infrastructure

TileServer GL is designed for self‑hosting on a single machine or in a Kubernetes pod. The Docker image is lightweight (~300 MB) and exposes port 8080 by default. For high‑traffic scenarios, a reverse proxy (NGINX, Traefik) can be used to provide SSL termination and load balancing. Horizontal scaling is straightforward: multiple instances behind a shared storage (e.g., NFS or object store with MBTiles) or using Docker Swarm/K8s stateful sets.

Integration & Extensibility

  • MapLibre GL JS: The same styles used client‑side can be rendered server‑side, ensuring pixel‑perfect consistency.
  • OpenLayers & Leaflet: Standard XYZ tile layers consume the same endpoints without modification.
  • GIS WMTS: The server exposes a wmts endpoint that can be consumed by QGIS or ArcGIS.
  • Webhooks: While not natively supported, the HTTP API can be wrapped in a custom webhook to trigger re‑rendering or cache invalidation.

Developer Experience

The configuration is a single JSON file, making it easy to version control and automate. The documentation includes clear sections on Node prerequisites, Docker usage, and test harnesses (xvfb-run). Community support is active on GitHub Issues, with a CI pipeline that ensures compatibility across Node versions. The tileserver-gl-light variant offers a pure‑JavaScript fallback for environments where native compilation is infeasible.

Use Cases

  • Mobile App Backends: Serve pre‑rendered raster tiles to iOS/Android clients that cannot perform vector rendering.
  • Custom GIS Portals: Deploy a lightweight tile server for internal mapping tools that need to consume WMTS.
  • Rapid Prototyping: Spin up a local Docker instance, drop an MBTiles file, and instantly host a styled map.
  • High‑Availability Services: Run multiple instances behind a load balancer to handle millions of tile requests per day.

Advantages Over Alternatives

CriterionTileServer GLCompetitors
PerformanceGPU‑accelerated rendering via MapLibre GL NativePure JS renderers slower for large datasets
LicensingMIT, free to host and modifySome alternatives require commercial licenses for rasterization
ExtensibilityPlugin hooks, style overridesClosed APIs in some commercial tile servers
Container SupportOfficial Docker images, easy volume mountingManual install required for many
Community & DocsActive GitHub repo, CI pipelineLimited documentation in some forks

For developers who need a fast, customizable tile server that can be deployed with minimal operational overhead, TileServer GL offers a compelling blend of performance, flexibility, and open‑source freedom.

Open SourceReady to get started?

Join the community and start self-hosting TileServer GL today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
NOASSERTION
Stars
2.6k
Technical Specs
Pricing
Open Source
Database
None
Docker
Official
Supported OS
LinuxDocker
Author
maptiler
maptiler
Last Updated
10 days ago