Tegola (developed by Go Spatial and open-source contributors under the MIT license) is a high-performance Mapbox Vector Tile (MVT) server written in Go. Built for web GIS engineers, spatial data architects, and mapping platforms, Tegola connects to PostgreSQL/PostGIS databases and OGC GeoPackage files to generate, simplify, and cache standards-compliant vector tiles—exposing `/maps/` style endpoints, TileJSON metadata, and built-in caching backends (file system, AWS S3, Redis, or Azure Blob) from a single static binary.
1. In-Depth Review: Why Spatial Backend Engineers Use Tegola
- Dual PostGIS & GeoPackage Data Provider Support: Connects directly to PostgreSQL/PostGIS databases as well as local OGC GeoPackage (`.gpkg`) files, making it easy to test vector tiles offline with GeoPackage and scale in production with PostGIS.
- Built-In Multi-Backend Tile Caching & Pre-Seeding: Includes native cache drivers for local disk, AWS S3, Redis, and Azure Blob Storage alongside CLI commands (`tegola cache seed` / `purge`) to pre-generate regional zoom pyramids.
- Zoom-Aware SQL Queries & Geometry Simplification: Lets you define per-zoom SQL queries (`!ZOOM!`, `!BBOX!`) inside a clean `config.toml` file so dense nationwide datasets render rapidly at low zoom levels while showing full detail zoomed in.
2. Key Features & Capabilities
- Mapbox Vector Tile (MVT v2) Generation: Encodes spatial layers into compressed `.pbf` vector tiles compatible with MapLibre GL JS, OpenLayers, Mapbox GL, and QGIS.
- PostGIS & GeoPackage (`GPKG`) Providers: Pulls vector features directly from PostgreSQL/PostGIS queries or standalone `.gpkg` databases.
- Built-In Tile Caching (`File`, `S3`, `Redis`, `Azure`): Caches generated vector tiles automatically and supports targeted bounding-box or tile-list cache seeding and invalidation.
- Automatic Map Capabilities & TileJSON Endpoints: Exposes `/capabilities` and per-map TileJSON endpoints for instant integration with web mapping libraries.
- Single Cross-Platform Binary & Docker Container: Deploys as a self-contained Go binary on Linux, macOS, and Windows or via official Docker images.
- 100% Free & Open-Source (MIT License): Free to self-host, modify, and deploy in government, academic, and commercial mapping systems.

- Official Links: Free Trial, Free / Education & Pricing
Always download Tegola binaries, Docker tags, and documentation directly from official Go Spatial portals:
- Official Tegola Documentation & Getting Started: https://tegola.io/
- Official Tegola GitHub Repository & Releases: https://github.com/go-spatial/tegola
- Official Tegola Configuration & Caching Docs: https://tegola.io/documentation/configuration/
- Official MapLibre GL JS Vector Tile Reference: https://maplibre.org/maplibre-gl-js/docs/
4. Step-by-Step Installation Guide
- Check Operating System & Data Provider Requirements: Confirm your Linux, macOS, or Windows (64-bit) host has access to a PostgreSQL/PostGIS database or an OGC GeoPackage (`.gpkg`) file.
- Download the Official Tegola Binary: Visit https://github.com/go-spatial/tegola/releases and download the compiled binary archive for your OS (`tegola_linux_amd64`, `tegola_darwin_arm64`, or `tegola_windows_amd64.exe`).
- Extract & Verify CLI Version: Extract the binary into a directory in your system `PATH` and run `tegola version` in your terminal to confirm installation.
- Create a `config.toml` File: Define your `[webserver]`, `[[providers]]` (PostGIS or GeoPackage connection), and `[[maps]]` layers in a `config.toml` file.
5. How to Use Tegola: Beginner Workflow
- Prepare Spatial Layers in PostGIS or GeoPackage: Ensure your vector tables have valid geometries, a defined `SRID` (such as `EPSG:3857` or `EPSG:4326`), and spatial indexes (`GIST` in PostGIS or R-Tree in GeoPackage).
- Configure `config.toml` with Provider & Map Layers: Define your PostGIS/GeoPackage provider block and map layers with SQL queries (`SELECT ST_AsBinary(geom) AS geom, id, name FROM roads WHERE geom && !BBOX!`).
- Start the Tegola Server: Run `tegola serve --config=config.toml` (default port `8080`) in your terminal.
- Inspect Capabilities & Built-In Viewer: Open `http://localhost:8080/` in your browser to preview your vector layers or inspect `http://localhost:8080/capabilities/<map_name>.json`.
- Pre-Seed Cache & Connect to MapLibre GL JS: Optionally run `tegola cache seed --config=config.toml --min-zoom=0 --max-zoom=12` for fast static tile responses, and load the TileJSON endpoint in MapLibre GL JS or OpenLayers.
6. Frequently Asked Questions (FAQ)
- Is Tegola completely free for commercial web mapping applications?Yes. Tegola is open-source software released under the permissive MIT License at zero cost.
- Can Tegola serve vector tiles without PostgreSQL installed?Yes. Tegola includes a native GeoPackage (`gpkg`) provider, allowing you to serve vector tiles directly from a single `.gpkg` file on disk without running a database server.
- How does Tegola compare to Martin and pg_tileserv?Martin and pg_tileserv auto-discover PostGIS tables with minimal configuration, while Tegola uses an explicit `config.toml` file that gives fine-grained control over multi-zoom SQL queries, GeoPackage data sources, and built-in S3/Redis/filesystem tile caching.