Database
Configure PostgreSQL for GudCal.
GudCal uses PostgreSQL with Prisma as the ORM. Any PostgreSQL 14+ provider works — Neon, Supabase, Railway, or a self-hosted instance.
Environment Variable
DATABASE_URL="postgresql://user:password@host:5432/gudcal?sslmode=require"The DATABASE_URL must be set in your .env file (not .env.local) because Prisma's postinstall script loads from .env directly.
Setup
Create a database
Use your preferred PostgreSQL provider to create a new database. If using Neon, create a project and copy the connection string from the dashboard.
Configure the connection
Paste your connection string into .env:
DATABASE_URL="postgresql://..."Generate Prisma client and push schema
pnpm prisma generate
pnpm prisma db pushThis creates all required tables: users, bookings, event types, availability, organizations, webhooks, API keys, and more.
Migrations
For production deployments, use Prisma migrations instead of db push:
pnpm prisma migrate dev --name init # Development
pnpm prisma migrate deploy # ProductionDocker
When using Docker Compose, the included docker-compose.yml provides a PostgreSQL container automatically. See the Self-Hosting guide for details.
