From 94d050315ff7aafd3399ae8f3f3b36e25f6d8656 Mon Sep 17 00:00:00 2001 From: pespinel Date: Tue, 17 Feb 2026 16:30:48 +0100 Subject: [PATCH 1/8] feat: add Strapi headless CMS --- ct/strapi.sh | 48 ++++++++++++++++++++++ frontend/public/json/strapi.json | 48 ++++++++++++++++++++++ install/strapi-install.sh | 70 ++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100755 ct/strapi.sh create mode 100644 frontend/public/json/strapi.json create mode 100755 install/strapi-install.sh diff --git a/ct/strapi.sh b/ct/strapi.sh new file mode 100755 index 000000000..6d6a789bb --- /dev/null +++ b/ct/strapi.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: pespinel +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://strapi.io/ + +APP="Strapi" +var_tags="${var_tags:-cms;headless-cms}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/systemd/system/strapi.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + NODE_VERSION="20" setup_nodejs + + msg_info "Updating ${APP} LXC" + cd /opt/strapi || exit + $STD npm run build + systemctl restart strapi + msg_ok "Updated successfully!" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1337${CL}" diff --git a/frontend/public/json/strapi.json b/frontend/public/json/strapi.json new file mode 100644 index 000000000..70ae2d4a1 --- /dev/null +++ b/frontend/public/json/strapi.json @@ -0,0 +1,48 @@ +{ + "name": "Strapi", + "slug": "strapi", + "categories": [ + 12 + ], + "date_created": "2026-02-17", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 1337, + "documentation": "https://docs.strapi.io/", + "website": "https://strapi.io/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/strapi.webp", + "config_path": "/opt/strapi/.env", + "description": "Strapi is a leading open-source headless CMS that enables developers to build powerful APIs quickly. It features a flexible content structure with customizable content types, supporting both REST and GraphQL APIs. The intuitive admin panel allows non-technical users to manage content easily, while developers can extend functionality through plugins. Built on Node.js, Strapi offers role-based access control, media library management, and internationalization support out of the box.", + "install_methods": [ + { + "type": "default", + "script": "ct/strapi.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 8, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "First-time setup requires creating an admin account at http://IP:1337/admin", + "type": "info" + }, + { + "text": "Default installation uses SQLite. For production use, consider configuring PostgreSQL or MySQL.", + "type": "info" + }, + { + "text": "Building the admin panel requires 4GB RAM. Container may take 10-15 minutes to fully initialize.", + "type": "warning" + } + ] +} diff --git a/install/strapi-install.sh b/install/strapi-install.sh new file mode 100755 index 000000000..15bb52e07 --- /dev/null +++ b/install/strapi-install.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: pespinel +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://strapi.io/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt install -y \ + ca-certificates \ + build-essential \ + python3 \ + python3-setuptools \ + libvips42 +msg_ok "Installed Dependencies" + +NODE_VERSION="20" setup_nodejs + +msg_info "Installing Strapi (Patience)" +mkdir -p /opt/strapi +cd /opt/strapi || exit +$STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud +msg_ok "Installed Strapi" + +msg_info "Building Strapi" +cd /opt/strapi || exit +export NODE_OPTIONS="--max-old-space-size=3072" +$STD npm run build +msg_ok "Built Strapi" + +msg_info "Creating Service" +cat </opt/strapi/.env +HOST=0.0.0.0 +PORT=1337 +APP_KEYS=$(openssl rand -base64 32) +API_TOKEN_SALT=$(openssl rand -base64 32) +ADMIN_JWT_SECRET=$(openssl rand -base64 32) +TRANSFER_TOKEN_SALT=$(openssl rand -base64 32) +JWT_SECRET=$(openssl rand -base64 32) +EOF + +cat </etc/systemd/system/strapi.service +[Unit] +Description=Strapi CMS +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/strapi +ExecStart=/usr/bin/npm run start +Restart=on-failure +Environment=NODE_ENV=production + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now strapi +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc From 6e5e10a81ea3d4144906f77dac7fdbda0cd4546e Mon Sep 17 00:00:00 2001 From: Pablo Espinel Date: Tue, 17 Feb 2026 16:51:34 +0100 Subject: [PATCH 2/8] Apply suggestions from code review Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- ct/strapi.sh | 2 +- install/strapi-install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 6d6a789bb..98e4e4b30 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -31,7 +31,7 @@ function update_script() { NODE_VERSION="20" setup_nodejs msg_info "Updating ${APP} LXC" - cd /opt/strapi || exit + cd /opt/strapi $STD npm run build systemctl restart strapi msg_ok "Updated successfully!" diff --git a/install/strapi-install.sh b/install/strapi-install.sh index 15bb52e07..b6b866328 100755 --- a/install/strapi-install.sh +++ b/install/strapi-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - ca-certificates \ build-essential \ python3 \ python3-setuptools \ @@ -26,12 +25,12 @@ NODE_VERSION="20" setup_nodejs msg_info "Installing Strapi (Patience)" mkdir -p /opt/strapi -cd /opt/strapi || exit +cd /opt/strapi $STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud msg_ok "Installed Strapi" msg_info "Building Strapi" -cd /opt/strapi || exit +cd /opt/strapi export NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build msg_ok "Built Strapi" @@ -55,6 +54,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/strapi +EnvironmentFile=/opt/strapi/.env ExecStart=/usr/bin/npm run start Restart=on-failure Environment=NODE_ENV=production From fd61f1e16fa77e870e9776a4ff4ce5183b20e277 Mon Sep 17 00:00:00 2001 From: pespinel Date: Tue, 17 Feb 2026 16:53:06 +0100 Subject: [PATCH 3/8] Use node 24 --- ct/strapi.sh | 2 +- install/strapi-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 98e4e4b30..78909f878 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -28,7 +28,7 @@ function update_script() { exit fi - NODE_VERSION="20" setup_nodejs + NODE_VERSION="24" setup_nodejs msg_info "Updating ${APP} LXC" cd /opt/strapi diff --git a/install/strapi-install.sh b/install/strapi-install.sh index b6b866328..242cc2aab 100755 --- a/install/strapi-install.sh +++ b/install/strapi-install.sh @@ -21,7 +21,7 @@ $STD apt install -y \ libvips42 msg_ok "Installed Dependencies" -NODE_VERSION="20" setup_nodejs +NODE_VERSION="24" setup_nodejs msg_info "Installing Strapi (Patience)" mkdir -p /opt/strapi From ca2a0d4279223fb56a987b2bf06f7f6b742c2cb9 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:37:38 +0100 Subject: [PATCH 4/8] Update strapi-install.sh --- install/strapi-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/strapi-install.sh b/install/strapi-install.sh index 242cc2aab..0132ab2f6 100755 --- a/install/strapi-install.sh +++ b/install/strapi-install.sh @@ -45,7 +45,6 @@ ADMIN_JWT_SECRET=$(openssl rand -base64 32) TRANSFER_TOKEN_SALT=$(openssl rand -base64 32) JWT_SECRET=$(openssl rand -base64 32) EOF - cat </etc/systemd/system/strapi.service [Unit] Description=Strapi CMS From 30b03aa9db81a669eaf5a6115f99eadd76d530e0 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Tue, 17 Feb 2026 20:38:20 +0100 Subject: [PATCH 5/8] Update strapi.sh --- ct/strapi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 78909f878..7ae5dbc1a 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -30,7 +30,7 @@ function update_script() { NODE_VERSION="24" setup_nodejs - msg_info "Updating ${APP} LXC" + msg_info "Updating strapi" cd /opt/strapi $STD npm run build systemctl restart strapi From 16267af541f178cdc612b1faf71423ab6ee42f99 Mon Sep 17 00:00:00 2001 From: pespinel Date: Tue, 17 Feb 2026 21:39:39 +0100 Subject: [PATCH 6/8] Fix update_script --- ct/strapi.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 7ae5dbc1a..798fcb795 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -30,11 +30,25 @@ function update_script() { NODE_VERSION="24" setup_nodejs - msg_info "Updating strapi" + msg_info "Stopping ${APP}" + systemctl stop strapi + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP}" cd /opt/strapi + $STD npm install + msg_ok "Updated ${APP}" + + msg_info "Building ${APP}" + export NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build - systemctl restart strapi - msg_ok "Updated successfully!" + msg_ok "Built ${APP}" + + msg_info "Starting ${APP}" + systemctl start strapi + msg_ok "Started ${APP}" + + msg_ok "Update completed successfully!" exit } From 8ee8bc6bd51e187fa3cdc6fa96f95edd952a17f1 Mon Sep 17 00:00:00 2001 From: pespinel Date: Wed, 18 Feb 2026 08:42:20 +0100 Subject: [PATCH 7/8] Review comment --- ct/strapi.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 798fcb795..aa10befeb 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -6,7 +6,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://strapi.io/ APP="Strapi" -var_tags="${var_tags:-cms;headless-cms}" +var_tags="${var_tags:-cms}" var_cpu="${var_cpu:-2}" var_ram="${var_ram:-4096}" var_disk="${var_disk:-8}" @@ -24,29 +24,29 @@ function update_script() { check_container_storage check_container_resources if [[ ! -f /etc/systemd/system/strapi.service ]]; then - msg_error "No ${APP} Installation Found!" + msg_error "No Strapi Installation Found!" exit fi NODE_VERSION="24" setup_nodejs - msg_info "Stopping ${APP}" + msg_info "Stopping Strapi" systemctl stop strapi - msg_ok "Stopped ${APP}" + msg_ok "Stopped Strapi" - msg_info "Updating ${APP}" + msg_info "Updating Strapi" cd /opt/strapi $STD npm install - msg_ok "Updated ${APP}" + msg_ok "Updated Strapi" - msg_info "Building ${APP}" + msg_info "Building Strapi" export NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build - msg_ok "Built ${APP}" + msg_ok "Built Strapi" - msg_info "Starting ${APP}" + msg_info "Starting Strapi" systemctl start strapi - msg_ok "Started ${APP}" + msg_ok "Started Strapi" msg_ok "Update completed successfully!" exit From e2c6de1b7b60da8819bd7867d7d40183b9faa7f9 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Wed, 18 Feb 2026 09:37:23 +0100 Subject: [PATCH 8/8] Update strapi.sh --- ct/strapi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index aa10befeb..f7aab5ba5 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -24,7 +24,7 @@ function update_script() { check_container_storage check_container_resources if [[ ! -f /etc/systemd/system/strapi.service ]]; then - msg_error "No Strapi Installation Found!" + msg_error "No ${APP} Installation Found!" exit fi