Run the BetterPost app on your machine with no external accounts, for contributors and self-hosters.
The BetterPost app (API, dashboard, MCP server and these docs) runs locally with zero external services:
pnpm install
cp .env.local.example .env.local
pnpm devhttp://localhost:3000/sign-in and enter any email address.pnpm dev (look for a [dev-email] block)./dashboard. Create an API key there.The API is then served at http://localhost:3000/api/v1 and the MCP server at http://localhost:3000/api/mcp/mcp:
curl -s http://localhost:3000/api/v1/health/auth -H "x-access-key: $BETTERPOST_API_KEY"Outside production, services that are not configured fall back to local versions:
| Service | Local stand-in |
|---|---|
| Postgres | File-backed PGlite at DATABASE_URL=pglite:./.data/pglite, migrated on first use |
| Printed to the server console | |
| Redis | In-memory due index, rate limiter and auth storage |
| Object storage (R2) | Files under .data/uploads, served by /api/dev/uploads/* (presigned uploads PUT there too) |
pnpm dev and a second process cannot share .data/pglite. Delete .data/ to reset
everything.pnpm dev:cron in a second terminal; it calls the cron
endpoint every 60 seconds.