Skip to content

Add Cal.diy#1874

Open
masterde wants to merge 1 commit into
community-scripts:mainfrom
masterde:add-caldiy-script
Open

Add Cal.diy#1874
masterde wants to merge 1 commit into
community-scripts:mainfrom
masterde:add-caldiy-script

Conversation

@masterde

Copy link
Copy Markdown

✍️ Description

Adds a new LXC helper-script for Cal.diy — the open-source community edition of Cal.com (scheduling / booking platform). Builds the Turborepo monorepo from source (Node 22 + PostgreSQL 16 + yarn), runs the web app via systemd on port 3000.

Recommended resources: 4 CPU / 8192 MB RAM / 20 GB disk on Debian 13. RAM/disk can be reduced after a successful first build.

🔗 Related PR / Issue

Link: #

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

arm64 Support (X in brackets)

  • arm64 supported - Tested and supported on arm64.
  • arm64 not tested - Assumed to work on arm64, but testing has not been done.
  • arm64 not supported - Confirmed upstream dependencies or binaries do not support arm64.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials

📋 Additional Information (optional)

Files added (4):

  • ct/caldiy.sh
  • install/caldiy-install.sh
  • ct/headers/caldiy
  • json/caldiy.json

Validation:

  • bash -n
  • shfmt -i 2 -ci -d ✅ (no diff)
  • shellcheck shows only SC1090 / SC1091 (same warnings present in merged peers such as colanode). cd calls are hardened with || exit / || return (SC2164 clean).
  • python3 -c "import json; json.load(open('json/caldiy.json'))"

Two non-obvious decisions worth preserving in review:

  1. CALENDSO_ENCRYPTION_KEY is generated with openssl rand -base64 24 (32-char AES-256 key), not base64 32 (which yields 44 chars and triggers RangeError: Invalid key length at runtime when saving CalDAV / Apple Calendar / 2FA credentials). Tested live.
  2. The update_script() clears apps/web/.next and .turbo before rebuilding so stale Next.js public-env bundles are not served when NEXT_PUBLIC_* URLs change.

Design note for reviewers:
The install script clones https://github.com/calcom/cal.diy.git (main) and yarn builds in-container, rather than fetching the upstream release tarballs (v6.x.x). The reasoning: Cal.diy is the open-source community-edition fork and main is the canonical install target for self-hosters. If maintainers prefer a release-tracking pattern (e.g. fetch_and_deploy_gh_release), happy to follow up in a second PR.


📦 Application Requirements (for new scripts)

Required for 🆕 New script submissions.
Pull requests that do not meet these requirements may be closed without review.

  • The application is at least 6 months old (created 2021-03-22; ~5 years)
  • The application is actively maintained (last push 2026-05-29)
  • The application has 600+ GitHub stars (44,814 ★)
  • Official release tarballs are published (latest: v6.2.0, 2026-03-01)
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG

🌐 Source

@masterde masterde requested a review from a team as a code owner May 30, 2026 03:40
Comment thread ct/headers/caldiy
@@ -0,0 +1,6 @@
____ _ _ _

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks off, I think this is a different font, you can just remove it, it will get auto-generated on merge

Comment thread ct/caldiy.sh
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/calcom/cal.diy

APP="Cal.diy"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this dot will cause problems, probably best to use "-"

Comment thread ct/caldiy.sh

msg_info "Updating ${APP} (Patience, this build is heavy)"
cd /opt/caldiy || return
$STD git fetch --all

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no git pull scripts, use our functions located in misc/tools.func, for example fetch_and_deploy_gh_release and check_for_gh_release look at our other scripts.

Comment thread install/caldiy-install.sh
openssl \
ca-certificates \
build-essential \
python3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already default

Comment thread install/caldiy-install.sh
PG_DB_NAME="caldiy" PG_DB_USER="caldiy" setup_postgresql_db

msg_info "Cloning ${APPLICATION} Repository"
$STD git clone -c core.symlinks=true https://github.com/calcom/cal.diy.git /opt/caldiy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no git clone

Comment thread install/caldiy-install.sh
PG_VERSION="16" setup_postgresql
PG_DB_NAME="caldiy" PG_DB_USER="caldiy" setup_postgresql_db

msg_info "Cloning ${APPLICATION} Repository"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolve this var directly

Comment thread install/caldiy-install.sh
msg_ok "Cloned Repository"

msg_info "Configuring Environment"
cd /opt/caldiy || exit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd /opt/caldiy || exit
cd /opt/caldiy

not needed, we have an error handler

Comment thread install/caldiy-install.sh
DB_URL="postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}"

# set_env <KEY> <VALUE>: replace the line in-place if the key exists, otherwise append it
set_env() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no extra funcs

Comment thread json/caldiy.json
},
"notes": [
{
"text": "The build is a heavy Turborepo monorepo build and needs at least 8GB RAM and ~20GB disk; reduce only after a successful first build. Generated DB and secret values are saved to /root/caldiy.creds.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no prebuild?

@github-actions github-actions Bot added the stale label Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants