Documentation Index
Fetch the complete documentation index at: https://docs.steward.fi/llms.txt
Use this file to discover all available pages before exploring further.
Local Mode with PGLite
Steward includes a PGLite backend — full PostgreSQL running in-process via WebAssembly. This means you can run a complete Steward instance with zero external dependencies: no Postgres server, no Redis, no Docker. This is ideal for:- Local development — spin up Steward in seconds, no database setup
- Desktop apps — Steward as an embedded sidecar (e.g., Electrobun apps)
- Testing — in-memory mode for fast, isolated tests
- Offline use — full functionality without network connectivity
Starting Local Mode
Environment Variables
| Variable | Default | Description |
|---|---|---|
STEWARD_DB_MODE | auto-detect | Set to pglite to force PGLite even if DATABASE_URL is set |
STEWARD_PGLITE_PATH | ~/.steward/data | Directory for persistent storage |
STEWARD_PGLITE_MEMORY | false | Set to true for in-memory (no persistence) |
STEWARD_MASTER_PASSWORD | auto-generated | Vault encryption key — auto-generated in local mode |
PORT | 3200 | API port |
STEWARD_BIND_HOST | 127.0.0.1 | Bind host — 127.0.0.1 in local mode for security |
In local mode,
STEWARD_MASTER_PASSWORD is auto-generated if not provided. This is fine for development but means vault data encrypted with the generated key cannot be decrypted after restart unless you set a fixed password.Auto-Detection
You can also use the regular API entry point — Steward auto-selects PGLite if:STEWARD_DB_MODE=pgliteis set, ORDATABASE_URLis not set
Using with the SDK
Local mode exposes the same REST API — point the SDK atlocalhost:3200:
Using with React Components
Data Persistence
PGLite persists data as files in the data directory:In-Memory Mode for Tests
For unit/integration tests, in-memory mode is fastest:Limitations vs Production Mode
| Feature | Local (PGLite) | Production (Postgres) |
|---|---|---|
| Full SQL support | ✅ | ✅ |
| Migrations | ✅ | ✅ |
| Concurrent writes | Single-writer | Multi-writer |
| Redis rate limits | ❌ (in-memory fallback) | ✅ |
| Webhook delivery | ✅ | ✅ |
| Performance | ~10ms queries | ~1ms queries |
| Scale | Single process | Horizontal |
Related
- Self-Hosting Guide — Production deployment with Postgres
- Docker Guide — Containerized deployment
- SDK Reference — Using the TypeScript SDK