Jeremy
Self-Hosting

Configuration

Environment variables and bindings for your Jeremy deployment.

Secrets

Secrets are set with wrangler secret put <name> and are not stored in your source code.

SecretRequiredDescription
BETTER_AUTH_SECRETYesRandom string used to sign auth tokens. Use at least 32 characters.
GITHUB_CLIENT_IDNoGitHub OAuth app client ID
GITHUB_CLIENT_SECRETNoGitHub OAuth app client secret
GOOGLE_CLIENT_IDNoGoogle OAuth app client ID
GOOGLE_CLIENT_SECRETNoGoogle OAuth app client secret

Environment Variables

Set these in your wrangler.jsonc under [vars]:

VariableDescription
BASE_URLThe public URL of your Jeremy instance (e.g. https://jeremy-app.ian-muench.workers.dev)

Bindings

Configure these in your wrangler.jsonc:

D1 Database

{
  "d1_databases": [
    {
      "binding": "DB",
      "database_name": "jeremy-db",
      "database_id": "<your-database-id>"
    }
  ]
}

Stores library metadata, documentation chunks, user accounts, sessions, and API keys.

R2 Bucket

{
  "r2_buckets": [
    {
      "binding": "DOCS_BUCKET",
      "bucket_name": "jeremy-docs"
    }
  ]
}

Stores raw chunk data as backups.

Vectorize Index

{
  "vectorize": [
    {
      "binding": "VECTORIZE",
      "index_name": "docs-index"
    }
  ]
}

Stores 768-dimension vector embeddings for semantic search.

Workers AI

{
  "ai": {
    "binding": "AI"
  }
}

Used to generate embeddings with the @cf/baai/bge-base-en-v1.5 model.

Browser Rendering

{
  "browser": {
    "binding": "BROWSER"
  }
}

Provides headless Chromium for crawling JavaScript-rendered documentation pages.

Compatibility Flags

Jeremy requires the nodejs_compat compatibility flag:

{
  "compatibility_flags": ["nodejs_compat"]
}