The reference deployment is the lower-level Gateway path for teams that do not want JJHub. It runs one Gateway process, one SQLite database file, and a TLS reverse proxy.Documentation Index
Fetch the complete documentation index at: https://smithers.sh/llms.txt
Use this file to discover all available pages before exploring further.
Docker Compose
From the repo root:7331 inside the compose network and Caddy exposes HTTP/TLS. The compose file mounts a SQLite volume at /data and reads short-lived bearer grants from /data/tokens.json.
Issue a local token grant:
Single Host
Usedeploy/reference/systemd/smithers-gateway.service for the Gateway process and deploy/reference/systemd/smithers-caddy.service for Caddy. Copy smithers-gateway.env.example to /etc/smithers/gateway.env, then set:
SMITHERS_GATEWAY_MODULE can export register(gateway) or a default function. Register workflows there.
Gateway Environment
| Variable | Default | Purpose |
|---|---|---|
PORT | 7331 | Gateway listen port inside the container or host. |
SMITHERS_TOKEN_STORE | /data/tokens.json | JSON token grant store used by token auth. |
SMITHERS_GATEWAY_MODULE | /workspace/gateway.mjs | Module that registers workflows on startup. |
SMITHERS_GATEWAY_HEARTBEAT_MS | 15000 | WebSocket heartbeat interval. |
SMITHERS_GATEWAY_EVENT_WINDOW | 10000 | Per-run replay window for streamRunEvents. |
SMITHERS_GATEWAY_HEADERS_TIMEOUT_MS | 30000 | Maximum time to receive complete HTTP headers. |
SMITHERS_GATEWAY_REQUEST_TIMEOUT_MS | 60000 | Maximum time to receive and parse a complete HTTP request, including body. |
Kubernetes
The minimal manifests indeploy/reference/k8s/ create:
- a
smithersnamespace - a single Gateway
Deployment - a SQLite
PersistentVolumeClaim - a token
Secret - a
ServiceandIngress
Reconnect
Streams acceptafterSeq. Clients should reconnect with the last seen sequence. If the Gateway still has the missed events in the bounded per-run window, it replays them. If the window has truncated, it emits GapResync with fromSeq, toSeq, and a run snapshot, then continues with available events. Heartbeat frames are separate from run events.
All HTTP responses include X-Smithers-API-Version: v1.