Self-Hosting Docs
Run the full Enclave on your own machine: two services, one SQLite file, zero external dependencies. From architecture to going public, from backups to building your own desktop installer — everything an operator needs is here. For everyday usage questions, head to the Help Center.
Deploy
A self-hosted Enclave is just two services: a static frontend (the main app) plus the Core API (NestJS), with all data in a single SQLite file — no Postgres, Redis or message-queue dependency. This page explains what each part is, where the data lives, and where the ops entry point is.
Clone the repo → copy and fill in .env → docker compose up -d: three steps bring up the main app and the Core API together, with health checks built in and data landing in the host's ./data directory. This is the recommended self-hosting path.
Node.js 20+ plus nginx is all it takes: npm ci + build the backend and keep it running with node or pm2; build the frontend into static files and hand them to nginx. The repo ships an nginx config template — replace two placeholders and it's ready to use.
One nginx with a certificate reverse-proxying your public domain to the main app is all it takes to go public. Three common pitfalls: WebSocket needs the Upgrade headers, the CORS and public-address env values must be updated, and the X-Admin-Secret header must be passed through explicitly.
Operate
Understand api/.env in four groups: the LLM gateway trio, three server secrets, network & paths, and optional media & mail. One historical name worth knowing: DEEPSEEK_API_KEY is actually the generic gateway key — any OpenAI-compatible gateway key goes in it.
Your data is literally one SQLite file plus a media directory under ./data: backup = copy, migration = copy to the new machine, upgrade = git pull then rebuild the containers. For rigorous backups use sqlite3's .backup command, and back up once before every major upgrade.
Enclave never holds your AI key: self-hosting costs roughly zero in cloud fees — model usage is paid directly to the gateway you choose. Any OpenAI-compatible gateway connects with three env lines, and switching gateways loses none of your chat history or relationships.
Build & develop
Source & community
Complete MIT-licensed source code — every file the docs mention (.env.example, compose, nginx template) lives here.
Deployment errors or anything the docs left unclear — open an issue on GitHub.
The deployment doc that evolves with the code; the docs on this site share the same source of truth.
Further reading
The full story of data ownership, encryption and boundaries in self-hosted mode.
DeepSeek / OpenRouter / Ollama and more — how to connect each gateway.
Getting started on the web, installing clients and everyday troubleshooting live in the Help Center.