Skip to content
Özer Özdaş edited this page Oct 11, 2026 · 3 revisions

Castra wiki

Castra is a self-hosted backend on Cloudflare Workers + D1: policies compiled to SQL, Better Auth, auto REST and a read-only MCP server for AI agents. The project is at v0.1.1.

This wiki holds practical, hands-on notes. The reference documentation lives in the repository, so it is versioned with the code.

Start here

npm create @castra-kit@latest my-app
cd my-app
cp .dev.vars.example .dev.vars    # set BETTER_AUTH_SECRET: openssl rand -base64 32
pnpm db:migrate:local
pnpm dev

Wiki pages

Reference (in the repository)

Questions go to Discussions. Vulnerabilities go to a private advisory, never to an issue.

Clone this wiki locally