BetterStarter logo
BetterStarter
Docs
Quick Start

Local Setup

Fastest way to run BetterStarter locally in under 2 minutes.

Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).

Prerequisites

  • Node.js 22+
  • pnpm (npm, yarn, bun also works)
  • Docker Desktop (or Docker Engine) running locally

Quick Start

git clone https://github.com/azizali/betterstarter.git mybetterapp
cd mybetterapp
pnpm install
pnpm setup -- --yes --start

Open http://localhost:3000

What pnpm setup does

The setup command automates local bootstrapping:

  • Creates or starts a Docker Postgres container
  • Uses a database name from your folder name (or your provided name)
  • Creates .env.local from .env.sample when needed
  • Sets APP_BASE_URL, BETTER_AUTH_URL, DATABASE_URL
  • Generates BETTER_AUTH_SECRET if missing/placeholder
  • Runs database sync with Drizzle (db:push)
  • Optionally starts the dev server when --start is passed

Command Reference

CommandPurpose
pnpm setupInteractive local bootstrap
pnpm setup -- --yesBootstrap using defaults
pnpm setup -- --yes --startForward flags explicitly through pnpm
pnpm setup -- --db-name mybetterappUse a custom Postgres database name
pnpm setup -- --helpShow setup CLI help

Flag Notes

FlagDescription
--yesSkip prompts and use defaults
--startStart the app after setup completes
--db-nameOverride the default database name
--Required when forwarding flags through pnpm

Local Email Behavior

You do not need Plunk for local setup.

EnvironmentBehavior
Development without PlunkAuth emails are logged to the server console
Development with PlunkReal emails are sent
ProductionA real email provider is required

Manual Database Setup

Use this path if you do not want the Docker automation.

pnpm db:generate
pnpm db:migrate
pnpm dev

Before running those commands:

  • Create your local database
  • Set DATABASE_URL in .env.local

See the local database guide

Next step

On this page