Self-hosting
LocusQ runs on your own servers. The services ship as Docker images or Compose stacks, Schema is a set of SQL migrations applied by a script, and GL JS is an npm package. The repositories and packages are private while LocusQ is in private release; ask for access first. The install page has the commands for each tool.
The pipeline
- Schema: create the
locusq.*tables in PostGIS. - DataLab: map your own PostGIS tables into the schema.
- pg2osm: write the schema out as an OSM PBF.
- DataGen: write Who's On First, GeoNames and Placeholder data from
locusq.place. - TileGen: build PMTiles from the PBF, and seal them as
.lqtilesfor Pro. - Tilex: serve the tiles and published styles.
- MapLab: edit styles, make fonts and icons, publish to Tilex.
- GL JS: draw the map in the browser.
- Router: build routing graphs from the PBF and GTFS, and serve one routing API.
- Geocoder: import OSM, Who's On First and GeoNames, or DataGen output, and serve search.
- TransitLab: edit GTFS feeds and export profiles for the transit engines.
You can also start from a raw Geofabrik extract and skip the data tools: TileGen and Router both take an OSM PBF directly.
Ports and keys
- Tilex: port 6543, keys in
LOCUSQ_TILEX_ADMIN_KEYSandLOCUSQ_TILEX_USER_KEYS; metrics on 9543, never published. - MapLab: 127.0.0.1:4000 by default, admin token in
MAPLAB_ADMIN_TOKEN. - Router: 127.0.0.1:8080 by default, keys in
ROUTER_API_KEYS. - Geocoder: 127.0.0.1:4000 by default, keys in the file
secrets initwrites. - DataLab server: port 3000 by default, token in
DATALAB_API_TOKEN. - TransitLab: 127.0.0.1:4100 by default, token in
TRANSITLAB_ADMIN_TOKEN.
MapLab and Geocoder both default to port 4000; set MAPLAB_PORT or API_PORT when they share a host.
Behind a proxy
Router, Geocoder, MapLab and TransitLab publish on 127.0.0.1 by default, and Tilex speaks plain HTTP. Put a TLS reverse proxy in front of anything you expose.