GudCalGudCal
Docs
Self-Hosting

Self-Hosting

Deploy GudCal on your own infrastructure for your organization.

GudCal is source-available under Business Source License 1.1. You can run it on your own server, VPS, or container platform with full control over your data.

License (read this first)

Allowed

  • Self-host GudCal for your own organization or personal use
  • Modify the source for internal needs
  • Use scheduling inside a larger product where scheduling is not the primary offering

Not allowed

  • Offer GudCal (or a substantially similar derivative) as a competing hosted Calendly-style service to third parties
  • Sell access to a hosted/managed GudCal

On 18 February 2030 the licensed work converts to Apache 2.0. Until then, gudcal.com is the commercial hosted product. Full text: LICENSE.md.

Prerequisites

  • Node.js 18.17 or later (20.x from .nvmrc is what CI uses)
  • PostgreSQL 14 or later (Neon, Supabase, or self-hosted)
  • pnpm package manager

Quick Start

  1. Clone the public repository:
git clone https://github.com/gudlab/gudcal-core.git
cd gudcal-core
  1. Install dependencies:
pnpm install
  1. Copy the environment file and configure it:
cp .env.example .env.local
  1. Set up the database:
pnpm prisma generate
pnpm prisma db push
  1. Start the application:
pnpm build
pnpm start

Docker Compose is usually faster for a first run — see the README.

Environment Variables

These are the required environment variables for self-hosting:

VariableDescription
DATABASE_URLPostgreSQL connection string
NEXTAUTH_SECRET / AUTH_SECRETRandom secret for session encryption
NEXTAUTH_URLYour deployment URL (e.g. https://cal.example.com)
NEXT_PUBLIC_APP_URLSame as NEXTAUTH_URL
ENCRYPTION_KEY32-byte hex key (64 hex chars) for encrypting calendar tokens

Optional Variables

VariableDescription
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRETGoogle login
RESEND_API_KEYTransactional email
STRIPE_*Cloud billing only — omit for self-host
GOOGLE_CALENDAR_CLIENT_ID / SECRETGoogle Calendar sync
CRON_SECRETReminder cron endpoint
NEXT_PUBLIC_IS_SELF_HOSTEDSet to true on your instance

Self-Hosted vs Cloud

Set NEXT_PUBLIC_IS_SELF_HOSTED=true. That removes hosted plan caps on core scheduling (event types, calendars, availability, organizations). It does not turn your box into GudCal Cloud.

Your self-host (own org)gudcal.com
Event types, bookings, calendarsUncappedFree / Pro / Team limits
OrganizationsUncappedTeam ($20/mo)
Hosted MCP at gudcal.com/api/mcpn/aTeam
/api/mcp on your URLShips in this source; BSL allows it for your orgSame codebase
Analytics, custom domainsHosted extrasPro / Team

Do not use a self-host to sell scheduling to other companies. That is the BSL restriction.

Generating an Encryption Key

node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"

Reverse Proxy

If you run GudCal behind a reverse proxy (nginx, Caddy, etc.), make sure to:

  • Forward the Host header
  • Set X-Forwarded-Proto to https
  • Set X-Forwarded-For to the client IP
  • Configure WebSocket passthrough if needed