Skip to content
LocusQ

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

  1. Schema: create the locusq.* tables in PostGIS.
  2. DataLab: map your own PostGIS tables into the schema.
  3. pg2osm: write the schema out as an OSM PBF.
  4. DataGen: write Who's On First, GeoNames and Placeholder data from locusq.place.
  5. TileGen: build PMTiles from the PBF, and seal them as .lqtiles for Pro.
  6. Tilex: serve the tiles and published styles.
  7. MapLab: edit styles, make fonts and icons, publish to Tilex.
  8. GL JS: draw the map in the browser.
  9. Router: build routing graphs from the PBF and GTFS, and serve one routing API.
  10. Geocoder: import OSM, Who's On First and GeoNames, or DataGen output, and serve search.
  11. 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_KEYS and LOCUSQ_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 init writes.
  • 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.