title: "Local Development Setup"
description: "Set up a productive local dev environment for OpenCodeHub."
Prerequisites
- Node.js 18+ (project
enginesspecify Node 20+ for runtime) - Git 2.30+
- PostgreSQL/MySQL/SQLite (PostgreSQL recommended)
Install dependencies
npm install
Environment
cp .env.example .env
Set required values like JWT_SECRET, SESSION_SECRET, INTERNAL_HOOK_SECRET, and SITE_URL.
Database
npm run db:push
Seed admin user
bun run scripts/seed-admin.ts
Run dev server
npm run dev
Open the app at http://localhost:3000.
Useful scripts
npm run db:generatenpm run db:migratenpm run db:studionpm run lintnpm run test