Sign inSign up

airgapaxis/sovereigndoc

By airgapaxis

•Updated about 19 hours ago

Local-first, air-gapped AI Document Intelligence and Second Brain backend by Idea To Fact LLC.

Image
0

139

airgapaxis/sovereigndoc repository overview

⁠SovereignDoc Backend (Community Edition)

⁠Local-First AI Document Intelligence & Second Brain Platform

⁠License: AGPL-3.0 GitHub SovereignDoc is an open-core, local-first AI Document Intelligence and Second Brain workstation built on the AirGap Axis Platform by Idea To Fact LLC. This container hosts the high-performance FastAPI backend, responsible for document parsing (PDF/DOCX), ONNX-accelerated vector embedding (FastEmbed bge-small-en-v1.5), ChromaDB vector search, BM25 keyword search, SQLite WAL metadata indexing, deterministic contract clause analysis, and local LLM integration via Ollama.

⁠🔒 Zero-Telemetry & Air-Gap Guarantees

  • 100% Local Compute: Operates completely offline without external SaaS API calls.
  • Host Loopback Default: Binds to 127.0.0.1 so services are never exposed to external LAN/WAN interfaces.
  • Telemetry Disabled: Pre-configured with ANONYMIZED_TELEMETRY=False, DO_NOT_TRACK=1, and HF_HUB_OFFLINE=1.

⁠⚡ Quick Start

⁠1. Bring Your Own Ollama (BYOO)

SovereignDoc pairs with a native Ollama instance running on your host machine to leverage hardware acceleration (NVIDIA CUDA / Apple Silicon Metal) without container overhead. Ensure Ollama is running on your host:

ollama run llama3.2:3b
⁠2. Run with Docker

Run the backend container bound strictly to localhost, connecting to host Ollama:

docker run -d \
  --name sovereigndoc-backend \
  -p 127.0.0.1:8000:8000 \
  -e OLLAMA_BASE_URL="http://host.docker.internal:11434" \
  -v sovereigndoc_data:/root/.sovereigndoc \
  --add-host host.docker.internal:host-gateway \
  --restart unless-stopped \
  airgapaxis/sovereigndoc-backend:1.1.0-community

⁠🐳 Full-Stack Deployment (Docker Compose)

To run the complete stack (Backend + React Frontend), use the canonical docker-compose.yml:

services:
  backend:
    image: airgapaxis/sovereigndoc-backend:1.1.0-community
    container_name: sovereigndoc-backend
    ports:
      - "127.0.0.1:8000:8000"
    environment:
      OLLAMA_BASE_URL: http://host.docker.internal:11434
      SOVEREIGNDOC_HOST: 0.0.0.0
      SOVEREIGNDOC_PORT: 8000
      ANONYMIZED_TELEMETRY: "False"
      DO_NOT_TRACK: "1"
    volumes:
      - sovereigndoc_data:/root/.sovereigndoc
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped
  frontend:
    image: airgapaxis/sovereigndoc-frontend:1.1.0-community
    container_name: sovereigndoc-frontend
    ports:
      - "127.0.0.1:5173:5173"
    depends_on:
      - backend
    restart: unless-stopped
volumes:
  sovereigndoc_data:

Launch with:

docker compose up -d

⁠Access the application UI at http://127.0.0.1:5173⁠.

⁠⚙️ Key Environment Variables

VariableDefaultPurpose
OLLAMA_BASE_URLhttp://host.docker.internal:11434Endpoint for the host's native Ollama runtime
SOVEREIGNDOC_HOST0.0.0.0In-container bind address
SOVEREIGNDOC_PORT8000In-container listening port
ANONYMIZED_TELEMETRYFalseDisables telemetry across Chroma and backend libraries
HF_HUB_OFFLINE1Forces HuggingFace hubs to stay strictly offline
FASTEMBED_CACHE_PATH/app/.cache/fastembedPath for baked-in ONNX embedding model weights

⁠📂 Data Persistence

Persistent SQLite databases, Chroma vector vaults, and extracted document text are stored in /root/.sovereigndoc inside the container. Mount a named volume or host directory:

  • Named volume: -v sovereigndoc_data:/root/.sovereigndoc
  • Local folder: -v ${PWD}/data:/root/.sovereigndoc

⁠📜 License & Governance

Tag summary

Content type

Image

Digest

sha256:77a884ae8…

Size

509.6 MB

Last updated

about 19 hours ago

docker pull airgapaxis/sovereigndoc