Search…
⌃K
Links

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)
    git clone https://github.com/calcom/cal.com.git
  2. 2.
    Go to the project folder
    cd cal.com
  3. 3.
    Install packages with yarn
    yarn
  4. 4.
    Use openssl rand -base64 32 to generate a key and add it under NEXTAUTH_SECRET in the .env file.
  5. 5.
    Fill in any additional .env and .env.appstore variables (refer to each app’s own documentation as to how to find the keys)
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
yarn dx
Development tip
Add NEXT_PUBLIC_DEBUG=1 anywhere in your .env to get logging information for all the queries and mutations driven by trpc.
echo 'NEXT_PUBLIC_DEBUG=1' >> .env
Manual setup
  1. 1.
    Configure environment variables in the .env file. Replace <user>, <pass>, <db-host>, <db-port> with their applicable values
    DATABASE_URL='postgresql://<user>:<pass>@<db-host>:<db-port>'
  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)
    yarn workspace @calcom/prisma db-deploy
  4. 4.
    Run (in development mode)
    yarn dev
Setting up your first user
  1. 1.
    Open Prisma Studio to look at or modify the database content:
    yarn db-studio
  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.