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.
| Secret | Required | Description |
|---|---|---|
BETTER_AUTH_SECRET | Yes | Random string used to sign auth tokens. Use at least 32 characters. |
GITHUB_CLIENT_ID | No | GitHub OAuth app client ID |
GITHUB_CLIENT_SECRET | No | GitHub OAuth app client secret |
GOOGLE_CLIENT_ID | No | Google OAuth app client ID |
GOOGLE_CLIENT_SECRET | No | Google OAuth app client secret |
Environment Variables
Set these in your wrangler.jsonc under [vars]:
| Variable | Description |
|---|---|
BASE_URL | The 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"]
}