Requirements
- Node.js 20+
- LLM API key (OpenAI, Anthropic, Google, xAI, OpenRouter, etc.)
- PostgreSQL (recommended for production)
Docker
Storage backends
| Backend | Config | Use case |
|---|---|---|
| File (default) | storage: "file" | Single instance, simple setup |
| SQLite | storage: "sqlite" | Single instance, better performance |
| PostgreSQL | storage: "postgres" | Production, multi-instance |
.polpo/polpo.json:
Environment variables
| Variable | Description |
|---|---|
POLPO_API_KEY | Protect the API with a key (required in production) |
POLPO_MODEL | Default model (e.g. anthropic:claude-sonnet-4-5) |
POLPO_CORS_ORIGINS | Allowed CORS origins (comma-separated) |
DATABASE_URL | PostgreSQL connection string |
OPENAI_API_KEY | OpenAI API key |
ANTHROPIC_API_KEY | Anthropic API key |
XAI_API_KEY | xAI API key |
OPENROUTER_API_KEY | OpenRouter API key |
Reverse proxy
Behind nginx:When to use cloud instead
| Self-hosted | Cloud |
|---|---|
| Full control | Zero ops |
| Your infrastructure costs | Pay-as-you-go |
| Manual scaling | Auto-scale + scale-to-zero |
| You manage backups | Managed Postgres (Neon) |
| No sandboxing | Isolated sandbox per agent |