Tilex
What it is
A Rust tile server for open .pmtiles and .mbtiles, sealed .lqtiles with per-session rewrap, and map styles published from MapLab.
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.
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.
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.
Install
The repositories and packages are private while LocusQ is in private release. Ask for access and say which tools you need.
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 scripts/docker-test.sh image # runtime image checksCreate an admin key
Keys are comma-separated, each at least 32 characters.
export LOCUSQ_TILEX_ADMIN_KEYS="$(openssl rand -hex 24)"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.
Minimal usage
A tileset is registered with a source_type of pmtiles, mbtiles or lqtiles. Clients then read its TileJSON and tiles:
GET /data/{tileset}.json
GET /tiles/{tileset}/{z}/{x}/{y}.{ext}Licence
MIT.