User GuideSelf-Hosting

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:

ModeDatabaseBest For
Desktop (default)SQLite (local file)Single user, no server required
Self-HostedSingle PostgreSQL instanceSmall teams, on-premise
CloudSeparate Auth + Content PostgreSQL instancesMulti-tenant SaaS

Quick Start

The recommended self-hosted deployment uses Docker Compose with Caddy as the reverse proxy:

  1. Clone the repository and copy the example environment file
  2. Configure your environment variables (database URLs, JWT secret, AI service URL)
  3. Run docker compose up -d in the docker/ directory
  4. Caddy automatically handles HTTPS via Let’s Encrypt

Architecture Overview

A full production deployment separates the application server from the AI/GPU server:

  • App Server: Docker Compose stack running Frontend (Next.js), Backend (FastAPI), and Caddy (HTTPS)
  • AI Server (optional): GPU-accelerated AI service for local model inference
  • Databases (cloud mode): Separate PostgreSQL instances for auth data (PII) and content data

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