Skip to content

Running the engine (gispulse engine)

The GISPulse engine is a FastAPI server that exposes rule pipelines, ESB triggers, datasets, and an event-bus WebSocket. The gispulse engine command runs it headlessly — no SPA mounted, just the API.

When should I use gispulse engine instead of gispulse portal? When you don't need the visual workbench: automated pipelines, the Tauri desktop sidecar, a backend for a separately-hosted portal, third-party integrations consuming the REST API. For local visual editing on a workstation, use gispulse portal.

Command

bash
gispulse engine [OPTIONS]
OptionDefaultDescription
--port, -p0 (auto)Listening port. 0 = auto-detect a free port (handy for the Tauri sidecar).
--host127.0.0.1Bind host. Use 0.0.0.0 to expose on the LAN or behind a reverse proxy.
--engine, -educkdbSpatial backend: duckdb (local), postgis (server), hybrid (Pro, mix of both).
--data-dir, -d~/.gispulse/dataDatasets upload directory.
--no-browserfalseDon't open the browser on the API root.

Boot and "ready" mode

On boot, gispulse engine emits a JSON line on stdout so a parent process (Tauri, supervisor, script) can read the port and PID:

GISPULSE_READY:{"port": 8001, "host": "127.0.0.1", "engine": "duckdb", "pid": 12345}
GISPulse at http://127.0.0.1:8001

The GISPULSE_READY: prefix is stable — you can parse this line in a sidecar.

API surface

In full mode (the default), the engine mounts the following FastAPI routers. Full reference: REST API and the live /docs Swagger UI.

EndpointMethodDescription
/healthGETHealthcheck — returns {"status": "ok"}. Used by the gispulse portal healthcheck.
/metricsGETPrometheus metrics (text format). Enabled in full mode.
/datasetsGET / POST / DELETEDataset management (upload, list, delete).
/projectsGET / POSTMulti-rule workspaces.
/scenariosGET / POSTScenario = project + versioned ruleset.
/rulesCRUDRules (capabilities + parameters).
/triggersCRUDESB triggers (DML watchers, webhooks).
/relationsCRUDSpatial / attribute relations between layers.
/jobsGETAsync jobs (status, result).
/capabilitiesGETList available capabilities + parameter schemas.
/marketplaceGETThird-party capabilities catalog (Pro).
/examplesGETMode 2 portal Try-it — embedded demo datasets.
/stylesGET / PUTQML / SLD / classification breaks.
/schedulesCRUDCron pipelines (Pro).
/pipelinesPOSTPipeline execution.
/sessionsPOSTEphemeral DuckDB sessions.
/ws/eventsWebSocketLive ESB event stream.

Live OpenAPI documentation

Once the engine is running, open http://localhost:8001/docs (Swagger UI) or http://localhost:8001/redoc (ReDoc) to explore the exact API surface of your installed version.

Authentication

TierAuthenticationNotes
CommunityNone (localhost only by default)Fine for personal use and CI.
Pro / EnterpriseAPI key (X-API-Key header) or OIDCEnabled in full mode when GISPULSE_REQUIRE_AUTH=1.

For a server deployment (host 0.0.0.0), always enable auth:

bash
GISPULSE_TIER=pro \
GISPULSE_REQUIRE_AUTH=1 \
GISPULSE_API_KEYS="key1,key2" \
gispulse engine --host 0.0.0.0 --port 8001

Backend duckdb vs postgis

FlagBackendUse case
--engine duckdbDuckDB local + GPKG/GeoParquetPortable mode, no external DB, < ~10M features.
--engine postgisPostgreSQL/PostGIS serverPersistence, pg_notify triggers, multi-user. Requires GISPULSE_DSN.
--engine hybridDuckDB compute + PostGIS storage (Pro)Heterogeneous volumes, max throughput.

Details in Engines — DuckDB / PostGIS / Hybrid.

bash
# PostGIS mode against a Postgres in Docker
GISPULSE_DSN=postgresql://gispulse:secret@localhost:5432/gispulse \
gispulse engine --engine postgis --port 8001

Reverse proxy (Caddy / nginx)

To expose the engine over HTTPS on a VPS, bind it to 127.0.0.1:8001 and let the reverse proxy terminate TLS.

Caddy (auto-TLS via Let's Encrypt)

caddy
api.example.com {
    reverse_proxy 127.0.0.1:8001
    encode gzip zstd

    # WebSocket (event bus) — Caddy handles this natively
    @ws {
        path /ws/*
    }
    reverse_proxy @ws 127.0.0.1:8001
}

nginx (manual TLS)

nginx
server {
    listen 443 ssl http2;
    server_name api.example.com;

    ssl_certificate     /etc/letsencrypt/live/api.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/api.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto https;

        # WebSocket upgrade
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 3600s;
    }
}

See Deployment for the full stack (PostGIS + Caddy + Prometheus + backups).

Cohabitation with gispulse portal

Both commands launch the same create_app() FastAPI app. The only difference:

CommandMounts SPADefault authUse case
gispulse enginenoenv-controlledserver, Tauri sidecar, third-party integration
gispulse portalyes (/portal)disabled (localhost)workstation, visual onboarding

You can absolutely:

  1. Run gispulse engine --host 0.0.0.0 on a VPS.
  2. Run gispulse portal --backend=https://your.engine.example.com on your laptop.

The GH-Pages portal then connects to the remote engine — see Running the Portal locally.

See also

Published under AGPL-3.0 license.