Quick Start¶
The easiest way to deploy spieli is with the interactive installer. It downloads everything it needs, walks you through configuration, and optionally runs the first import.
Requirements¶
- Docker with the Compose plugin
bashopensslsha256sum(Linux) orshasum(macOS — useshasum -a 256 --checkinstead)
Install¶
TAG=v0.6.2 # check https://github.com/mfuhrmann/spieli/releases for the latest tag
curl -fsSL "https://github.com/mfuhrmann/spieli/releases/download/${TAG}/install.sh" -o install.sh
curl -fsSL "https://github.com/mfuhrmann/spieli/releases/download/${TAG}/install.sh.sha256" -o install.sh.sha256
sha256sum --check install.sh.sha256 && bash install.sh
What the installer does¶
- Asks for a deployment directory (default:
./spieli) - Asks for your deployment mode (
data-node,ui, ordata-node-ui) — which services to run - Asks for your app mode (
standaloneorhub) — how the frontend behaves (skipped fordata-node) - Asks for your OSM relation ID and Geofabrik PBF URL (for data-node and data-node-ui modes)
- Prompts for optional settings (port, UI links, zoom levels, hub registry URL)
- Generates a secure database password automatically
- Downloads
compose.ymlanddb/init.sqlinto the deployment directory - Generates
registry.jsonfor hub mode and enables its bind-mount incompose.yml - Offers to pull images, start the stack, and run the first import
Finding your OSM relation ID
Search for your city, Kreis, or district on Nominatim. The relation ID appears in the URL — e.g. openstreetmap.org/relation/62700 → ID is 62700.
Finding a PBF extract
Browse download.geofabrik.de for an extract covering your region. The PBF only needs to contain your region — a Bundesland extract works fine for a single Kreis.
Installation scenarios¶
The installer guides you through five supported scenarios. Two variables combine to define your setup: DEPLOY_MODE (which services run) and APP_MODE (how the frontend behaves).
| Scenario | DEPLOY_MODE |
APP_MODE |
What starts | Use when |
|---|---|---|---|---|
| Standalone | data-node-ui |
standalone |
DB + PostgREST + app | Single self-contained regional map (default) |
| Standalone + federated | data-node-ui |
standalone |
DB + PostgREST + app | Own regional map that also appears as a backend in an external hub |
| Hub only | ui |
hub |
App only | Aggregate multiple remote backends into one map |
| Hub + local backend | data-node-ui |
hub |
DB + PostgREST + app | Hub UI with a local data backend on the same host |
| Backend only | data-node |
— | DB + PostgREST | Provide data to an external hub, no local UI |
For standalone + federated: the installer asks for PARENT_ORIGIN (the hub's origin) to enable cross-origin embedding.
For hub scenarios: the installer asks for REGISTRY_URL and generates a starter registry.json. Edit it after setup to list your backends.
Managing the stack¶
After setup, manage the stack from your deployment directory:
cd spieli
# Start the stack
docker compose --profile data-node-ui up -d
# Re-import OSM data (clips to your region with osmium, then runs osm2pgsql)
docker compose --profile data-node run --rm importer
# Stop the stack
docker compose --profile data-node-ui down
Replace data-node-ui with whichever mode you chose at install time (DEPLOY_MODE in your .env).
Going public with HTTPS¶
The stack runs on plain HTTP (port 8080) by default. For a public deployment, set up a TLS-terminating reverse proxy.
spieli ships a ready-made Docker Compose stack with Traefik and Let's Encrypt. Install spieli first, then add the proxy:
curl -fsSL https://raw.githubusercontent.com/mfuhrmann/spieli/main/deploy/traefik/install-traefik.sh -o install-traefik.sh
bash install-traefik.sh
Traefik handles certificate issuance and renewal automatically — no manual cert steps. See HTTPS setup for the full walkthrough and firewall rules.
Contributing your region to a Hub¶
If someone is running a spieli Hub and you want your region to appear on it, stand up a data-node and send them your API URL. The hub operator then adds you to their registry.json.
1. Run the installer
TAG=v0.6.2 # check https://github.com/mfuhrmann/spieli/releases for the latest tag
curl -fsSL "https://github.com/mfuhrmann/spieli/releases/download/${TAG}/install.sh" -o install.sh
curl -fsSL "https://github.com/mfuhrmann/spieli/releases/download/${TAG}/install.sh.sha256" -o install.sh.sha256
sha256sum --check install.sh.sha256 && bash install.sh
When prompted for deployment mode, choose data-node or data-node-ui. Run the import when asked.
2. Expose /api/ over HTTPS
Run the Traefik installer (see above) and select data-node mode. This sets up HTTPS and adds the required CORS headers so the Hub's browsers can fetch your API cross-origin.
3. Verify
From a different machine:
curl -i https://your-city.example.com/api/rpc/get_meta
# expect: 200 OK, JSON body, Access-Control-Allow-Origin: * header
4. Send the hub operator your API URL: https://your-city.example.com/api
Running a Hub¶
If you operate a spieli Hub and want to add a new backend region, add it to your registry.json:
{
"instances": [
{ "slug": "existing-region", "url": "https://existing.example.com/api", "name": "Existing Region" },
{ "slug": "new-city", "url": "https://your-city.example.com/api", "name": "New City" }
]
}
The Hub re-reads registry.json every 5 minutes — no restart needed.
Choosing a slug
The slug is optional but recommended — it makes deep-links shareable and stable (e.g. https://hub.example.com/#new-city/W123456). Use lowercase ASCII letters, digits, and hyphens only.
For the full federation walkthrough including topology diagrams and verification steps, see Federated Deployment.
Next steps¶
- HTTPS setup — Traefik + Let's Encrypt reverse proxy
- Configuration reference — all available environment variables
- Troubleshooting — common problems and fixes
- Uninstall — remove the stack completely