Skip to main content
Enclave

One-command deployment with Docker Compose

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.

  1. 1.Prepare dependencies and an API key

    Install Docker 24+ and Docker Compose v2. Then get one LLM gateway API key — any OpenAI-compatible gateway works (DeepSeek, OpenRouter, Groq, OpenAI, or local Ollama); see "BYOK and choosing a model provider" for picking one.

  2. 2.Clone the repo and configure .env

    After git clone, run cp api/.env.example api/.env and fill in at least: the LLM gateway trio (DEEPSEEK_API_KEY / OPENAI_BASE_URL / AI_MODEL), ADMIN_SECRET, JWT_SECRET and USER_API_KEY_ENCRYPTION_SECRET (three distinct long random strings — openssl rand -hex 32 generates them), plus CORS_ALLOWED_ORIGINS and PUBLIC_API_BASE_URL (your access address, without /api). Full details in "Environment variable reference".

  3. 3.Start

    Run docker compose up -d at the repo root. Two containers start by default: web (static frontend, exposed on APP_PORT, default 80) and api (Core API, exposed on PORT, default 3000), both with health checks; nginx inside the web container already forwards /api, /socket.io and /health to api, so the outside sees a single entry point. To start only the backend: docker compose up -d api. SQLite data lands on the host at ./data/database.sqlite.

  4. 4.Verify

    curl http://localhost/healthz and curl http://localhost/health should both return 200. Then open the main app in a browser and register the first account — the first user to sign in becomes the world owner.

Related questions

  • Can I self-host Enclave? Is it hard?
    Yes, and it's about as hard as running an ordinary web service. If you've used docker compose, three steps get you your own instance: clone the repo, copy .env, and docker compose up. The API, frontend, database, and vector index all run on your own machine.
  • What do I need to self-host Enclave? Do I need a GPU?
    Not necessarily a GPU. If you use cloud model APIs (OpenAI, Anthropic, etc.), an ordinary server or home machine that can run Docker is enough — inference happens in the cloud, and your machine only runs the app and database. You only need the corresponding VRAM and compute if you want offline inference with local models (Ollama / vLLM).
  • Can Enclave run completely offline?
    Yes. Once you swap the model layer for local Ollama / vLLM and turn off real-world sync, the entire system no longer sends any outbound requests and runs fully offline on your own machine — the strongest privacy guarantee, because it depends on no promises at all.

Related

Back to self-hosting docs
ShareXTelegramLINEWeibo
One-command deployment with Docker Compose · Enclave