Advanced
Coming Soon

Self-Hosting

Run your own Contxt backend using Supabase. Your memory stays on your infrastructure — no data leaves your control.

Requirements

  • A Supabase project (free tier works)
  • pgvector extension enabled (for semantic search)
  • OpenAI API key (for embedding generation)

1. Set up the database

Run the migration files from the supabase/migrations/ directory in your Supabase project's SQL editor, in order:

00001_initial_schema.sql
00002_auth_schema.sql
00003_rls_policies.sql
00004_pgvector.sql
...

2. Deploy the edge function

Deploy the embed edge function to enable automatic embedding generation on sync:

supabase functions deploy embed

Set the required secret:

supabase secrets set OPENAI_API_KEY=sk-...

3. Configure the CLI

Point the CLI at your Supabase instance by setting environment variables or passing the URL to init:

export CONTXT_SUPABASE_URL=https://your-project.supabase.co
export CONTXT_SUPABASE_ANON_KEY=your-anon-key

Then run contxt auth login to authenticate against your instance.