# Cal.diy


Run [Cal.diy](https://github.com/calcom/cal.diy) on an exe.dev VM.

Cal.diy is an open-source, MIT-licensed scheduling platform from Cal.com. It works well for personal booking pages, team scheduling, and testing calendar workflows without needing a hosted Cal.com account.

## Quick start

Create a new Cal.diy VM from the [Cal.diy starter](/new?idea=cal-diy).

## How it works

The starter installs Docker and runs the official Cal.diy Docker image with a PostgreSQL container. It writes the required runtime variables, generates secrets, and starts the stack with Docker Compose.

Cal.diy runs on port 3000. Use exe.dev's port-qualified proxy URL to open it in your browser:

```
https://<vm-name>.exe.xyz:3000/
```

This is different from many exe.dev starters that put nginx on port 8000. The Cal.diy starter keeps Next.js on port 3000 and exposes that port directly through the exe.dev proxy.

If you want Cal.diy to use the default URL with no port suffix, change the VM's default HTTP proxy port with the SSH lobby command:

```
ssh exe.dev share port <vm-name> 3000
```

After that, `https://<vm-name>.exe.xyz/` will proxy to Cal.diy on port 3000. See the [`share port` command docs](/docs/cli-share#share-port) for details.

## Runtime variables

The official Docker image supports runtime variables such as `DATABASE_URL`, `NEXT_PUBLIC_WEBAPP_URL`, `NEXTAUTH_URL`, `NEXTAUTH_SECRET`, and `CALENDSO_ENCRYPTION_KEY`. exe.dev VMs run Docker normally, so Docker Compose can pass these values through an `.env` file.

The Cal.diy README notes that if `NEXT_PUBLIC_WEBAPP_URL` differs from the value baked into the image at build time, startup may take a little longer while the container updates statically built files. That is expected.

## First-time setup

Open the app and complete the setup wizard to create your first user.

If the calendar connection step appears required and you do not want to connect a calendar yet, go directly to:

```
https://<vm-name>.exe.xyz:3000/event-types
```

Calendar integrations such as Google Calendar and Outlook require their own API credentials.

## Operations

The project lives at `/home/exedev/cal.diy` on the VM. Useful commands:

```
sudo docker compose ps
sudo docker compose logs -f caldiy
sudo docker compose restart caldiy
sudo docker compose pull
sudo docker compose up -d
```
