Cal.com
Open source scheduling infrastructure.
Overview
Cal.com is an open-source scheduling infrastructure that emerged as a privacy-focused alternative to proprietary booking platforms like Calendly. Built on Next.js and TypeScript, Cal.com provides comprehensive calendar management, appointment booking, and scheduling automation while maintaining full data ownership and customization control. The platform supports multiple calendar integrations, payment processing, team scheduling, and extensive API capabilities for custom workflows.
This stack combines Cal.com with PostgreSQL and Prisma ORM to create a robust, self-hosted scheduling solution. PostgreSQL serves as the primary database, handling user data, bookings, availability schedules, and calendar integrations with ACID compliance and strong consistency. Prisma acts as the database toolkit and ORM, providing type-safe database access, automated migrations, and seamless schema management that Cal.com relies on for its complex relational data models.
This configuration is ideal for organizations requiring scheduling infrastructure with complete data control, custom branding, and integration flexibility. Businesses can deploy Cal.com privately while leveraging PostgreSQL's enterprise-grade reliability for handling booking data, user authentication, and calendar synchronization. The stack scales from small teams to enterprise deployments, offering API access for custom integrations and webhook support for workflow automation.
Key Features
- Multi-calendar integration with Google Calendar, Outlook, and CalDAV providers
- Team scheduling with round-robin, collective, and custom routing algorithms
- Payment integration with Stripe for paid consultations and booking fees
- Webhook system for real-time booking notifications and workflow automation
- REST and GraphQL APIs for custom scheduling applications and integrations
- Video conferencing auto-setup with Zoom, Google Meet, and Microsoft Teams
- PostgreSQL ACID compliance ensuring booking data integrity and consistency
- Prisma type-safe database operations with automated schema migrations
Common Use Cases
- 1SaaS companies needing white-label scheduling for customer success teams
- 2Healthcare practices requiring HIPAA-compliant appointment booking systems
- 3Consulting firms with complex team scheduling and client management needs
- 4Educational institutions managing office hours and student consultation bookings
- 5Service businesses integrating scheduling into existing customer portals
- 6Enterprises requiring scheduling APIs for internal tools and HR systems
- 7Development agencies building custom scheduling features for client applications
Prerequisites
- Minimum 2GB RAM for PostgreSQL database and Cal.com application processes
- Port 3000 available for Cal.com web interface access
- SSL certificate and domain name for production calendar integrations
- SMTP server credentials for booking confirmation and notification emails
- OAuth application credentials for Google, Microsoft, or other calendar providers
- Basic understanding of Prisma migrations and PostgreSQL administration
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 cal: 3 image: calcom/cal.com:latest4 container_name: calcom5 restart: unless-stopped6 ports: 7 - "3000:3000"8 environment: 9 DATABASE_URL: postgresql://cal:${DB_PASSWORD}@db:5432/cal10 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}11 CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}12 NEXT_PUBLIC_WEBAPP_URL: http://localhost:300013 depends_on: 14 - db1516 db: 17 image: postgres:15-alpine18 container_name: calcom-db19 restart: unless-stopped20 environment: 21 POSTGRES_USER: cal22 POSTGRES_PASSWORD: ${DB_PASSWORD}23 POSTGRES_DB: cal24 volumes: 25 - calcom_db:/var/lib/postgresql/data2627volumes: 28 calcom_db: .env Template
.env
1DB_PASSWORD=changeme2NEXTAUTH_SECRET=generate-32-char-secret3ENCRYPTION_KEY=generate-32-char-keyUsage Notes
- 1Docs: https://cal.com/docs
- 2Access at http://localhost:3000 - create account on first visit
- 3Set availability schedule and event types
- 4Integrations: Google Calendar, Outlook, Zoom, Meet, Teams
- 5Generate secrets: openssl rand -hex 32
- 6Webhooks and API for custom integrations
Individual Services(2 services)
Copy individual services to mix and match with your existing compose files.
cal
cal:
image: calcom/cal.com:latest
container_name: calcom
restart: unless-stopped
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://cal:${DB_PASSWORD}@db:5432/cal
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
depends_on:
- db
db
db:
image: postgres:15-alpine
container_name: calcom-db
restart: unless-stopped
environment:
POSTGRES_USER: cal
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: cal
volumes:
- calcom_db:/var/lib/postgresql/data
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 cal:5 image: calcom/cal.com:latest6 container_name: calcom7 restart: unless-stopped8 ports:9 - "3000:3000"10 environment:11 DATABASE_URL: postgresql://cal:${DB_PASSWORD}@db:5432/cal12 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}13 CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}14 NEXT_PUBLIC_WEBAPP_URL: http://localhost:300015 depends_on:16 - db1718 db:19 image: postgres:15-alpine20 container_name: calcom-db21 restart: unless-stopped22 environment:23 POSTGRES_USER: cal24 POSTGRES_PASSWORD: ${DB_PASSWORD}25 POSTGRES_DB: cal26 volumes:27 - calcom_db:/var/lib/postgresql/data2829volumes:30 calcom_db:31EOF3233# 2. Create the .env file34cat > .env << 'EOF'35DB_PASSWORD=changeme36NEXTAUTH_SECRET=generate-32-char-secret37ENCRYPTION_KEY=generate-32-char-key38EOF3940# 3. Start the services41docker compose up -d4243# 4. View logs44docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/cal-com/run | bashTroubleshooting
- Database connection failed: Verify PostgreSQL container is running and DATABASE_URL environment variable matches database credentials
- Calendar integration not working: Check OAuth redirect URLs match your NEXT_PUBLIC_WEBAPP_URL and calendar provider settings
- Prisma migration errors: Run docker exec calcom npx prisma db push to sync database schema with Prisma models
- NEXTAUTH_SECRET missing error: Generate a 32-character secret with openssl rand -hex 32 and add to environment variables
- Booking confirmations not sending: Configure SMTP settings in Cal.com admin panel and verify email server connectivity
- Database performance issues: Increase PostgreSQL shared_buffers and work_mem settings in custom postgres.conf volume mount
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download