Search…
Installation

Development Setup

  1. 1.
    Clone the repo into a public GitHub repository (to comply with AGPLv3. To clone in a private repository, acquire a commercial license)
    1
    git clone https://github.com/calcom/cal.com.git
    Copied!
  2. 2.
    Go to the project folder
    1
    cd cal.com
    Copied!
  3. 3.
    Install packages with yarn
    1
    yarn
    Copied!
  4. 4.
    Use openssl rand -base64 32 to generate a key and add it under NEXTAUTH_SECRET in the .env file.
Quick start with yarn dx
  • Requires Docker and Docker Compose to be installed
  • Will start a local Postgres instance with a few test users - the credentials will be logged in the console
1
yarn dx
Copied!
Development tip
Add NEXT_PUBLIC_DEBUG=1 anywhere in your .env to get logging information for all the queries and mutations driven by trpc.
1
echo 'NEXT_PUBLIC_DEBUG=1' >> .env
Copied!
Manual setup
  1. 1.
    Configure environment variables in the .env file. Replace <user>, <pass>, <db-host>, <db-port> with their applicable values
    1
    DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>'
    Copied!
  2. 2.
    Set a 32 character random string in your .env file for the CALENDSO_ENCRYPTION_KEY (You can use a command like openssl rand -base64 24 to generate one).
  3. 3.
    Set up the database using the Prisma schema (found in apps/web/prisma/schema.prisma)
    1
    yarn workspace @calcom/prisma db-deploy
    Copied!
  4. 4.
    Run (in development mode)
    1
    yarn dev
    Copied!
Setting up your first user
  1. 1.
    Open Prisma Studio to look at or modify the database content:
    1
    yarn db-studio
    Copied!
  2. 2.
    Click on the User model to add a new user record.
  3. 3.
    Fill out the fields email, username, password, and set metadata to empty {} (remembering to encrypt your password with BCrypt) and click Save 1 Record to create your first user.
    New users are set on a TRIAL plan by default. You might want to adjust this behavior to your needs in the apps/web/prisma/schema.prisma file.
  4. 4.
    Open a browser to http://localhost:3000 and login with your just created, first user.
Export as PDF
Copy link