> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/calcom/cal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Deploy Cal.com on your infrastructure or use our cloud platform

## Installation options

Cal.com offers multiple deployment options to fit your needs:

<CardGroup cols={2}>
  <Card title="Cal.com Cloud" icon="cloud">
    Managed hosting with automatic updates and enterprise SLA
  </Card>

  <Card title="Docker" icon="docker">
    Containerized deployment for any infrastructure
  </Card>

  <Card title="Vercel" icon="triangle">
    One-click deploy on Vercel's edge network
  </Card>

  <Card title="Railway" icon="train">
    Simple deployment with automatic scaling
  </Card>

  <Card title="Manual setup" icon="code">
    Full control over your development environment
  </Card>
</CardGroup>

## Prerequisites

Before installing Cal.com, ensure you have:

<Tabs>
  <Tab title="All installations">
    * **Database**: PostgreSQL 13 or newer
    * **Node.js**: Version 18.x or newer
    * **Environment variables**: See [configuration section](#environment-variables)
  </Tab>

  <Tab title="Docker">
    * Docker Engine 20.10+
    * Docker Compose v2.0+
    * 2GB RAM minimum (4GB recommended)
  </Tab>

  <Tab title="Manual setup">
    * Node.js 18.x or newer
    * PostgreSQL 13+
    * Yarn package manager (recommended)
    * Git
  </Tab>
</Tabs>

## Cal.com Cloud

The fastest way to get started with zero setup:

<Steps>
  <Step title="Sign up">
    Visit [cal.com/signup](https://cal.com/signup) to create your account.
  </Step>

  <Step title="Choose a plan">
    * **Free**: Unlimited bookings, basic features
    * **Pro**: Advanced workflows, integrations, and support
    * **Teams**: Team scheduling and collaboration
    * **Enterprise**: SSO, SAML, dedicated support

    [View pricing →](https://cal.com/pricing)
  </Step>

  <Step title="Start scheduling">
    Your account is ready immediately - no installation required.
  </Step>
</Steps>

<Note>
  **Cloud benefits**: Automatic updates, 99.9% uptime SLA, managed database backups, and enterprise security compliance.
</Note>

## Docker deployment

### Quick start with Docker Compose

The recommended way to self-host Cal.com:

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/calcom/cal.com.git
    cd cal.com
    ```
  </Step>

  <Step title="Configure environment variables">
    ```bash theme={null}
    cp .env.example .env
    ```

    **Required environment variables:**

    ```bash theme={null}
    # Generate secrets
    NEXTAUTH_SECRET=$(openssl rand -base64 32)
    CALENDSO_ENCRYPTION_KEY=$(openssl rand -base64 24)

    # Database (default for docker-compose)
    DATABASE_URL="postgresql://unicorn_user:magical_password@database:5432/calendso"

    # Application URL
    NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000"

    # Web Push notifications (optional)
    npx web-push generate-vapid-keys
    NEXT_PUBLIC_VAPID_PUBLIC_KEY="your_public_key"
    VAPID_PRIVATE_KEY="your_private_key"
    ```

    <Warning>
      Never commit real secrets to version control. Use `.env` (git-ignored) for actual credentials.
    </Warning>
  </Step>

  <Step title="Start the services">
    **Full stack** (includes database):

    ```bash theme={null}
    docker compose up -d
    ```

    **Application only** (with external database):

    ```bash theme={null}
    docker compose up -d calcom
    ```

    Services included:

    * **calcom**: Main application (port 3000)
    * **database**: PostgreSQL database (port 5432)
    * **studio**: Prisma Studio for database management (port 5555)
  </Step>

  <Step title="Access Cal.com">
    1. Visit `http://localhost:3000`
    2. Complete the setup wizard
    3. Create your admin account

    <Tip>
      Access Prisma Studio at `http://localhost:5555` to view and edit database records directly.
    </Tip>
  </Step>
</Steps>

### Docker configuration

Customize your Docker deployment:

<Accordion title="Using custom images" icon="docker">
  Specify a custom image or tag:

  ```yaml docker-compose.yml theme={null}
  services:
    calcom:
      image: calcom/cal.com:latest
      # or for ARM architecture
      image: calcom/cal.com:v5.6.19-arm
  ```

  <Note>
    ARM images use the `-arm` suffix. Check [Docker Hub](https://hub.docker.com/r/calcom/cal.com) for available tags.
  </Note>
</Accordion>

<Accordion title="External database" icon="database">
  Connect to an existing PostgreSQL database:

  ```bash .env theme={null}
  DATABASE_URL="postgresql://user:password@your-db-host:5432/calcom"
  DATABASE_DIRECT_URL="postgresql://user:password@your-db-host:5432/calcom"
  ```

  Then start only the application:

  ```bash theme={null}
  docker compose up -d calcom
  ```
</Accordion>

<Accordion title="Production deployment" icon="server">
  For production, consider:

  1. **Remove Prisma Studio** (security):
     ```yaml theme={null}
     # Comment out or remove the studio service
     # studio:
     #   ...
     ```

  2. **Use external database** with connection pooling (PgBouncer)

  3. **Set proper URLs**:
     ```bash theme={null}
     NEXT_PUBLIC_WEBAPP_URL="https://cal.yourdomain.com"
     NEXTAUTH_URL="https://cal.yourdomain.com"
     ```

  4. **Enable SSL** for database connections:
     ```bash theme={null}
     DATABASE_URL="postgresql://user:pass@host:5432/db?sslmode=require"
     ```

  5. **Configure email** (SendGrid, SMTP):
     ```bash theme={null}
     EMAIL_FROM="notifications@yourdomain.com"
     EMAIL_SERVER_HOST="smtp.sendgrid.net"
     EMAIL_SERVER_PORT=587
     EMAIL_SERVER_USER="apikey"
     EMAIL_SERVER_PASSWORD="your_sendgrid_api_key"
     ```
</Accordion>

### Updating Docker deployment

<Steps>
  <Step title="Stop services">
    ```bash theme={null}
    docker compose down
    ```
  </Step>

  <Step title="Pull latest changes">
    ```bash theme={null}
    git pull
    docker compose pull
    ```
  </Step>

  <Step title="Restart services">
    ```bash theme={null}
    docker compose up -d
    ```
  </Step>
</Steps>

## Vercel deployment

<Warning>
  **Vercel Pro required**: The free plan doesn't support the number of serverless functions Cal.com requires.
</Warning>

<Steps>
  <Step title="Prepare database">
    Set up a PostgreSQL database:

    * [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres)
    * [Neon](https://neon.tech)
    * [Supabase](https://supabase.com)
    * [Railway](https://railway.app)
  </Step>

  <Step title="Deploy to Vercel">
    [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com\&env=DATABASE_URL,NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_URL,NEXTAUTH_SECRET,CRON_API_KEY,CALENDSO_ENCRYPTION_KEY)

    Or manually:

    ```bash theme={null}
    git clone https://github.com/calcom/cal.com.git
    cd cal.com
    vercel
    ```
  </Step>

  <Step title="Configure environment variables">
    Add these in Vercel project settings:

    ```bash theme={null}
    DATABASE_URL=your_postgres_connection_string
    NEXT_PUBLIC_WEBAPP_URL=https://your-app.vercel.app
    NEXTAUTH_URL=https://your-app.vercel.app
    NEXTAUTH_SECRET=your_secret_here
    CALENDSO_ENCRYPTION_KEY=your_encryption_key
    CRON_API_KEY=your_cron_api_key
    ```
  </Step>

  <Step title="Deploy">
    Push to your repository or trigger deployment in Vercel dashboard.
  </Step>
</Steps>

## Railway deployment

One-click deploy with automatic database provisioning:

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/cal)

<Steps>
  <Step title="Click deploy button">
    Railway will:

    * Fork the Cal.com repository to your GitHub
    * Create a PostgreSQL database
    * Set up environment variables
    * Deploy the application
  </Step>

  <Step title="Configure custom domain">
    In Railway settings:

    1. Add your custom domain
    2. Update `NEXT_PUBLIC_WEBAPP_URL` environment variable
    3. Redeploy
  </Step>
</Steps>

[Read Railway's detailed guide →](https://blog.railway.app/p/calendso)

## Manual setup

For local development or custom deployments:

<Steps>
  <Step title="Clone repository">
    ```bash theme={null}
    git clone https://github.com/calcom/cal.com.git
    cd cal.com
    ```

    <Warning>
      **Windows users**: Use Git Bash with admin privileges:

      ```bash theme={null}
      git clone -c core.symlinks=true https://github.com/calcom/cal.com.git
      ```

      [See symbolic link troubleshooting →](https://cal.com/docs/how-to-guides/how-to-troubleshoot-symbolic-link-issues-on-windows)
    </Warning>
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    yarn install
    ```

    <Note>
      **Node version**: Use `nvm use` to switch to the required Node.js version (specified in `.nvmrc`).
    </Note>
  </Step>

  <Step title="Configure environment">
    ```bash theme={null}
    cp .env.example .env
    ```

    Generate secrets:

    ```bash theme={null}
    # NEXTAUTH_SECRET (32 bytes)
    openssl rand -base64 32

    # CALENDSO_ENCRYPTION_KEY (24 bytes)
    openssl rand -base64 24
    ```

    Set database URL:

    ```bash theme={null}
    DATABASE_URL="postgresql://user:password@localhost:5432/calendso"
    ```
  </Step>

  <Step title="Set up database">
    **Option 1: Quick start with Docker** (recommended)

    ```bash theme={null}
    yarn dx
    ```

    This starts:

    * PostgreSQL database
    * Mailhog (email testing)
    * Seeds test users

    **Option 2: Manual database setup**

    ```bash theme={null}
    # Install PostgreSQL locally
    # Then run migrations
    yarn workspace @calcom/prisma db-migrate
    ```
  </Step>

  <Step title="Start development server">
    ```bash theme={null}
    yarn dev
    ```

    Access at `http://localhost:3000`
  </Step>
</Steps>

### Test users (with yarn dx)

Development environment includes pre-seeded users:

| Email                    | Password          | Role             |
| ------------------------ | ----------------- | ---------------- |
| `free@example.com`       | `free`            | Free user        |
| `pro@example.com`        | `pro`             | Pro user         |
| `trial@example.com`      | `trial`           | Trial user       |
| `admin@example.com`      | `ADMINadmin2022!` | Admin            |
| `onboarding@example.com` | `onboarding`      | Incomplete setup |

<Tip>
  View all seeded users in Prisma Studio: `yarn db-studio` → `http://localhost:5555`
</Tip>

## Environment variables

### Required variables

Minimum configuration for Cal.com to run:

```bash .env theme={null}
# Database
DATABASE_URL="postgresql://user:password@host:5432/calendso"
DATABASE_DIRECT_URL="postgresql://user:password@host:5432/calendso"

# Application
NEXT_PUBLIC_WEBAPP_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"

# Secrets (generate with openssl)
NEXTAUTH_SECRET="your-32-byte-secret"
CALENDSO_ENCRYPTION_KEY="your-24-byte-encryption-key"

# Cron jobs
CRON_API_KEY="your-random-api-key"
```

### Calendar integrations

<Accordion title="Google Calendar" icon="google">
  1. Create project in [Google Cloud Console](https://console.cloud.google.com/)
  2. Enable Google Calendar API
  3. Configure OAuth consent screen
  4. Create OAuth 2.0 credentials
  5. Add redirect URIs:
     * `https://your-domain.com/api/integrations/googlecalendar/callback`
     * `https://your-domain.com/api/auth/callback/google`
  6. Download JSON credentials

  ```bash .env theme={null}
  GOOGLE_API_CREDENTIALS='{"web":{"client_id":"...","client_secret":"..."}}'
  GOOGLE_LOGIN_ENABLED=true
  ```

  [Detailed setup guide →](https://github.com/calcom/cal.com#obtaining-the-google-api-credentials)
</Accordion>

<Accordion title="Microsoft Office 365" icon="microsoft">
  1. Register app in [Azure Portal](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps)
  2. Set redirect URI: `https://your-domain.com/api/integrations/office365calendar/callback`
  3. Create client secret
  4. Add API permissions:
     * `Calendars.Read`
     * `Calendars.ReadWrite`

  ```bash .env theme={null}
  MS_GRAPH_CLIENT_ID="your-client-id"
  MS_GRAPH_CLIENT_SECRET="your-client-secret"
  ```
</Accordion>

<Accordion title="Apple Calendar (CalDAV)" icon="apple">
  No API keys required. Users connect individually with:

  * Server: `caldav.icloud.com`
  * Username: Apple ID email
  * Password: App-specific password

  [Generate app-specific password →](https://support.apple.com/en-us/HT204397)
</Accordion>

### Video conferencing

<Accordion title="Zoom" icon="video">
  1. Create app on [Zoom Marketplace](https://marketplace.zoom.us/)
  2. Choose "General App" → "User-managed"
  3. Add OAuth redirect URL: `https://your-domain.com/api/integrations/zoomvideo/callback`
  4. Add scopes:
     * `meeting:write:meeting`
     * `user:read:settings`

  ```bash .env theme={null}
  ZOOM_CLIENT_ID="your-client-id"
  ZOOM_CLIENT_SECRET="your-client-secret"
  ```
</Accordion>

<Accordion title="Daily.co" icon="video">
  1. Visit [Daily.co Partnership Form](https://go.cal.com/daily)
  2. Get API key from [dashboard](https://dashboard.daily.co/developers)

  ```bash .env theme={null}
  DAILY_API_KEY="your-api-key"
  DAILY_SCALE_PLAN=true  # If you have Scale plan
  ```
</Accordion>

### Email configuration

<Accordion title="SMTP" icon="envelope">
  **Gmail:**

  ```bash .env theme={null}
  EMAIL_SERVER_HOST="smtp.gmail.com"
  EMAIL_SERVER_PORT=465
  EMAIL_SERVER_USER="your-email@gmail.com"
  EMAIL_SERVER_PASSWORD="your-app-password"
  EMAIL_FROM="your-email@gmail.com"
  ```

  **Office 365:**

  ```bash .env theme={null}
  EMAIL_SERVER_HOST="smtp.office365.com"
  EMAIL_SERVER_PORT=587
  EMAIL_SERVER_USER="your-email@office365.com"
  EMAIL_SERVER_PASSWORD="your-password"
  EMAIL_FROM="your-email@office365.com"
  ```

  **Custom SMTP:**

  ```bash .env theme={null}
  EMAIL_SERVER_HOST="smtp.yourdomain.com"
  EMAIL_SERVER_PORT=587
  EMAIL_SERVER_USER="your-smtp-username"
  EMAIL_SERVER_PASSWORD="your-smtp-password"
  EMAIL_FROM="notifications@yourdomain.com"
  ```
</Accordion>

<Accordion title="SendGrid" icon="paper-plane">
  For workflow emails and reminders:

  1. Create [SendGrid account](https://signup.sendgrid.com/)
  2. Verify sender email
  3. Create API key

  ```bash .env theme={null}
  SENDGRID_API_KEY="your-api-key"
  SENDGRID_EMAIL="verified@yourdomain.com"
  NEXT_PUBLIC_SENDGRID_SENDER_NAME="Your Company"
  ```
</Accordion>

### SMS reminders

<Accordion title="Twilio" icon="message-sms">
  1. Create [Twilio account](https://twilio.com/try-twilio)
  2. Get a phone number
  3. Copy credentials from dashboard

  ```bash .env theme={null}
  TWILIO_SID="your-account-sid"
  TWILIO_TOKEN="your-auth-token"
  TWILIO_MESSAGING_SID="your-messaging-service-sid"
  TWILIO_PHONE_NUMBER="+1234567890"
  NEXT_PUBLIC_SENDER_ID="YourCompany"  # Max 11 characters
  ```
</Accordion>

## Database setup

### PostgreSQL requirements

* **Version**: 13 or newer
* **Collation**: UTF8
* **Extensions**: None required (Prisma manages schema)

### Local PostgreSQL

<Tabs>
  <Tab title="macOS">
    ```bash theme={null}
    # Install via Homebrew
    brew install postgresql@14
    brew services start postgresql@14

    # Create database
    createdb calendso
    ```
  </Tab>

  <Tab title="Ubuntu/Debian">
    ```bash theme={null}
    # Install
    sudo apt update
    sudo apt install postgresql postgresql-contrib

    # Create database
    sudo -u postgres createdb calendso
    sudo -u postgres createuser your_username
    ```
  </Tab>

  <Tab title="Windows">
    1. Download from [postgresql.org](https://www.postgresql.org/download/windows/)
    2. Run installer
    3. Use pgAdmin to create database `calendso`
  </Tab>

  <Tab title="Docker">
    ```bash theme={null}
    docker run -d \
      --name cal-postgres \
      -e POSTGRES_PASSWORD=password \
      -e POSTGRES_DB=calendso \
      -p 5432:5432 \
      postgres:14
    ```
  </Tab>
</Tabs>

### Managed database providers

<CardGroup cols={2}>
  <Card title="Neon" icon="cloud" href="https://neon.tech">
    Serverless Postgres with generous free tier
  </Card>

  <Card title="Supabase" icon="database" href="https://supabase.com">
    Open-source Firebase alternative with Postgres
  </Card>

  <Card title="Railway" icon="train" href="https://railway.app">
    Easy PostgreSQL with automatic backups
  </Card>

  <Card title="Vercel Postgres" icon="triangle" href="https://vercel.com/docs/storage/vercel-postgres">
    Integrated with Vercel deployments
  </Card>
</CardGroup>

### Connection pooling

For production, use connection pooling:

<Tabs>
  <Tab title="PgBouncer">
    ```bash .env theme={null}
    # Pooled connection
    DATABASE_URL="postgresql://user:pass@pooler:6543/calendso"

    # Direct connection for migrations
    DATABASE_DIRECT_URL="postgresql://user:pass@db:5432/calendso"
    ```
  </Tab>

  <Tab title="Supabase">
    Supabase provides both connection types:

    ```bash theme={null}
    # Transaction mode (pooled)
    DATABASE_URL="postgresql://user:pass@...supabase.co:6543/postgres"

    # Session mode (direct)
    DATABASE_DIRECT_URL="postgresql://user:pass@...supabase.co:5432/postgres"
    ```
  </Tab>
</Tabs>

### Running migrations

<Steps>
  <Step title="Development environment">
    ```bash theme={null}
    yarn workspace @calcom/prisma db-migrate
    ```
  </Step>

  <Step title="Production environment">
    ```bash theme={null}
    yarn workspace @calcom/prisma db-deploy
    ```
  </Step>

  <Step title="Verify migration">
    ```bash theme={null}
    yarn db-studio
    ```

    Opens Prisma Studio at `http://localhost:5555`
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Database connection failed" icon="database">
    **Error**: `P1001: Can't reach database server`

    **Solutions:**

    * Verify PostgreSQL is running
    * Check connection string format
    * Ensure database exists: `createdb calendso`
    * Test connection: `psql $DATABASE_URL`
    * Check firewall rules (cloud databases)
  </Accordion>

  <Accordion title="NEXTAUTH_URL error" icon="triangle-exclamation">
    **Error**: `[next-auth][error][CLIENT_FETCH_ERROR]`

    **Solution:**
    Ensure `NEXTAUTH_URL` matches your actual URL:

    ```bash theme={null}
    # Development
    NEXTAUTH_URL="http://localhost:3000"

    # Production
    NEXTAUTH_URL="https://cal.yourdomain.com"
    ```
  </Accordion>

  <Accordion title="Module not found errors" icon="box-open">
    **Error**: `Cannot find module '@calcom/...'`

    **Solutions:**

    ```bash theme={null}
    # Reinstall dependencies
    rm -rf node_modules
    yarn install

    # Rebuild packages
    yarn build

    # Generate Prisma client
    yarn workspace @calcom/prisma generate
    ```
  </Accordion>

  <Accordion title="Port already in use" icon="plug">
    **Error**: `Port 3000 is already in use`

    **Solutions:**

    ```bash theme={null}
    # Find process using port
    lsof -ti:3000

    # Kill process
    kill -9 $(lsof -ti:3000)

    # Or use different port
    PORT=3001 yarn dev
    ```
  </Accordion>

  <Accordion title="VAPID keys error" icon="key">
    **Error**: `No key set vapidDetails.publicKey`

    **Solution:**
    Generate Web Push keys:

    ```bash theme={null}
    npx web-push generate-vapid-keys
    ```

    Add to `.env`:

    ```bash theme={null}
    NEXT_PUBLIC_VAPID_PUBLIC_KEY="your_public_key"
    VAPID_PRIVATE_KEY="your_private_key"
    ```
  </Accordion>

  <Accordion title="Windows symbolic link issues" icon="windows">
    **Error**: `EPERM: operation not permitted, symlink`

    **Solution:**

    1. Clone with symlink support:
       ```bash theme={null}
       git clone -c core.symlinks=true https://github.com/calcom/cal.com.git
       ```

    2. Replace symlink with real copy:
       ```bash theme={null}
       rm packages/prisma/.env
       cp .env packages/prisma/.env
       ```

    [Full troubleshooting guide →](https://cal.com/docs/how-to-guides/how-to-troubleshoot-symbolic-link-issues-on-windows)
  </Accordion>
</AccordionGroup>

## Production checklist

Before going live:

<Steps>
  <Step title="Security">
    * [ ] Change all default secrets
    * [ ] Use strong, unique passwords
    * [ ] Enable SSL for database connections
    * [ ] Set `NODE_TLS_REJECT_UNAUTHORIZED=0` only behind trusted load balancers
    * [ ] Configure CSP: `CSP_POLICY="non-strict"`
  </Step>

  <Step title="Email">
    * [ ] Configure production SMTP or SendGrid
    * [ ] Verify sender domain
    * [ ] Test email delivery
    * [ ] Set up SPF, DKIM, DMARC records
  </Step>

  <Step title="Database">
    * [ ] Set up automated backups
    * [ ] Enable connection pooling
    * [ ] Configure read replicas (if needed)
    * [ ] Set up monitoring and alerts
  </Step>

  <Step title="Integrations">
    * [ ] Add production OAuth redirect URIs
    * [ ] Configure video conferencing credentials
    * [ ] Set up payment processing (Stripe)
    * [ ] Test all integrations
  </Step>

  <Step title="Performance">
    * [ ] Set up CDN for static assets
    * [ ] Configure Redis for session storage (optional)
    * [ ] Enable gzip compression
    * [ ] Set `MAX_OLD_SPACE_SIZE=4096` for build
  </Step>

  <Step title="Monitoring">
    * [ ] Set up error tracking (Sentry)
    * [ ] Configure uptime monitoring
    * [ ] Enable access logs
    * [ ] Set up performance monitoring
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration guide" icon="gear" href="/self-hosting/configuration">
    Advanced configuration options and environment variables
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get your first booking in 5 minutes
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/overview">
    Connect calendars, video, payments, and more
  </Card>

  <Card title="Contributing" icon="code-branch" href="/developers/contributing/setup">
    Help improve Cal.com
  </Card>
</CardGroup>

<Note>
  **Need help?** Join our [GitHub Discussions](https://github.com/calcom/cal.com/discussions) or [contact support](https://cal.com/sales) for enterprise assistance.
</Note>
