Jeremy
Self-Hosting

Deployment

Step-by-step guide to deploying Jeremy on Cloudflare.

1. Clone the Repository

git clone https://github.com/ianmuench/jeremy.git
cd jeremy

2. Install Dependencies

npm install

3. Create Cloudflare Resources

Create the D1 database:

wrangler d1 create jeremy-db

Create the R2 bucket:

wrangler r2 bucket create jeremy-docs

Create the Vectorize index:

wrangler vectorize create docs-index --dimensions=768 --metric=cosine

Each command outputs an ID. You'll need these in the next step.

4. Update wrangler.jsonc

Open wrangler.jsonc in the packages/app directory and update the binding IDs with the values from the previous step:

{
  "d1_databases": [
    {
      "binding": "DB",
      "database_name": "jeremy-db",
      "database_id": "<your-d1-database-id>"
    }
  ],
  "r2_buckets": [
    {
      "binding": "DOCS_BUCKET",
      "bucket_name": "jeremy-docs"
    }
  ],
  "vectorize": [
    {
      "binding": "VECTORIZE",
      "index_name": "docs-index"
    }
  ]
}

5. Set Secrets

Set the authentication secret (use a random string of at least 32 characters):

wrangler secret put BETTER_AUTH_SECRET

If using GitHub OAuth:

wrangler secret put GITHUB_CLIENT_ID
wrangler secret put GITHUB_CLIENT_SECRET

If using Google OAuth:

wrangler secret put GOOGLE_CLIENT_ID
wrangler secret put GOOGLE_CLIENT_SECRET

6. Run Migrations

Apply the D1 database schema:

wrangler d1 migrations apply jeremy-db --remote

7. Deploy

wrangler deploy

Wrangler will build and deploy your Jeremy instance. Once complete, it outputs the URL for your deployment.

Verify

Visit your deployment URL in a browser. You should see the Jeremy dashboard. Create an account, generate an API key, and configure the CLI and MCP server to point at your new instance.