Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js (Version: >=18.x)
  • PostgreSQL (Version: >=13.x)
  • Yarn (>=4.12.0) - recommended package manager
  • Git for version control
If you want to enable any of the available integrations, you may need additional credentials. See the Integrations section for more details.

Quick Start with Docker

The fastest way to get started is using Docker:
yarn dx
Requirements:
  • Docker and Docker Compose must be installed
  • This will start a local Postgres instance with test users

Default Test Credentials

EmailPasswordRole
[email protected]freeFree user
[email protected]proPro user
[email protected]trialTrial user
[email protected]ADMINadmin2022!Admin user
[email protected]onboardingOnboarding incomplete
Access the application at http://localhost:3000
To view all seeded users and their details, run yarn db-studio and visit http://localhost:5555

Manual Setup

1. Clone the Repository

Clone the repository (or fork it):
git clone https://github.com/calcom/cal.com.git
cd cal.com
Windows Users: Run this command in gitbash with admin privileges:
git clone -c core.symlinks=true https://github.com/calcom/cal.com.git
See docs for symbolic link troubleshooting.

2. Install Dependencies

yarn

3. Configure Environment Variables

Duplicate the example file:
cp .env.example .env
Generate required secrets:
# Generate NEXTAUTH_SECRET
openssl rand -base64 32

# Generate CALENDSO_ENCRYPTION_KEY
openssl rand -base64 24
Add these values to your .env file.
Windows Users: Replace the packages/prisma/.env symlink with a real copy to avoid Prisma errors:
rm packages/prisma/.env && cp .env packages/prisma/.env

4. Set Up Node Version

Use the correct Node version with nvm:
nvm use
If the version isn’t installed:
nvm install && nvm use

5. Configure Database

Set the DATABASE_URL in your .env file:
DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>/<db-name>'

Option A: Local PostgreSQL

  1. Download and install PostgreSQL
  2. Create a database:
    createdb calcom
    
  3. Connect and verify:
    psql -h localhost -U postgres -d calcom
    \conninfo
    

Option B: Cloud Services

Alternatively, use a hosted database:

6. Copy Database URL to App Store Config

cp .env .env.appStore
Or manually copy the DATABASE_URL from .env to .env.appStore.

7. Run Database Migrations

Development:
yarn workspace @calcom/prisma db-migrate
Production:
yarn workspace @calcom/prisma db-deploy

8. Set Up MailHog (Optional)

For viewing emails during development:
docker pull mailhog/mailhog
docker run -d -p 8025:8025 -p 1025:1025 mailhog/mailhog
Required when E2E_TEST_MAILHOG_ENABLED is set to “1”

9. Start Development Server

yarn dev
The application will be available at http://localhost:3000

Creating Your First User

Method 1: Using Prisma Studio

  1. Open Prisma Studio:
    yarn db-studio
    
  2. Navigate to the User model
  3. Add a new record with:
    • email
    • username
    • password (encrypted with BCrypt)
    • metadata set to {}
  4. Access http://localhost:3000 and login

Method 2: Seed the Database

cd packages/prisma
yarn db-seed
This populates the database with dummy users (same as yarn dx).

Development Tips

Increase Node Memory

Add to your shell profile or run before starting the app:
export NODE_OPTIONS="--max-old-space-size=16384"

Control Logging Verbosity

Set the log level in your .env file:
NEXT_PUBLIC_LOGGER_LEVEL=3  # info level
Log Levels:
  • 0 - silly
  • 1 - trace
  • 2 - debug
  • 3 - info
  • 4 - warn
  • 5 - error
  • 6 - fatal

Gitpod Setup

Click the button below to open a fully configured workspace: Open in Gitpod

Updating Your Local Environment

  1. Pull the latest changes:
    git pull
    
  2. Update dependencies:
    yarn
    
  3. Run migrations:
    yarn workspace @calcom/prisma db-migrate  # Development
    yarn workspace @calcom/prisma db-deploy   # Production
    
  4. Check for environment variable changes:
    yarn predev
    
  5. Restart the development server:
    yarn dev
    

Building for Production

Ensure you can create a full production build:
yarn build
Always verify that a production build succeeds before pushing code.

Next Steps

Build docs developers (and LLMs) love