refactor: Cal.diy (#28903)

* feat: Cal.diy — community-driven MIT-licensed fork of Cal.com

This squashed commit contains all Cal.diy changes applied on top of calcom/cal.com main:

- Rebrand Cal.com to Cal.diy across the entire codebase
- Remove Enterprise Edition (EE) features, license checks, and AGPL restrictions
- Switch license from AGPL-3.0 to MIT
- Remove docs/ directory (migrated to Nextra at cal.diy)
- Remove dead code: org tests, EE tips, platform nav, premium username, SAML/SSO, etc.
- Clean up .env.example for self-hosted Cal.diy
- Update Docker image references to calcom/cal.diy
- Update README, CONTRIBUTING.md, and issue templates for Cal.diy community fork
- Add PR welcome bot for Cal.diy contributors
- Fix API v2 breaking changes oasdiff ignore entries
- Replace Blacksmith CI runners with default GitHub Actions

3893 files changed, 20789 insertions(+), 411020 deletions(-)

Co-Authored-By: [email protected] <[email protected]>

* refactor: remove org-specific /organizations/:orgId endpoints from API v2 atoms controllers (#1701)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix: revert Cal.diy Inc to Cal.com, Inc. in license files, copyright notices, and package metadata (#1702)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* rip out org related comments in api v2

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Benny JooandDevin AI authored and GitHub committed 2026-04-15 09:52:36 -03:00
1 parent a17f28e9ab
commit ab21c7f805
4080 files changed
+14403 -404922

No files matched your search

+4 -4
View File
@@ -51,15 +51,15 @@ const navbar: React.ReactElement = (
const footer: React.ReactElement = (
<Footer>
<small>
Cal.diy is the open source community edition of Cal.com. Cal.com® and Cal®
Cal.diy is the open source community edition of Cal.com. Cal.diy® and Cal®
are a registered trademark by Cal.com, Inc. All rights reserved.
</small>
</Footer>
);
export const metadata: { title: string; description: string } = {
title: "Cal.com Docs",
description: "Cal.com self-hosting documentation",
title: "Cal.diy Docs",
description: "Cal.diy self-hosting documentation",
};
export default async function RootLayout({
@@ -79,7 +79,7 @@ export default async function RootLayout({
<Layout
navbar={navbar}
pageMap={await getPageMap()}
docsRepositoryBase="https://github.com/calcom/cal.com/tree/main/apps/docs"
docsRepositoryBase="https://github.com/calcom/cal.diy/tree/main/apps/docs"
footer={footer}
>
{children}
+4 -4
View File
@@ -21,11 +21,11 @@
9. **Add Authorized Redirect URIs** - Under Authorized redirect URI's, add the URIs:
```
<Cal.com URL>/api/integrations/googlecalendar/callback
<Cal.com URL>/api/auth/callback/google
<Cal.diy URL>/api/integrations/googlecalendar/callback
<Cal.diy URL>/api/auth/callback/google
```
Replace `<Cal.com URL>` with the URL where your application runs.
Replace `<Cal.diy URL>` with the URL where your application runs.
10. **Download the OAuth Client ID JSON** - The key will be created, redirecting you back to the Credentials page. Select the new client ID under "OAuth 2.0 Client IDs", then click "Download JSON". Copy the JSON file contents and paste the entire string into the `.env` and `.env.appStore` files under the `GOOGLE_API_CREDENTIALS` key.
@@ -37,7 +37,7 @@ GOOGLE_LOGIN_ENABLED=false
This will configure the Google integration as an Internal app, restricting login access.
### Adding Google Calendar to Cal.com App Store
### Adding Google Calendar to Cal.diy App Store
After adding Google credentials, you can now add the Google Calendar App to the app store. Repopulate the App store by running:
+3 -3
View File
@@ -22,13 +22,13 @@ HUBSPOT_CLIENT_SECRET
7. **Set the Redirect URL for OAuth** - Set the Redirect URL for OAuth to:
```
<Cal.com URL>/api/integrations/hubspot/callback
<Cal.diy URL>/api/integrations/hubspot/callback
```
Replace `<Cal.com URL>` with the URL where your application is hosted.
Replace `<Cal.diy URL>` with the URL where your application is hosted.
8. **Select Required Scopes** - In the "Scopes" section, select "Read" and "Write" for the scope called `crm.objects.contacts`.
9. **Save the Application** - Click the "Save" button at the bottom of the page.
10. **Complete HubSpot Integration** - You're all set! Any booking in Cal.com will now be created as a meeting in HubSpot for your contacts.
10. **Complete HubSpot Integration** - You're all set! Any booking in Cal.diy will now be created as a meeting in HubSpot for your contacts.
+2 -2
View File
@@ -11,10 +11,10 @@
4. **Configure the Web redirect URI** - Set the Web redirect URI to:
```
<Cal.com URL>/api/integrations/office365calendar/callback
<Cal.diy URL>/api/integrations/office365calendar/callback
```
Replace `<Cal.com URL>` with the URL where your application runs.
Replace `<Cal.diy URL>` with the URL where your application runs.
5. **Obtain and set the MS_GRAPH_CLIENT_ID** - Use the Application (client) ID as the value for `MS_GRAPH_CLIENT_ID` in your `.env` file.
+3 -3
View File
@@ -8,10 +8,10 @@
3. **Activate OAuth for Standard Accounts** - Go to [Stripe Connect Settings](https://dashboard.stripe.com/settings/connect) and activate OAuth for Standard Accounts.
4. **Add the redirect URL** - Add the following redirect URL, replacing `<Cal.com URL>` with your application's URL:
4. **Add the redirect URL** - Add the following redirect URL, replacing `<Cal.diy URL>` with your application's URL:
```
<Cal.com URL>/api/integrations/stripepayment/callback
<Cal.diy URL>/api/integrations/stripepayment/callback
```
5. **Save the Stripe Client ID** - Copy your client ID (`ca_...`) to `STRIPE_CLIENT_ID` in the `.env` file.
@@ -19,7 +19,7 @@
6. **Set up a Stripe webhook** - Open [Stripe Webhooks](https://dashboard.stripe.com/webhooks) and add:
```
<Cal.com URL>/api/integrations/stripepayment/webhook
<Cal.diy URL>/api/integrations/stripepayment/webhook
```
as the webhook for connected applications.
+10 -10
View File
@@ -22,16 +22,16 @@ ZOHOCRM_CLIENT_SECRET
7. **Set the Redirect URL for OAuth** - Set the Redirect URL for OAuth to:
```
<Cal.com URL>/api/integrations/zohocrm/callback
<Cal.diy URL>/api/integrations/zohocrm/callback
```
Replace `<Cal.com URL>` with your application URL.
Replace `<Cal.diy URL>` with your application URL.
8. **Enable Multi-DC Option** - In the "Settings" section, check the "Multi-DC" option if you wish to use the same OAuth credentials for all data centers.
9. **Save your settings** - Click "Save" or "UPDATE" at the bottom of the page.
10. **Integration is Ready** - Your ZohoCRM integration can now be easily added in the Cal.com settings.
10. **Integration is Ready** - Your ZohoCRM integration can now be easily added in the Cal.diy settings.
#### Obtaining Zoho Calendar Client ID and Secret
@@ -40,19 +40,19 @@ Replace `<Cal.com URL>` with your application URL.
2. **Create a New Server-based Application** - Choose "Server-based Applications" and set the Redirect URL for OAuth to:
```
<Cal.com URL>/api/integrations/zohocalendar/callback
<Cal.diy URL>/api/integrations/zohocalendar/callback
```
Replace `<Cal.com URL>` with your application URL.
Replace `<Cal.diy URL>` with your application URL.
3. **Fill in Client Details** - Enter any information you want in the "Client Details" tab.
4. **Go to the Client Secret tab** - Navigate to the "Client Secret" tab.
5. **Save Credentials in Cal.com Admin Panel** - Copy the Client ID and Client Secret to your app keys in the Cal.com admin panel at:
5. **Save Credentials in Cal.diy Admin Panel** - Copy the Client ID and Client Secret to your app keys in the Cal.diy admin panel at:
```
<Cal.com>/settings/admin/apps
<Cal.diy>/settings/admin/apps
```
6. **Enable Multi-DC Option** - In the "Settings" section of Zoho API Console, check the "Multi-DC" option if you wish to use the same OAuth credentials across data centers.
@@ -78,10 +78,10 @@ Replace `<Cal.com URL>` with your application URL.
3. **Set the Redirect URL for OAuth** - Set the Redirect URL for OAuth to:
```
<Cal.com URL>/api/integrations/zoho-bigin/callback
<Cal.diy URL>/api/integrations/zoho-bigin/callback
```
Replace `<Cal.com URL>` with your application URL.
Replace `<Cal.diy URL>` with your application URL.
4. **Go to the Client Secret tab** - Navigate to the "Client Secret" tab.
@@ -94,4 +94,4 @@ ZOHO_BIGIN_CLIENT_SECRET
6. **Enable Multi-DC Option** - In the "Settings" section, check the "Multi-DC" option if you wish to use the same OAuth credentials across data centers.
7. **Complete Zoho Bigin Integration** - Your Zoho Bigin integration is now ready and can be added from the Cal.com app store.
7. **Complete Zoho Bigin Integration** - Your Zoho Bigin integration is now ready and can be added from the Cal.diy app store.
+3 -3
View File
@@ -26,10 +26,10 @@ ZOOM_CLIENT_SECRET
9. **Set the Redirect URL for OAuth** - Set the Redirect URL for OAuth to:
```
<Cal.com URL>/api/integrations/zoomvideo/callback
<Cal.diy URL>/api/integrations/zoomvideo/callback
```
Replace `<Cal.com URL>` with your application URL.
Replace `<Cal.diy URL>` with your application URL.
10. **Configure Allow List and Subdomain Check** - Add the redirect URL to the allow list and enable "Subdomain check". Ensure it displays "saved" below the form.
@@ -37,4 +37,4 @@ Replace `<Cal.com URL>` with your application URL.
12. **Save the Scope** - Click "Done" to save the scope settings.
13. **Complete Zoom Integration** - Your Zoom integration is now ready and can be easily added in the Cal.com settings.
13. **Complete Zoom Integration** - Your Zoom integration is now ready and can be easily added in the Cal.diy settings.
+2 -2
View File
@@ -82,7 +82,7 @@ Now that Docker is installed and running, you can deploy Cal.diy on your virtual
Use the following command to pull the Cal.diy Docker image from Docker Hub:
```bash
docker pull cal/calcom
docker pull calcom/cal.diy
```
#### Run the Docker Container
@@ -90,7 +90,7 @@ docker pull cal/calcom
Run the Docker container using the following command:
```bash
docker run -d -p 80:80 cal/cal.com
docker run -d -p 80:80 calcom/cal.diy
```
This command maps port 80 on your local machine to port 80 inside the container, so you can access Cal.diy from outside the container.
+2 -2
View File
@@ -8,7 +8,7 @@ You need a PostgresDB database hosted somewhere. [Supabase](https://supabase.com
## One Click Deployment
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/calcom/cal.com)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/calcom/cal.diy)
## Manual Deployment
@@ -17,7 +17,7 @@ You need a PostgresDB database hosted somewhere. [Supabase](https://supabase.com
1. **Fork and clone the repository**
```bash
git clone https://github.com/<<your-fork>>/cal.com.git
git clone https://github.com/<<your-fork>>/cal.diy.git
```
2. **Set environment variables**
+4 -4
View File
@@ -20,7 +20,7 @@ import { Callout } from "nextra/components";
## Getting Started
- [Installation](/installation) - Learn how to install and set up Cal.com
- [Installation](/installation) - Learn how to install and set up Cal.diy
- [Database Migrations](/database-migrations) - Manage database schema changes
- [Upgrading](/upgrading) - Keep your instance up to date
- [Docker](/docker) - Deploy with Docker
@@ -28,7 +28,7 @@ import { Callout } from "nextra/components";
## Deployments
Deploy Cal.com on your preferred platform:
Deploy Cal.diy on your preferred platform:
- [AWS](/deployments/aws)
- [Azure](/deployments/azure)
@@ -46,7 +46,7 @@ of monthly bookings by large organizations. Cal.diy is the new open source commu
Like any diy project, Cal.com, Inc. does not guarantee security and safety of the open source project. Cal.diy is
community maintained and strictly recommended for personal, non-production use. Please use at your own risk.
For any commerical usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
For any commercial usage, please visit Cal.com or request enterprise access to our on-prem hosting: https://cal.com/sales.
Find all differences in features below (summarized):
@@ -121,4 +121,4 @@ Find all differences in features below (summarized):
| Delegation | ❌ | ✅ |
| Workspace Platform | ❌ | ✅ |
| Admin Panel | ❌ | ✅ |
| | [Install](/installation) |[Sign up](https://cal.com/signup)|
| | [Install](/installation) |[Sign up](https://cal.com/signup)|
+218
View File
@@ -0,0 +1,218 @@
---
title: "Troubleshooting"
icon: "triangle-exclamation"
---
This guide covers the most common issues encountered when self-hosting Cal.diy, along with their solutions.
## Onboarding / Setup Issues
### Stripe Payment Features Not Working
**Symptom:** Stripe-related features (paid events, app store payment integration) are not available, or you see errors when attempting to use payment features.
**Cause:** The Stripe integration requires several environment variables to be configured. These variables are defined across two files: `.env` (root) and `.env.appStore`. If they are missing or empty, the Stripe app will be marked as "not installed" and payment-related features will be unavailable.
**Solution:** Add the following variables to your `.env` file (root):
```env
STRIPE_PRIVATE_KEY=sk_test_...
STRIPE_CLIENT_ID=ca_...
STRIPE_WEBHOOK_SECRET=whsec_...
```
And in your `.env.appStore` file (or `.env` if using a single file):
```env
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=pk_test_...
```
> **Note:** Replace these with your actual Stripe API keys from the [Stripe Dashboard](https://dashboard.stripe.com/apikeys). If you don't need payment features, you can safely leave these empty — the app will function without them, but Stripe-related features will be disabled.
Related issue: [#25993](https://github.com/calcom/cal.diy/issues/25993)
---
## URL and Redirect Issues
### Redirect to `localhost:3000` After Deployment
**Symptom:** After deploying Cal.diy to a server or domain, login redirects or internal links point back to `http://localhost:3000` instead of your actual domain.
**Cause:** The environment variables `NEXTAUTH_URL` and `NEXT_PUBLIC_WEBAPP_URL` are not set to your production domain. These variables tell Cal.diy and NextAuth where the app is hosted.
**Solution:** Update your `.env` file to use your actual domain:
```env
# Replace with your actual domain
NEXT_PUBLIC_WEBAPP_URL=https://cal.yourdomain.com
NEXTAUTH_URL=https://cal.yourdomain.com
```
**Important notes:**
- Do **not** include a trailing slash.
- `NEXTAUTH_URL` is optional if `NEXT_PUBLIC_WEBAPP_URL` is set — NextAuth will infer the base URL from the incoming request's `Host` header when `NEXTAUTH_URL` is not explicitly configured.
- For Docker deployments, these must be set **before** building the image, as `NEXT_PUBLIC_WEBAPP_URL` is a build-time variable (it is inlined by Next.js during the build). Rebuild the image after changing it.
- For Vercel deployments, you do **not** need to set `NEXTAUTH_URL` — Vercel automatically infers it from the deployment URL via the `VERCEL_URL` environment variable.
Related issue: [#21921](https://github.com/calcom/cal.diy/issues/21921)
---
## Docker-Specific Issues
### API v2 Service Not Starting
**Symptom:** After running `docker compose up -d`, the `calcom-api` service fails to start or immediately exits. The web app works, but API v2 endpoints (`/api/v2/...`) return connection errors.
**Cause:** The API v2 service requires several environment variables that are not in the root `.env.example`. If any required variable is missing, the service will throw a `Missing environment variable` error and exit on startup.
**Solution:** Add the following variables to your root `.env` file (the `docker-compose.yml` passes these to the `calcom-api` service):
```env
# Required for API v2 (service will not start without these)
REDIS_URL=redis://redis:6379
JWT_SECRET=your_random_jwt_secret_here
NEXTAUTH_SECRET=your_nextauth_secret_here
CALENDSO_ENCRYPTION_KEY=your_32_character_encryption_key
STRIPE_API_KEY=sk_test_your_stripe_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
# Optional (have sensible defaults)
WEB_APP_URL=https://cal.yourdomain.com
REDIS_PORT=6379
LOG_LEVEL=warn
```
> **Note:** `STRIPE_API_KEY` is the API v2 equivalent of `STRIPE_PRIVATE_KEY` used by the web app. Both are Stripe secret keys but are consumed by different services. If you don't need Stripe functionality in the API, you can set a placeholder value (e.g., `sk_test_placeholder`), but the variable must be present.
You can generate secure secrets with:
```bash
openssl rand -base64 32
```
Then restart the stack:
```bash
docker compose down && docker compose up -d
```
Check the API v2 service logs for further details if it still fails:
```bash
docker compose logs calcom-api
```
> **Tip:** The API v2 service has its own `.env.example` at `apps/api/v2/.env.example` with a complete list of all supported variables. Refer to it for the full configuration reference.
---
### `CLIENT_FETCH_ERROR` in Logs
**Symptom:** The following error appears in Docker logs, and login/session fails:
```
[next-auth][error][CLIENT_FETCH_ERROR]
request to http://<your-domain>/api/auth/session failed, reason: getaddrinfo ENOTFOUND
```
**Cause:** The Docker container cannot resolve the external hostname set in `NEXTAUTH_URL` from within the container's network.
**Solution:** Add your domain to the container's `/etc/hosts` so it resolves to itself:
```yaml
# docker-compose.yml
services:
calcom:
extra_hosts:
- "cal.yourdomain.com:127.0.0.1"
```
This allows the container to resolve your public domain internally while keeping `NEXTAUTH_URL` set to your public URL (required for OAuth callbacks to work).
> **Important:** This approach works when `NEXTAUTH_URL` uses HTTP (e.g., `http://cal.yourdomain.com:3000`). If your `NEXTAUTH_URL` uses HTTPS, the container will attempt to connect to `127.0.0.1:443`, while the app listens on port 3000 — this will fail. In that case, ensure your reverse proxy is also running inside the Docker network, or see the SSL section below.
> **Why not use `localhost`?** Setting `NEXTAUTH_URL` to `localhost` would fix this DNS error, but **breaks OAuth** — external providers like Google would redirect to `localhost` instead of your domain.
---
### SSL / HTTPS Issues Behind a Reverse Proxy
**Symptom:** Requests fail with SSL certificate errors when Cal.diy is behind a load balancer or reverse proxy that handles HTTPS termination.
**Solution (choose one):**
**Option 1: If your proxy forwards HTTP internally (most common)**
Keep `NEXTAUTH_URL` set to your **public-facing HTTPS URL**:
```env
NEXTAUTH_URL=https://cal.yourdomain.com
```
Then configure your reverse proxy to forward these headers so internal requests work correctly:
```nginx
# Nginx example
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
```
> **Why not use `localhost`?** Setting `NEXTAUTH_URL=http://localhost:3000` would fix internal SSL errors, but **breaks OAuth callbacks** — external providers (Google, Microsoft) would try to redirect users to `localhost`, which fails. Always use your public URL.
**Option 2: If using self-signed certificates internally**
Add your internal CA to Node's trusted certificates:
```env
NODE_EXTRA_CA_CERTS=/path/to/your-internal-ca.crt
```
**Option 3: Last resort (not recommended for production)**
```env
NODE_TLS_REJECT_UNAUTHORIZED=0
```
> **Security Warning:** This disables **all** TLS certificate verification globally, including external API calls to Stripe, Google Calendar, and other services. This makes your instance vulnerable to man-in-the-middle attacks. Only use this in isolated development environments where you fully control all network traffic.
---
## Database Issues
### First User Setup Fails
**Symptom:** Attempting to create the first admin user via the `/setup` page results in an error.
**Cause:** This can occur if the database migrations have not been applied, or if the database is in an inconsistent state.
**Solution:**
1. Ensure database migrations are applied:
```bash
# For development
yarn workspace @calcom/prisma db-migrate
# For production / Docker
yarn workspace @calcom/prisma db-deploy
```
2. Verify the database is accessible and the `DATABASE_URL` in your `.env` is correct.
3. If the issue persists after migrations, check the application logs for the specific Prisma error message — it will indicate which field or constraint is failing.
> **Note:** The setup endpoint (`/auth/setup`) creates the first user with the `ADMIN` role. It only works when the `User` table is completely empty. If a previous setup attempt partially succeeded, you may need to manually clear the users table before retrying.
---
## Getting Further Help
If your issue is not listed here:
1. Search the [Cal.diy GitHub Issues](https://github.com/calcom/cal.diy/issues) — many common problems have documented solutions in issue threads.
2. Check the [Cal.com Community](https://community.cal.com) forum.
3. Review the [Docker configuration](./docker) and [Installation guide](./installation) for any steps you may have missed.