docs: Update Organization Readme (#22060)
* Update org readme * Update packages/features/ee/organizations/README.md Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
This commit is contained in:
co-authored by
cubic-dev-ai[bot]
Syed Ali Shahbaz
parent
bbd8af074e
commit
a1571d01bd
@@ -488,13 +488,8 @@ Don't code but still want to contribute? Join our [Discussions](https://github.c
|
||||
- Set CSP_POLICY="non-strict" env variable, which enables [Strict CSP](https://web.dev/strict-csp/) except for unsafe-inline in style-src . If you have some custom changes in your instance, you might have to make some code change to make your instance CSP compatible. Right now it enables strict CSP only on login page and on other SSR pages it is enabled in Report only mode to detect possible issues. On, SSG pages it is still not supported.
|
||||
|
||||
## Single Org Mode
|
||||
If you want to have booker.yourcompany.com to be the domain used for both dashboard(e.g. https://booker.yourcompany.com/event-types) and booking pages(e.g. https://booker.yourcompany.com/john.joe/15min).
|
||||
- Set the `NEXT_PUBLIC_SINGLE_ORG_SLUG` environment variable to the slug of the organization you want to use. `NEXT_PUBLIC_SINGLE_ORG_SLUG=booker`
|
||||
- Set the `NEXT_PUBLIC_WEBAPP_URL` environment variable to the URL of the Cal.com self-hosted instance e.g. `NEXT_PUBLIC_WEBAPP_URL=https://booker.yourcompany.com`.
|
||||
- Set the `NEXT_PUBLIC_WEBSITE_URL` environment variable to the URL of the Cal.com self-hosted instance e.g. `NEXT_PUBLIC_WEBSITE_URL=https://booker.yourcompany.com`.
|
||||
- Set the `NEXTAUTH_URL` environment variable to the URL of the Cal.com self-hosted instance e.g. `NEXTAUTH_URL=https://booker.yourcompany.com`.
|
||||
Refer to docs [here](./docs/self-hosting/guides/organization/single-organization-setup) for a detailed documentation with screenshots.
|
||||
|
||||
Note: It causes root to serve the dashboard and not the organization profile page which shows all bookable users in the organization.
|
||||
|
||||
## Integrations
|
||||
|
||||
|
||||
@@ -177,6 +177,15 @@
|
||||
"group": "Sponsorship",
|
||||
"icon": "money-check-dollar",
|
||||
"pages": ["/self-hosting/guides/sponsorship/can-calcom-sponsor-my-open-source-project"]
|
||||
},
|
||||
{
|
||||
"group": "Organizations",
|
||||
"icon": "building",
|
||||
"pages": [
|
||||
"/self-hosting/guides/organization/organization-setup",
|
||||
"/self-hosting/guides/organization/understanding-organization-env-variables",
|
||||
"/self-hosting/guides/organization/single-organization-setup"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 310 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 293 KiB |
@@ -0,0 +1,74 @@
|
||||
---
|
||||
title: "Organization Setup"
|
||||
icon: "building"
|
||||
---
|
||||
|
||||
This guide will walk you through setting up and configuring the organizations feature for your self-hosted Cal.com instance. Organizations allow you to create branded, multi-tenant environments within your Cal.com deployment.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before setting up organizations, ensure you have:
|
||||
- A working Cal.com instance already installed and running
|
||||
- Admin access to your Cal.com instance
|
||||
- Access to modify environment variables and restart your server
|
||||
|
||||
## Step 1: Enable Organizations Feature
|
||||
|
||||
1. Login as admin using `admin@example.com`
|
||||
2. Navigate to **Settings** → **Admin** → **Features**
|
||||
3. Turn on the **Organizations** feature flag under the Features section
|
||||

|
||||
|
||||
## Step 2: Configure Environment Variables
|
||||
|
||||
Set the following environment variables in your `.env` file:
|
||||
|
||||
```bash
|
||||
NEXT_PUBLIC_WEBAPP_URL=http://app.cal.local:3000
|
||||
NEXT_PUBLIC_WEBSITE_URL=http://app.cal.local:3000
|
||||
NEXTAUTH_URL=http://app.cal.local:3000
|
||||
ORGANIZATIONS_ENABLED=1
|
||||
```
|
||||
|
||||
## Step 3: Configure Local DNS
|
||||
|
||||
Add the following entry to your hosts file to enable local access:
|
||||
|
||||
```bash
|
||||
127.0.0.1 app.cal.local
|
||||
```
|
||||
|
||||
**Host file locations:**
|
||||
- **Linux/Mac**: `/etc/hosts`
|
||||
- **Windows**: `C:\Windows\System32\drivers\etc\hosts`
|
||||
|
||||
## Step 4: Start/Restart Development Server
|
||||
|
||||
After making the configuration changes, start/restart your development server:
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
|
||||
## Step 5: Create an Organization
|
||||
|
||||
1. Login using `pro@example.com` (or any user account)
|
||||
2. Visit `http://app.cal.local:3000/settings/organizations/new`
|
||||
3. Follow the onboarding steps:
|
||||
- Choose a slug for the organization(say `myorg`)
|
||||
- Ignore pricing information (not required for self-hosting)
|
||||
- Complete the first step (remaining steps can be skipped for now)
|
||||

|
||||
|
||||
<Note>
|
||||
After creating the organization, you'll be moved inside it and all existing Cal.com links will redirect to the organization URL (e.g., `yourdomain.cal.local:3000`).
|
||||
</Note>
|
||||
|
||||
## Accessing Your Organization
|
||||
|
||||
Now if everything above went well, all booking pages for the organization will be accessible at:
|
||||
```
|
||||
http://myorg.cal.local:3000/{CAL_LINK}
|
||||
```
|
||||
|
||||
Read more about some other [Organization related environment variables](./understanding-organization-env-variables.mdx) to configure your Cal.com instance to work with multiple organizations.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
title: "Single Organization Setup"
|
||||
icon: "building"
|
||||
---
|
||||
|
||||
This guide will walk you through setting up your cal.com instance to work with an organization using the same domain.
|
||||
|
||||
Note that an organization's booking pages are by default accessible at `http://{orgSlug}.yourcalinstance.example/{CAL_LINK}` but with this setup, you won't need another domain, if you want to use just one organization.
|
||||
|
||||
## Step 1: Identify what slug you want to use for your organization
|
||||
|
||||
For a company with domain `yourdomain.com`, a good slug would be `yourdomain`.
|
||||
|
||||
## Step 2: Setup and create an organization
|
||||
|
||||
Follow the [Organization Setup](./organization-setup) guide to enable organizations feature.
|
||||
|
||||
<Info>
|
||||
Make sure to use the slug you decided in Step 1.
|
||||
</Info>
|
||||
|
||||
## Step 3: Add Environment Variable
|
||||
|
||||
Set the following environment variable in your `.env` file:
|
||||
|
||||
```bash
|
||||
# yourdomain is the slug you decided in Step 1
|
||||
NEXT_PUBLIC_SINGLE_ORG_SLUG=yourdomain
|
||||
```
|
||||
|
||||
## Step 4: Restart Development Server
|
||||
|
||||
After making the configuration changes, restart your development server:
|
||||
|
||||
```bash
|
||||
yarn dev
|
||||
```
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: "Environment Variables"
|
||||
icon: "gear"
|
||||
---
|
||||
|
||||
This guide explains the key environment variables used to configure organizations in your Cal.com self-hosted instance.
|
||||
|
||||
## RESERVED_SUBDOMAINS
|
||||
|
||||
This is a comma-separated list of subdomains that are not allowed to be used as organization slugs.
|
||||
|
||||
For example, if you set `RESERVED_SUBDOMAINS="app,auth,help"`, then the domains `app.cal.com`, `auth.cal.com` and `help.cal.com` are reserved for use by the Cal.com instance. This means you cannot create an organization with the slug `app`, `auth` or `help`.
|
||||
|
||||
## ALLOWED_HOSTNAMES
|
||||
|
||||
This is a comma-separated list of domains on whose subdomains the booking pages and dashboard are allowed to work.
|
||||
|
||||
**Examples:**
|
||||
|
||||
If `ALLOWED_HOSTNAMES="cal.com,cal.dev"`, then:
|
||||
- `acme.cal.com` is a valid organization booking domain and `WEBAPP_URL` can be set to `http://app.cal.com`
|
||||
- `dunder.cal.dev` is also a valid organization subdomain and `WEBAPP_URL` can be set to `http://app.cal.dev`
|
||||
|
||||
If `ALLOWED_HOSTNAMES="cal.domain.tld"`, then:
|
||||
- `WEBAPP_URL` should be set to `http://app.cal.domain.tld`
|
||||
- Valid organization domains include: `acme.cal.domain.tld`, `dunder.cal.domain.tld`, `xxxx.cal.domain.tld`
|
||||
|
||||
<Info>
|
||||
Make sure your DNS is properly configured to point organization subdomains to your Cal.com instance.
|
||||
</Info>
|
||||
@@ -70,3 +70,4 @@ This will generate a public URL that you can use to access your localhost server
|
||||
## DNS setup
|
||||
|
||||
When a new organization is created, other than not being verified up until the admin accepts it in settings as explained in step 6, a flag gets created that marks the organization as missing DNS setup. That flag get auto-checked by the system upon organization creation when the Cal instance is deployed in Vercel and the subdomain registration was successful. Logging in as admin and going to Settings > Organizations section, you will see that flag as a badge, designed to give admins a glimpe on what is pending in terms of making an organization work. Alongside the mentioned badge, an email gets sent to admins in order to warn them there is a pending action about setting up DNS for the newly created organization to work.
|
||||
Read more about the Organization Setup [here](https://cal.com/docs/self-hosting/guides/organization/organization-setup)
|
||||
Reference in New Issue
Block a user