Clients
SecondBrain iOS, Apple Watch, Claude Desktop, Cursor / VS Code
Deploy your own AI-powered memory backend.
SecondBrain Pro can connect to your own Cloudflare Workers backend, giving you full control over your data with global edge performance (<50ms latency). The backend is powered by shodh-cloudflare, an open-source distributed AI memory system.
SecondBrain iOS, Apple Watch, Claude Desktop, Cursor / VS Code
Receives requests over the REST API and MCP.
D1 database, Vectorize index, Workers AI
Premium is required for the custom backend and MCP integration. Local capture and free iCloud sync work without this setup. Connected MCP clients can access backend memories under their own provider policies. Read the data handling details.
npm install -g wranglergit clone https://github.com/doobidoo/shodh-cloudflare.git
cd shodh-cloudflare
wrangler d1 create shodh-memory
Note the database_id from the output. You need it in the next step.
wrangler vectorize create shodh-vectors --dimensions=384 --metric=cosine
cp worker/wrangler.toml.example worker/wrangler.toml
Edit worker/wrangler.toml and replace the database_id with your value from step 2.
cd worker
wrangler d1 execute shodh-memory --file=../schema.sql --remote
wrangler secret put API_KEY
Choose a strong API key. You enter the same key in the SecondBrain iOS app.
npm install
npm run deploy
Your worker is deployed to https://shodh-memory.YOUR-SUBDOMAIN.workers.dev
curl https://shodh-memory.YOUR-SUBDOMAIN.workers.dev/
You should see: {"message":"SHODH Memory API is running"}
https://shodh-memory.YOUR-SUBDOMAIN.workers.devYour API key is stored in the iOS Keychain and never leaves your device unencrypted.
Search with natural language time expressions:
Each memory can track emotional context with valence, arousal and emotion labels. This helps you understand patterns in how you feel about different topics.
Cloudflare usage is separate from the one-time Premium app purchase. Check current Workers, D1, Vectorize and Workers AI plans and limits before deploying. Free allowances do not guarantee zero cost for your workload.