Skip to main content
Cal.com offers multiple deployment options to suit your infrastructure needs. This guide covers the most popular methods for self-hosting Cal.com.

Prerequisites

Before deploying Cal.com, ensure you have:
  • Node.js (Version: >=18.x)
  • PostgreSQL (Version: >=13.x)
  • Yarn package manager (recommended)
  • Required environment variables configured (see Configuration)

Docker Deployment

Quick Start with Docker Compose

The fastest way to deploy Cal.com is using Docker Compose. This method includes PostgreSQL, Redis, and optionally Prisma Studio.

1. Clone the Repository

git clone --recursive https://github.com/calcom/cal.com.git
cd cal.com

2. Configure Environment

Copy the example environment file and update it:
cp .env.example .env
Minimal required configuration:
# Generate secrets
NEXTAUTH_SECRET=$(openssl rand -base64 32)
CALENDSO_ENCRYPTION_KEY=$(openssl rand -base64 24)

# Generate VAPID keys for push notifications
NEXT_PUBLIC_VAPID_PUBLIC_KEY="your_public_key"
VAPID_PRIVATE_KEY="your_private_key"

# Database (auto-configured by docker-compose)
DATABASE_URL="postgresql://unicorn_user:magical_password@database:5432/calendso"
DATABASE_DIRECT_URL="postgresql://unicorn_user:magical_password@database:5432/calendso"

# Application URL
NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"
Generate VAPID keys using: npx web-push generate-vapid-keys

3. Pull Images

docker compose pull
By default, images are pulled from calcom.docker.scarf.sh/calcom/cal.com for download metrics. The official image is also available at hub.docker.com/r/calcom/cal.com.

4. Start Services

Complete stack (PostgreSQL + Cal.com + Prisma Studio):
docker compose up -d
Cal.com only (external database):
docker compose up -d calcom
With Prisma Studio for database management:
docker compose up -d calcom studio

5. Access Cal.com

Open your browser to http://localhost:3000. The first run will launch a setup wizard to create your initial user.
Optional: Prisma Studio is available at http://localhost:5555 for database management. Remove this service in production environments.

Updating Docker Deployment

To update to the latest version:
docker compose down
docker compose pull
docker compose up -d

ARM Architecture Support

For ARM-based systems (Apple Silicon, ARM servers):
docker pull calcom/cal.com:v5.6.19-arm
Update your docker-compose.yml to use the ARM-specific image tag.

Docker Services Overview

The default docker-compose.yml includes:
  • database: PostgreSQL 13+ database
  • redis: Redis for caching and queues
  • calcom: Main Cal.com web application
  • calcom-api: Cal.com API v2 service
  • studio: Prisma Studio (optional, for development)

Advanced Docker Build

For custom builds or modifications:

1. Build Custom Image

# Ensure database is available during build
docker compose up -d database

# Build with custom configuration
DOCKER_BUILDKIT=0 docker compose build calcom
DOCKER_BUILDKIT=0 is required to enable network bridge during build time. This requirement may be removed in future versions.

2. Build-time Arguments

Customize the build with these arguments:
--build-arg NEXT_PUBLIC_WEBAPP_URL=https://your-domain.com
--build-arg NEXT_PUBLIC_LICENSE_CONSENT=true
--build-arg CALCOM_TELEMETRY_DISABLED=1
--build-arg MAX_OLD_SPACE_SIZE=8192

Vercel Deployment

Deploy Cal.com to Vercel with one click: Deploy with Vercel
Vercel Pro Plan is required due to serverless function limits on the free tier.

Vercel Configuration

  1. Required Environment Variables:
DATABASE_URL="postgresql://user:password@host:5432/db"
NEXT_PUBLIC_WEBAPP_URL="https://your-app.vercel.app"
NEXTAUTH_URL="https://your-app.vercel.app"
NEXTAUTH_SECRET="generate-with-openssl"
CALENDSO_ENCRYPTION_KEY="generate-with-openssl"
CRON_API_KEY="your-cron-key"
  1. Build Settings:
  • Build Command: cd ../.. && yarn build
  • Output Directory: apps/web/.next
  • Install Command: yarn install
  • Root Directory: apps/web/
  1. External Database Required:
Vercel deployments require an external PostgreSQL database. Recommended providers:

Railway Deployment

Deploy Cal.com on Railway: Deploy on Railway Railway includes managed PostgreSQL and automatic SSL certificates.

Railway Setup

  1. Click the Deploy button above
  2. Connect your GitHub account
  3. Configure required environment variables
  4. Railway automatically provisions PostgreSQL
  5. Access your deployment at the provided Railway URL
See Railway’s detailed guide for more information.

Northflank Deployment

Deploy Cal.com on Northflank: Deploy on Northflank Northflank provides managed infrastructure with built-in CI/CD.

Render Deployment

Deploy Cal.com on Render: Deploy to Render Render includes managed PostgreSQL and automatic HTTPS.

Manual Installation

For bare-metal or VM deployments:

1. Install Dependencies

# Install Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install Yarn
npm install -g yarn

# Install PostgreSQL 13+
sudo apt-get install postgresql postgresql-contrib

2. Clone and Install

git clone https://github.com/calcom/cal.com.git
cd cal.com
yarn install

3. Configure Environment

cp .env.example .env
# Edit .env with your configuration

4. Setup Database

# Create database
sudo -u postgres createdb calendso

# Run migrations
yarn workspace @calcom/prisma db-deploy

5. Build and Start

Development:
yarn dev
Production:
yarn build
yarn start

6. Process Manager (Production)

Use PM2 to keep Cal.com running:
npm install -g pm2
pm2 start yarn --name "calcom" -- start
pm2 startup
pm2 save

Reverse Proxy Setup

Nginx Configuration

server {
    listen 80;
    server_name your-domain.com;
    
    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

SSL with Let’s Encrypt

sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx -d your-domain.com

Healthcheck

Cal.com includes a built-in healthcheck endpoint:
curl http://localhost:3000/api/health
The Docker image includes automatic health monitoring:
HEALTHCHECK --interval=30s --timeout=30s --retries=5 \
  CMD wget --spider http://localhost:3000 || exit 1

Troubleshooting

SSL Edge Termination

If running behind a load balancer handling SSL:
NODE_TLS_REJECT_UNAUTHORIZED=0
Only use this if you trust your load balancer. Do not use in untrusted networks.

CLIENT_FETCH_ERROR

If NextAuth cannot resolve the hostname:
NEXTAUTH_URL=http://localhost:3000/api/auth

VAPID Keys Error

If you see “No key set vapidDetails.publicKey”:
# Generate keys
npx web-push generate-vapid-keys

# Add to .env
NEXT_PUBLIC_VAPID_PUBLIC_KEY="your_public_key"
VAPID_PRIVATE_KEY="your_private_key"

Database Connection Issues

Ensure your database URL is correctly formatted:
DATABASE_URL="postgresql://user:password@host:5432/database?sslmode=require"

Production Checklist

  • Set strong NEXTAUTH_SECRET and CALENDSO_ENCRYPTION_KEY
  • Configure proper DATABASE_URL with connection pooling
  • Set correct NEXT_PUBLIC_WEBAPP_URL for your domain
  • Generate and configure VAPID keys for push notifications
  • Configure email provider (SendGrid, SMTP, or Resend)
  • Remove Prisma Studio service from docker-compose
  • Enable SSL/HTTPS with valid certificates
  • Configure backup strategy for PostgreSQL
  • Set up monitoring and logging
  • Review and configure CSP policy
  • Disable telemetry if required: CALCOM_TELEMETRY_DISABLED=1

Next Steps

Build docs developers (and LLMs) love