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
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
PGLite is fully functional for development, testing, and light-usage desktop scenarios. For production multi-tenant deployments, use a real Postgres instance (Neon works great).
Related
- Self-Hosting Guide — Production deployment with Postgres
- Docker Guide — Containerized deployment
- SDK Reference — Using the TypeScript SDK