docker.recipes

Cal.com Scheduling Platform

intermediate

Open source Calendly alternative for scheduling meetings.

Overview

Cal.com is an open-source scheduling infrastructure that serves as a powerful alternative to Calendly, offering complete control over your booking data and workflows. Originally launched as Calendso in 2021, Cal.com has evolved into a comprehensive platform that handles everything from simple appointment booking to complex enterprise scheduling workflows with custom integrations, automated workflows, and white-label solutions. The platform emphasizes privacy, customization, and developer-friendly APIs while maintaining the ease of use that makes scheduling tools effective. This Docker stack combines Cal.com with PostgreSQL to create a robust, self-hosted scheduling solution that can handle complex booking scenarios and high user loads. PostgreSQL provides the advanced relational database capabilities needed for Cal.com's sophisticated event management, user relationships, and integration data, while supporting the JSON operations required for flexible configuration storage. The combination leverages Prisma as the ORM layer, enabling type-safe database operations and automated migrations that keep your scheduling data consistent as Cal.com evolves. This configuration is ideal for organizations that need enterprise-grade scheduling capabilities without vendor lock-in, developers building custom booking experiences, and privacy-conscious teams that want to maintain control over their scheduling data. The PostgreSQL backend ensures your booking history, user preferences, and integration configurations remain performant and reliable even as your scheduling volume grows, while Cal.com's extensive API surface allows for deep customization and workflow automation.

Key Features

  • Multi-calendar integration with Google Calendar, Outlook, CalDAV, and Apple Calendar with real-time availability checking
  • Advanced booking workflows including round-robin scheduling, collective events, and sequential meeting chains
  • Customizable booking forms with conditional fields, file uploads, and payment integration via Stripe
  • PostgreSQL-powered analytics and reporting with complex queries across booking patterns and user behavior
  • White-label embedding with custom CSS, domain mapping, and API-driven booking widget customization
  • Automated workflow triggers including email sequences, webhook notifications, and Zapier integrations
  • Enterprise SSO support with SAML, OAuth providers, and custom authentication workflows
  • Multi-timezone handling with automatic conversion and conflict detection across global team schedules

Common Use Cases

  • 1SaaS companies embedding booking functionality directly into their product with custom branding and workflows
  • 2Consulting firms managing complex client scheduling across multiple time zones with automated follow-up sequences
  • 3Healthcare practices requiring HIPAA-compliant scheduling with custom intake forms and patient management integration
  • 4Educational institutions coordinating office hours, admissions interviews, and student services appointments
  • 5Professional services teams needing round-robin lead distribution with CRM integration and conversion tracking
  • 6Event management companies coordinating speaker availability, venue bookings, and multi-stakeholder scheduling
  • 7Remote-first organizations replacing fragmented scheduling tools with a unified, self-hosted booking infrastructure

Prerequisites

  • Minimum 2GB RAM for Cal.com application server and PostgreSQL database with concurrent user support
  • Port 3000 available for Cal.com web interface and API endpoints
  • Basic understanding of environment variable configuration for authentication secrets and database connections
  • Email service provider credentials (SMTP) for booking confirmations and workflow notifications
  • SSL certificate and reverse proxy setup for production deployments with calendar integrations
  • Calendar provider API credentials (Google, Microsoft) for two-way calendar synchronization

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 calcom:
3 image: calcom/cal.com:latest
4 ports:
5 - "3000:3000"
6 environment:
7 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
8 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
9 CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}
10 NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
11 NEXT_PUBLIC_LICENSE_CONSENT: agree
12 depends_on:
13 postgres:
14 condition: service_healthy
15 networks:
16 - cal-net
17 restart: unless-stopped
18
19 postgres:
20 image: postgres:16-alpine
21 environment:
22 POSTGRES_USER: ${POSTGRES_USER}
23 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
24 POSTGRES_DB: ${POSTGRES_DB}
25 volumes:
26 - postgres_data:/var/lib/postgresql/data
27 healthcheck:
28 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
29 interval: 10s
30 timeout: 5s
31 retries: 5
32 networks:
33 - cal-net
34 restart: unless-stopped
35
36volumes:
37 postgres_data:
38
39networks:
40 cal-net:
41 driver: bridge

.env Template

.env
1# PostgreSQL
2POSTGRES_USER=calcom
3POSTGRES_PASSWORD=secure_postgres_password
4POSTGRES_DB=calcom
5
6# Cal.com
7NEXTAUTH_SECRET=$(openssl rand -hex 32)
8ENCRYPTION_KEY=$(openssl rand -hex 32)

Usage Notes

  1. 1Cal.com at http://localhost:3000
  2. 2Create account on first visit
  3. 3Connect Google/Outlook calendars
  4. 4Embed booking widget on your site

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

calcom
calcom:
  image: calcom/cal.com:latest
  ports:
    - "3000:3000"
  environment:
    DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
    NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
    CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}
    NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
    NEXT_PUBLIC_LICENSE_CONSENT: agree
  depends_on:
    postgres:
      condition: service_healthy
  networks:
    - cal-net
  restart: unless-stopped
postgres
postgres:
  image: postgres:16-alpine
  environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - cal-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 calcom:
5 image: calcom/cal.com:latest
6 ports:
7 - "3000:3000"
8 environment:
9 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
10 NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
11 CALENDSO_ENCRYPTION_KEY: ${ENCRYPTION_KEY}
12 NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
13 NEXT_PUBLIC_LICENSE_CONSENT: agree
14 depends_on:
15 postgres:
16 condition: service_healthy
17 networks:
18 - cal-net
19 restart: unless-stopped
20
21 postgres:
22 image: postgres:16-alpine
23 environment:
24 POSTGRES_USER: ${POSTGRES_USER}
25 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
26 POSTGRES_DB: ${POSTGRES_DB}
27 volumes:
28 - postgres_data:/var/lib/postgresql/data
29 healthcheck:
30 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
31 interval: 10s
32 timeout: 5s
33 retries: 5
34 networks:
35 - cal-net
36 restart: unless-stopped
37
38volumes:
39 postgres_data:
40
41networks:
42 cal-net:
43 driver: bridge
44EOF
45
46# 2. Create the .env file
47cat > .env << 'EOF'
48# PostgreSQL
49POSTGRES_USER=calcom
50POSTGRES_PASSWORD=secure_postgres_password
51POSTGRES_DB=calcom
52
53# Cal.com
54NEXTAUTH_SECRET=$(openssl rand -hex 32)
55ENCRYPTION_KEY=$(openssl rand -hex 32)
56EOF
57
58# 3. Start the services
59docker compose up -d
60
61# 4. View logs
62docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/cal-scheduling/run | bash

Troubleshooting

  • Database connection failed: Verify POSTGRES_USER and POSTGRES_PASSWORD match between Cal.com and PostgreSQL containers, and ensure postgres container is healthy before Cal.com starts
  • Calendar integration failing: Check that NEXT_PUBLIC_WEBAPP_URL matches your actual domain and that OAuth callbacks are configured correctly in your calendar provider's API console
  • Booking confirmations not sending: Verify SMTP credentials in Cal.com environment variables and ensure your email provider allows connections from Docker container IP ranges
  • Prisma migration errors on startup: Clear the postgres_data volume if switching between Cal.com versions, as schema changes may require a fresh database initialization
  • Session authentication issues: Regenerate NEXTAUTH_SECRET and CALENDSO_ENCRYPTION_KEY with sufficient entropy (32+ character random strings) and restart all containers
  • Performance issues with large booking volumes: Increase PostgreSQL shared_buffers and work_mem settings, and consider adding database connection pooling for high-traffic deployments

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