Self-Hosting StudioBrain
StudioBrain can be self-hosted on your own infrastructure for full control over data, performance, and security.
Deployment Modes
StudioBrain supports three deployment modes:
| Mode | Database | Best For |
|---|---|---|
| Desktop (default) | SQLite (local file) | Single user, no server required |
| Self-Hosted | SQLite (Rust server; Litestream replication in the enterprise edition) | Small teams, on-premise |
| Cloud (SaaS) | Cloudflare Workers data plane (identity in D1, content in a ProjectStore Durable Object + R2, RAG in DO-SQLite) | Multi-tenant teams |
Quick Start
The self-hosted Community Edition runs from docker/docker-compose.yml in studiobrain-core:
- Clone the repository and copy the example environment file (
cp .env.example .env) - Optionally set AI provider keys in
.env(OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_API_KEY,GROK_API_KEY) - Run
docker compose -f docker/docker-compose.yml up -d - Open
http://localhost:3100
The stack has no TLS. For HTTPS, put your own reverse proxy (Caddy, nginx, Traefik) in front of it.
Architecture Overview
A full production deployment separates the application server from the AI/GPU server:
- App Server: Docker Compose stack with two services:
frontend(Next.js 15, port 3100) andbackend(Rustsb-server+ SQLite, port 8201). Content lives in./content/(source of truth);./db/holds the rebuildable SQLite cache. Add your own reverse proxy for HTTPS. - AI Server (optional): GPU-accelerated AI service for local model inference
- Databases (cloud mode): identity lives in the CONTROL_PLANE D1 (accounts worker), content in the ProjectStore Durable Object plus R2 object storage, and RAG indexes in DO-SQLite — the SaaS runs on Cloudflare Workers, not self-hosted infrastructure
Requirements
- Docker and Docker Compose
- A domain name with DNS pointing to your server
- 4 GB RAM minimum (8 GB+ recommended for AI features)
- (Optional) NVIDIA GPU for local AI inference
Full deployment details, infrastructure configuration, network topology, and security hardening are documented in the internal operations guide (requires authentication).
Next Steps
- Getting Started — Set up your first project
- Settings and Configuration — Configure your StudioBrain instance
- Sync and Collaboration — Set up cloud sync and team access