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
| Layer | Technology |
|---|---|
| Runtime | Node.js (18+), MapLibre GL Native (C++ bindings) |
| Data storage | MBTiles (SQLite) or GeoJSON files, raster image files |
| Networking | Express‑style HTTP server, supports HTTPS via self‑signed or external certs |
| Containerization | Docker images (maptiler/tileserver-gl, maptiler/tileserver-gl-light) |
| Build tooling | npm, 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}.pngor.pbf, with optional query parameters for style overrides. - Style Customization: Inline JSON or external
.jsonfiles; 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
wmtsendpoint 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
| Criterion | TileServer GL | Competitors |
|---|---|---|
| Performance | GPU‑accelerated rendering via MapLibre GL Native | Pure JS renderers slower for large datasets |
| Licensing | MIT, free to host and modify | Some alternatives require commercial licenses for rasterization |
| Extensibility | Plugin hooks, style overrides | Closed APIs in some commercial tile servers |
| Container Support | Official Docker images, easy volume mounting | Manual install required for many |
| Community & Docs | Active GitHub repo, CI pipeline | Limited 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
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Postorius
Self-hosted apis-services
µStreamer
Fast MJPEG streaming from V4L2 devices
HomeServerHQ
All‑in‑one home server, secure and simple
Discount Bandit
Track and notify on price drops across multiple stores
Lemmy
Decentralized link aggregator and forum
Huly
All-in-one platform for team planning, chat, and virtual office
