Installation
Installation
Requirements
- Node.js >= 22.12 & npm
- Cloudflare account for remote D1 and Cloudflare deployment
Recommended Installation
Run the interactive installer:
npm create vergekit@latest
Verge Kit uses Cloudflare Workers with D1 by default, but the installer also offers a Node.js + MySQL preset as a self-hosted alternative.
The installer asks for a project location and completes the guided setup, creating local secrets, installing dependencies, applying migrations, and optionally creating the initial administrator account.
Manual Installation
These steps install the default Cloudflare Workers with D1 preset from the default branch of the repository.
Start in an empty project directory and run all commands from this location.
Download the Boilerplate
npx degit vergekit/vergekit Install Dependencies
npm install Create Local Secrets
Create .dev.vars (if it doesn’t exist), and copy the template and write a fresh Better Auth secret:
cp .dev.vars.example .dev.vars && secret="$(openssl rand -base64 32)" && awk -v secret="$secret" 'BEGIN { done = 0 } /^BETTER_AUTH_SECRET=/ { print "BETTER_AUTH_SECRET=" secret; done = 1; next } { print } END { if (!done) print "BETTER_AUTH_SECRET=" secret }' .dev.vars > .dev.vars.tmp && mv .dev.vars.tmp .dev.varsNote: this command requires OpenSSL.
Do not commit .dev.vars. Use the Configuration Guide for other local values, deployed values, and secrets.
Apply the Initial Database Migration
npm run db:migrate:localSee Database for schema changes, remote D1 setup, and Drizzle Studio.
Create an Administrator (optional)
npm run init:adminSee Access Control for the default access model.
Start Development
npm run dev Next Steps
- Configure the included sign-in flows with Authentication.
- Protect pages, API routes, and records with Access Control.
- Select and configure an email provider with Email.
- Use the Command Scripts for local development and project checks.
- Prepare and deploy the application with the Deployment guide.