Installation
Install and configure the boilerplate — from zero to running in minutes.
Installation
Choose your path based on your environment and goals.
Quick Start (Recommended)
The fastest path to a running instance:
Linux / macOS / WSL:
git clone <YOUR_REPO_URL>
cd app
./setup.sh
Windows (PowerShell):
git clone <YOUR_REPO_URL>
cd app
.\setup.ps1
What the interactive setup handles automatically:
- Detects Docker availability
- Guides you through project name, auth, billing, and environment questions
- Generates
.envwith secure secrets - Installs dependencies (
pnpm install) - Runs database migrations
- Starts services
- Prepares the admin setup flow
Automated Production Setup
Use on a clean VPS for a zero-prompt deploy:
./setup.sh --production --auto
Optional flags:
--config=.env.setup— preload answers from a file--low-memory— optimize for 2–4 GB VPS--local— force local (PM2) mode--docker— force Docker mode
Manual Setup
1. Prepare Environment
cp .env.example .env
bash scripts/setup-secrets.sh
Edit .env and confirm key values:
APP_URL,BETTER_AUTH_URL,NEXT_PUBLIC_APP_URLmust share the same originAUTH_SECRET— min 32 charactersDATABASE_URL— your PostgreSQL connection stringREDIS_URL/REDIS_QUEUE_URL— Redis connection strings
2. Install Dependencies
pnpm install
3. Start Infrastructure
Docker (recommended for development):
docker compose up -d postgres redis-cache redis-queue
Local services: Start PostgreSQL and Redis using your system service manager.
4. Run Migrations
pnpm migrate
5. Start the App
Local development:
pnpm dev
PM2 standalone:
pnpm build
pm2 start ecosystem.config.cjs --env production
Full Docker stack:
docker compose up -d
Post-Install Verification
pnpm doctor
bash scripts/health-check.sh
Then verify:
- Web app loads at your configured URL
GET /healthreturns{"status":"ok"}from the API- Admin setup flow is reachable at
/admin/setup - Your billing and email providers are configured correctly
Common First-Run Mistakes
- Running Docker without preparing
.envfirst - Leaving placeholder secrets in
.env - Forgetting
INTERNAL_API_URLwhen SSR runs in containers - Restarting standalone web with raw
pm2instead of the project scripts - Expecting OAuth or billing to work without provider credentials