docker.recipes

Cal.com Scheduling Platform

intermediate

Cal.com open-source scheduling platform for appointments and meetings.

Overview

Cal.com is an open-source scheduling platform that emerged as a privacy-focused alternative to Calendly and other proprietary booking solutions. Originally founded by Bailey Pumfleet and Peer Richelsen, Cal.com gained significant traction by offering complete data ownership, extensive customization options, and transparent source code. The platform handles appointment scheduling, calendar integration, and automated booking workflows while maintaining full control over user data and branding. This deployment combines Cal.com's Next.js-based application with PostgreSQL for robust data persistence and Prisma Studio for database administration. PostgreSQL's ACID compliance ensures booking integrity and prevents double-bookings, while its JSON support handles Cal.com's flexible event metadata and user preferences. Prisma Studio provides a visual interface for managing appointments, user profiles, and calendar integrations directly within the database. This stack is ideal for businesses requiring self-hosted scheduling solutions, developers building custom booking workflows, and organizations with strict data sovereignty requirements. The combination offers enterprise-grade reliability through PostgreSQL's proven stability while maintaining the flexibility to customize booking logic, integrate with internal systems, and comply with regional data protection regulations.

Key Features

  • Multi-calendar integration with Google Calendar, Outlook, and CalDAV providers for unified availability
  • Embeddable booking widgets with custom branding for website integration
  • Event type templates with buffer times, location options, and custom questions
  • Team scheduling with round-robin assignment and collective availability
  • Webhook support for CRM integration and automated workflow triggers
  • PostgreSQL-backed appointment conflict resolution and timezone handling
  • Prisma Studio visual database browser for booking analytics and user management
  • Self-hosted data control with GDPR compliance and custom data retention policies

Common Use Cases

  • 1Healthcare clinics managing patient appointments with custom intake forms
  • 2Consulting firms offering client discovery calls with team member routing
  • 3Educational institutions scheduling student advisement and office hours
  • 4SaaS companies providing demo bookings with CRM integration
  • 5Service businesses replacing Calendly with branded self-hosted solution
  • 6Development teams building custom scheduling features using Cal.com's API
  • 7Organizations requiring data sovereignty for sensitive client interactions

Prerequisites

  • Minimum 2GB RAM for PostgreSQL database operations and Cal.com application
  • Available ports 3000 (Cal.com), 5432 (PostgreSQL), and 5555 (Prisma Studio)
  • Environment variables for database credentials and NextAuth configuration
  • Valid domain name or localhost setup for calendar provider OAuth callbacks
  • Basic understanding of PostgreSQL database management and Prisma ORM
  • Calendar provider API credentials (Google, Microsoft) for integration setup

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 container_name: calcom
5 environment:
6 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
7 - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
8 - CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
9 - NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
10 - NEXT_PUBLIC_API_V2_URL=${NEXT_PUBLIC_WEBAPP_URL}/api/v2
11 - NEXT_PUBLIC_LICENSE_CONSENT=agree
12 - CALCOM_TELEMETRY_DISABLED=1
13 ports:
14 - "3000:3000"
15 depends_on:
16 postgres:
17 condition: service_healthy
18 networks:
19 - calcom-network
20
21 postgres:
22 image: postgres:16-alpine
23 container_name: calcom-db
24 environment:
25 - POSTGRES_USER=${POSTGRES_USER}
26 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
27 - POSTGRES_DB=calcom
28 volumes:
29 - postgres_data:/var/lib/postgresql/data
30 healthcheck:
31 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
32 interval: 10s
33 timeout: 5s
34 retries: 5
35 networks:
36 - calcom-network
37
38 prisma-studio:
39 image: timothyjmiller/prisma-studio:latest
40 container_name: calcom-prisma
41 environment:
42 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
43 ports:
44 - "5555:5555"
45 depends_on:
46 - postgres
47 networks:
48 - calcom-network
49
50volumes:
51 postgres_data:
52
53networks:
54 calcom-network:
55 driver: bridge

.env Template

.env
1# Cal.com
2POSTGRES_USER=calcom
3POSTGRES_PASSWORD=calcom_password
4NEXTAUTH_SECRET=your-nextauth-secret-32-chars
5CALENDSO_ENCRYPTION_KEY=your-encryption-key-32-chars
6NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000

Usage Notes

  1. 1App at http://localhost:3000
  2. 2Prisma Studio at http://localhost:5555
  3. 3Run database migrations first
  4. 4Supports Google, Outlook calendars
  5. 5Embeddable booking widgets

Individual Services(3 services)

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

calcom
calcom:
  image: calcom/cal.com:latest
  container_name: calcom
  environment:
    - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
    - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
    - CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
    - NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
    - NEXT_PUBLIC_API_V2_URL=${NEXT_PUBLIC_WEBAPP_URL}/api/v2
    - NEXT_PUBLIC_LICENSE_CONSENT=agree
    - CALCOM_TELEMETRY_DISABLED=1
  ports:
    - "3000:3000"
  depends_on:
    postgres:
      condition: service_healthy
  networks:
    - calcom-network
postgres
postgres:
  image: postgres:16-alpine
  container_name: calcom-db
  environment:
    - POSTGRES_USER=${POSTGRES_USER}
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    - POSTGRES_DB=calcom
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - calcom-network
prisma-studio
prisma-studio:
  image: timothyjmiller/prisma-studio:latest
  container_name: calcom-prisma
  environment:
    - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
  ports:
    - "5555:5555"
  depends_on:
    - postgres
  networks:
    - calcom-network

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 calcom:
5 image: calcom/cal.com:latest
6 container_name: calcom
7 environment:
8 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
9 - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
10 - CALENDSO_ENCRYPTION_KEY=${CALENDSO_ENCRYPTION_KEY}
11 - NEXT_PUBLIC_WEBAPP_URL=${NEXT_PUBLIC_WEBAPP_URL}
12 - NEXT_PUBLIC_API_V2_URL=${NEXT_PUBLIC_WEBAPP_URL}/api/v2
13 - NEXT_PUBLIC_LICENSE_CONSENT=agree
14 - CALCOM_TELEMETRY_DISABLED=1
15 ports:
16 - "3000:3000"
17 depends_on:
18 postgres:
19 condition: service_healthy
20 networks:
21 - calcom-network
22
23 postgres:
24 image: postgres:16-alpine
25 container_name: calcom-db
26 environment:
27 - POSTGRES_USER=${POSTGRES_USER}
28 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
29 - POSTGRES_DB=calcom
30 volumes:
31 - postgres_data:/var/lib/postgresql/data
32 healthcheck:
33 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
34 interval: 10s
35 timeout: 5s
36 retries: 5
37 networks:
38 - calcom-network
39
40 prisma-studio:
41 image: timothyjmiller/prisma-studio:latest
42 container_name: calcom-prisma
43 environment:
44 - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/calcom
45 ports:
46 - "5555:5555"
47 depends_on:
48 - postgres
49 networks:
50 - calcom-network
51
52volumes:
53 postgres_data:
54
55networks:
56 calcom-network:
57 driver: bridge
58EOF
59
60# 2. Create the .env file
61cat > .env << 'EOF'
62# Cal.com
63POSTGRES_USER=calcom
64POSTGRES_PASSWORD=calcom_password
65NEXTAUTH_SECRET=your-nextauth-secret-32-chars
66CALENDSO_ENCRYPTION_KEY=your-encryption-key-32-chars
67NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
68EOF
69
70# 3. Start the services
71docker compose up -d
72
73# 4. View logs
74docker 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-com-scheduling/run | bash

Troubleshooting

  • Database connection refused: Verify POSTGRES_USER and POSTGRES_PASSWORD match between services and check PostgreSQL container health status
  • NextAuth configuration errors: Ensure NEXTAUTH_SECRET is set to a secure random string and NEXT_PUBLIC_WEBAPP_URL matches your domain
  • Calendar integration failures: Verify OAuth callback URLs in Google/Microsoft console match your NEXT_PUBLIC_WEBAPP_URL domain
  • Prisma Studio connection timeout: Confirm DATABASE_URL format and ensure PostgreSQL container is fully initialized before Prisma startup
  • Booking conflicts not prevented: Check PostgreSQL timezone settings and verify Cal.com database migrations completed successfully
  • CALENDSO_ENCRYPTION_KEY errors: Generate a secure 32-character encryption key for booking data protection

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

Components

calcompostgresprisma-studio

Tags

#calcom#scheduling#calendar#booking#calendly-alternative

Category

Productivity & Collaboration
Ad Space