Skip to content

Self-hosting

Memoturn’s engine is MIT-licensed and nothing in it is gated. You can run the whole thing on your own Cloudflare account, separate from the service at memoturn.com.

The full guide — every binding to provision, the secrets to set, the database steps, and the deploy ordering that nothing enforces for you — lives in the repository, where it sits next to the wrangler.jsonc files it describes and stays honest as they change:

docs/SELF_HOSTING.md

  1. Provision a Vectorize index, two R2 buckets, five KV namespaces, two Queues, and a Hyperdrive against your Postgres.
  2. Replace the resource IDs in apps/api, apps/ingest, and apps/mcp’s wrangler.jsonc. The ones committed here point at Memoturn’s production account.
  3. Set MEMOTURN_ISSUER_SIGNING_JWK on both memoturn-api and memoturn-mcp. Miss it on the MCP worker and OAuth requests answer 503 while every other credential keeps working.
  4. Set MEMOTURN_ENV=production. It is the production signal — the dev-secret guard and the fail-closed abuse rules key off it, never off an origin.
  5. Run migrations, then deploy apps/api first: it defines the Durable Object classes the other workers bind to.

Everything: five-leg hybrid search, the temporal fact graph, claims and presence, review handoff, the skills and rules registries, the secret redaction pipeline, and a standards-complete OAuth 2.1 authorization server. No feature is held back for a hosted tier.

Billing is the one thing not in the repo — orgs.plan is written by a separate private Worker, and this codebase only ever writes "free". Plan caps still apply, so raise them yourself if you need more than the free tier allows.