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
git clone https://github.com/datgacon/private-llm-platform-refactorcd private-llm-platform-refactorpnpm installConfigure
cp bridge/.env.example bridge/.envOpen bridge/.env and set:
SUPABASE_URL=https://xxxxxxxxxxxx.supabase.co # from your Pro account emailLeave everything else at defaults for a local setup.
Start
# 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 bridgeThe bridge starts on port 8788 by default.
Connect in the app
- Open contextsage.ai and sign in
- Go to Settings → Bridge
- Enter your bridge URL:
ws://localhost:8788(local) orws://your-server:8788(remote) - 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.