Skip to main content

Multi-user RAG server with team access control — built on zettabrain-rag

Project description

ZettaBrain Teams

Multi-user RAG server with team access control — the commercial layer built on zettabrain-rag.

  • JWT-based login with admin / user roles
  • Teams with manager / member / viewer roles
  • Per-team isolated document collections (ChromaDB)
  • Full audit log — every query recorded
  • Confidence scoring on every answer
  • Single-page web UI with admin console

Quick install (Linux server, run as root)

# 1. Install pipx if needed
python3 -m pip install pipx && python3 -m pipx ensurepath

# 2. Install zettabrain-teams
pipx install git+https://github.com/zettabrain/zettabrain-teams

# 3. Run the one-command setup (installs Ollama, pulls models, creates systemd service)
sudo zettabrain-teams-setup

That's it. The setup script:

  • Installs Ollama if not present
  • Pulls llama3.1:8b (~5 GB) and nomic-embed-text (~274 MB)
  • Creates /opt/zettabrain-teams/{data,chromadb,certs}
  • Registers and starts a zettabrain-teams systemd service

Then open http://<your-server-ip>:7861 in a browser.
The default admin password is printed to the console on first boot.


Setup options

sudo zettabrain-teams-setup \
  --port 7861 \
  --llm  llama3.1:8b \
  --embed nomic-embed-text \
  --no-systemd        # skip systemd, start manually instead

Starting / stopping

# Managed by systemd after setup
sudo systemctl start   zettabrain-teams
sudo systemctl stop    zettabrain-teams
sudo systemctl restart zettabrain-teams
sudo journalctl -u zettabrain-teams -f   # live logs

# Or start manually (e.g. dev/testing)
zettabrain-teams --port 7861

Firewall

Open port 7861 on your firewall or cloud security group so users can reach the UI.

AWS example:

aws ec2 authorize-security-group-ingress \
  --group-id sg-xxxxxxxx \
  --protocol tcp --port 7861 --cidr 0.0.0.0/0

UFW example:

sudo ufw allow 7861/tcp

Admin workflow

  1. Log in at http://<ip>:7861 with admin + the generated password
  2. Admin → Users — create user accounts
  3. Admin → Teams & Members — create a team, expand it, add users with roles
  4. Ingest documents for a team:
    ZETTABRAIN_CHROMA=/opt/zettabrain-teams/chromadb/<team-slug> \
    ZETTABRAIN_DOCS=/path/to/your/documents \
    zettabrain-ingest
    
  5. Users log in, select their team from the sidebar, and start chatting

Configuration

/opt/zettabrain-teams/teams.env is created on first setup:

Variable Default Description
ZBT_PORT 7861 Server port
ZETTABRAIN_LLM_MODEL llama3.1:8b Ollama LLM model
ZETTABRAIN_EMBED_MODEL nomic-embed-text Ollama embed model
OLLAMA_HOST http://localhost:11434 Remote Ollama if not local
ZBT_JWT_SECRET auto-generated JWT signing secret (auto-created)
ZBT_TOKEN_EXPIRE 480 Token expiry in minutes

Requirements

  • Linux (Ubuntu 20.04+ recommended)
  • Python 3.9+
  • 8 GB RAM minimum (16 GB recommended for llama3.1:8b)
  • ~10 GB disk for models

GPU is optional — Ollama runs in CPU-only mode if no GPU is detected.


Architecture

zettabrain-teams (port 7861)
├── FastAPI + SQLModel (SQLite)     — users, teams, audit log
├── JWT auth                         — login / token
├── ChromaDB per team               — /opt/zettabrain-teams/chromadb/<slug>/
└── zettabrain-rag                  — hybrid_retrieve(), RAG prompt, embeddings
        └── Ollama (port 11434)     — LLM + embeddings

Upgrading

pipx upgrade zettabrain-teams
# or reinstall from GitHub for latest commit:
pipx reinstall zettabrain-teams
sudo systemctl restart zettabrain-teams

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zettabrain_teams-0.1.0.tar.gz (45.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zettabrain_teams-0.1.0-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file zettabrain_teams-0.1.0.tar.gz.

File metadata

  • Download URL: zettabrain_teams-0.1.0.tar.gz
  • Upload date:
  • Size: 45.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for zettabrain_teams-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aa0006f489bc0e8dc7dbf0396282079d09695c63cece7eacc42457e50877e14a
MD5 4aac0b97e6299990c3a7a55c6ec0d106
BLAKE2b-256 66a830cdda9557dac7cc6f1823ffc48a8e34c8eacc86578e664c9f285f5a8e51

See more details on using hashes here.

File details

Details for the file zettabrain_teams-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zettabrain_teams-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3150d5c04ba1db86060dfc823aacbc0950bc4005ec2b981e014cd5875d2161e5
MD5 f68c1c0f9cda6675bfddefd8c42f9458
BLAKE2b-256 ac0d1d932989e2ab7f5490d51c820f25f1afc181d63abfa894930bf958ef8778

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page