Self-Hosting Steward
Steward is designed to be self-hosted. This guide covers deploying Steward on your own infrastructure.Requirements
- Runtime: Bun v1.0+
- Database: PostgreSQL 15+ (or Neon for serverless)
- Node.js: 18+ (for build tooling)
- OS: Linux (Ubuntu 22.04+ recommended), macOS, or Windows WSL2
Quick Start
Environment Variables
Database Setup
Run the Drizzle migrations to set up the database schema:tenants— Multi-tenant isolationagents— Agent identity and metadataencrypted_keys— AES-256-GCM encrypted wallet keysagent_wallets— Wallet address mappingspolicies— Policy rules per agenttransactions— Transaction history and audit trailapproval_queue— Manual approval queuesecrets— Encrypted API credentialssecret_routes— Credential injection routes
Running the API
Creating Your First Tenant
Use the platform API or create directly:The
apiKeyHash should be a SHA-256 hash of your API key. If you pass a non-hash string, Steward will hash it for you. The raw API key is returned once on creation.Production Deployment
Systemd Service
Reverse Proxy (Nginx)
Security Checklist
- Set a unique
STEWARD_MASTER_PASSWORD(32+ chars, random) - Set a separate
STEWARD_JWT_SECRET - Use TLS for all connections (API + database)
- Restrict database access to the Steward server only
- Set
STEWARD_PLATFORM_KEYfor admin operations - Run as non-root user
- Enable firewall (only expose ports 443 and SSH)
- Back up the database regularly
Related
- Docker Deployment — Deploy with Docker Compose
- Architecture — System design overview
- API Overview — API authentication