Skip to content
LocusQ

A Rust tile server for open and sealed tiles

Tilex serves vector tiles from .pmtiles and .mbtiles files, sealed .lqtiles archives, and published map styles with their glyphs and sprites. TLS ends at your reverse proxy; Tilex speaks plain HTTP.

Maps

0.4.1Free + Pro

01What it does

Tiles and TileJSON from one set of routes

GET /tiles/{tileset}/{z}/{x}/{y}.{ext} returns a tile and GET /data/{tileset}.json its TileJSON 3.0.0. Open tiles carry an ETag and Cache-Control: public, max-age=86400.

text
GET  /tiles/{tileset}/{z}/{x}/{y}.{ext}
GET  /data/{tileset}.json
GET  /maps/{id}/style.json
POST /v1/session
GET  /healthz

Sealed tiles the server never decrypts (Pro)

A client mints a session with POST /v1/session and sends X-Session-Id. Tilex rewraps each sealed tile for that session. Without a valid session the answer is a 404, identical to an unknown tileset.

toml
[storage_keys]
sk-1 = "LOCUSQ_STORAGE_KEY_SK_1"   # the variable holds the 64-hex-char key

Keys from the environment only

Admin and user keys come from LOCUSQ_TILEX_ADMIN_KEYS and LOCUSQ_TILEX_USER_KEYS, never from a config file. Unknown or removed config keys stop startup, and errors name the key path, never a value.

bash
LOCUSQ_TILEX_SERVER__PORT=7001
LOCUSQ_TILEX_SECURITY__AUTH__SESSION_TTL_SECS=900
LOCUSQ_TILEX_MBTILES_POOL_SIZE=8

02Install

Run Tilex yourself

  1. Get access

    The repositories and packages are private while LocusQ is in private release. Ask for access and say which tools you need.

  2. Build and check the image

    Cargo runs only inside the Dockerfile stages. The runtime image runs as uid 10001 and holds the binary and config/default.toml.

    bash
    bash scripts/docker-test.sh image    # runtime image checks
  3. Create an admin key

    Keys are comma-separated, each at least 32 characters.

    bash
    export LOCUSQ_TILEX_ADMIN_KEYS="$(openssl rand -hex 24)"
  4. Mount your tiles and start it

    Mount tilesets at /data/tiles and published maps at /data/maps. The public listener is port 6543. Metrics are on 9543: never publish that port.

Serve your first tileset

The guide lists the routes, the keys and the settings worth knowing.