Skip to content

Bridge setup

The bridge runs on your machine (or a private GPU server) and gives the browser access to Ollama, a larger persistent vector database, and Pro embedding models.

Prerequisites

  • Node.js ≥ 18 or Bun
  • Ollama installed and running
  • A Pro account (the bridge validates your JWT on every request)

Install

Terminal window
git clone https://github.com/datgacon/private-llm-platform-refactor
cd private-llm-platform-refactor
pnpm install

Configure

Terminal window
cp bridge/.env.example bridge/.env

Open bridge/.env and set:

SUPABASE_URL=https://xxxxxxxxxxxx.supabase.co # from your Pro account email

Leave everything else at defaults for a local setup.

Start

Terminal window
# Local machine (Mode 1 — browser on same machine)
pnpm bridge
# GPU server / RunPod (Mode 2 — browser on a different machine)
BRIDGE_HOST=0.0.0.0 pnpm bridge

The bridge starts on port 8788 by default.

Connect in the app

  1. Open contextsage.ai and sign in
  2. Go to Settings → Bridge
  3. Enter your bridge URL: ws://localhost:8788 (local) or ws://your-server:8788 (remote)
  4. Toggle Enable bridge — the status indicator turns green

Verify

The bridge panel shows connection status, chunk count, and uptime when connected. If you see a 401 error, your session token may have expired — sign out and back in.

Environment variables

All available options are documented in bridge/.env.example.