This guide is for developing Clira locally. If you only want to run the product, use docs/self-host.md instead.
- Node.js 22.x
- npm 10.x
- Docker + Docker Compose
- Google Cloud project with Gmail API + Pub/Sub
npm install
cp .env.example .envFor local next dev, set:
NEXTAUTH_URL=http://localhost:3000If you switch back to Docker self-host, set NEXTAUTH_URL back to http://localhost:13000 or just rely on APP_PUBLIC_URL inside containers.
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile core up -d db redisnpm run migrate:deployTerminal A:
npm run devTerminal B:
npm run start:workerTerminal C:
npm run start:gmail-pull-workerTerminal D:
npm run start:cronOptional Terminal E for inbox search backfill:
npm run start:backfill-worker- App:
http://localhost:3000 - Liveness:
http://localhost:3000/api/health - Deep readiness:
http://localhost:3000/api/health?deep=1
If you want to run the full stack from a locally built image instead of the published GHCR image:
docker compose -f docker-compose.yml -f docker-compose.dev.yml --profile core up --build -dAdd --profile backfill if you want the backfill worker as well.
- The contributor path keeps the production-style split between app, worker, Gmail pull worker, and cron.
cronrequiresCRON_SECRET.- Mailbox token encryption requires
EMAIL_ENCRYPT_SECRETandEMAIL_ENCRYPT_SALT. - Use
npm run setup:google -- --project-id <id> --mode pull --write-envto provision Gmail Pub/Sub into.env.