From f986817afb83794078670504fa0a60ac8573ab23 Mon Sep 17 00:00:00 2001 From: Finn Dilan Date: Mon, 10 Aug 2026 15:00:52 +0200 Subject: [PATCH 1/2] feat: add Slidev community script Self-hosted Slidev (https://sli.dev) presentation server: markdown-based slide decks with a live dev server, plus an MCP server entrypoint (over SSH) so AI agents can edit slides.md directly. - ct/slidev.sh, install/slidev-install.sh, json/slidev.json - Dedicated slidev system user for the SSH-based MCP entrypoint, provisioned with the container's root authorized_keys plus a random fallback password - npx --yes and stdin closed on the scaffold/install steps so a non-interactive run can't hang on an unanswered prompt Tested end-to-end on Proxmox VE 9.2.9 / Debian 13: fresh install, update path, systemd service, and the MCP entrypoint driving a real Slidev deck over SSH. Co-Authored-By: Claude Sonnet 5 --- ct/slidev.sh | 52 +++++++++++++++++++++++++ install/slidev-install.sh | 82 +++++++++++++++++++++++++++++++++++++++ json/slidev.json | 44 +++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 ct/slidev.sh create mode 100644 install/slidev-install.sh create mode 100644 json/slidev.json diff --git a/ct/slidev.sh b/ct/slidev.sh new file mode 100644 index 0000000000..ef2e38bd61 --- /dev/null +++ b/ct/slidev.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# Engine comes from community-scripts/core; this repo only ships the scripts. +# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core), +# so a fork or branch of core can be tested without editing this file. +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/shared/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/shared/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Filan-glitch +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://sli.dev/ + +APP="Slidev" +var_tags="${var_tags:-presentation;markdown}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +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 [[ ! -d /home/slidev/my-slides ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating ${APP}" + su - slidev -c "cd my-slides && npm install" + systemctl restart slidev + msg_ok "Updated ${APP}" + 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}:3030${CL}" +echo -e "${INFO}${YW}MCP server entrypoint (run over SSH from your client):${CL}" +echo -e "${TAB}${GATEWAY}${BGN}ssh slidev@${IP} /home/slidev/mcp-start.sh${CL}" diff --git a/install/slidev-install.sh b/install/slidev-install.sh new file mode 100644 index 0000000000..06cab42170 --- /dev/null +++ b/install/slidev-install.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Filan-glitch +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://sli.dev/ + +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 \ + git \ + build-essential +msg_ok "Installed Dependencies" + +NODE_VERSION="22" setup_nodejs + +msg_info "Creating slidev user" +useradd -m -s /bin/bash slidev +if [[ -s /root/.ssh/authorized_keys ]]; then + mkdir -p /home/slidev/.ssh + cp /root/.ssh/authorized_keys /home/slidev/.ssh/authorized_keys + chmod 700 /home/slidev/.ssh + chmod 600 /home/slidev/.ssh/authorized_keys + chown -R slidev:slidev /home/slidev/.ssh +fi +SLIDEV_SSH_PASS="$(openssl rand -base64 18)" +echo "slidev:${SLIDEV_SSH_PASS}" | chpasswd +msg_ok "Created slidev user" + +msg_info "Scaffolding Slidev project" +su - slidev -c "CI=1 npx --yes create-slidev@latest my-slides --template=default --theme=default -y" /etc/systemd/system/slidev.service +[Unit] +Description=Slidev Presentation Server +After=network.target + +[Service] +Type=simple +User=slidev +WorkingDirectory=/home/slidev/my-slides +Environment=PATH=${NODE_BIN_DIR}:/usr/bin:/bin +ExecStart=${NODE_BIN_DIR}/npm run dev -- --remote --port 3030 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now slidev +msg_ok "Created service" + +msg_info "Installing Slidev MCP server helper" +su - slidev -c "cd my-slides && npm install -D @slidev/cli@latest" /home/slidev/mcp-start.sh +#!/usr/bin/env bash +cd /home/slidev/my-slides +exec npx slidev mcp --entry slides.md +EOF +chmod +x /home/slidev/mcp-start.sh +chown slidev:slidev /home/slidev/mcp-start.sh +msg_ok "Installed Slidev MCP server helper" + +motd_ssh +customize + +msg_ok "SSH login for slidev user: slidev / ${SLIDEV_SSH_PASS}" +cleanup_lxc diff --git a/json/slidev.json b/json/slidev.json new file mode 100644 index 0000000000..53ea945a7d --- /dev/null +++ b/json/slidev.json @@ -0,0 +1,44 @@ +{ + "name": "Slidev", + "slug": "slidev", + "categories": [12], + "date_created": "2026-08-10", + "type": "ct", + "updateable": true, + "privileged": false, + "architectures": ["amd64"], + "interface_port": 3030, + "documentation": "https://sli.dev/", + "website": "https://sli.dev/", + "repository": "https://github.com/slidevjs/slidev", + "logo": "https://sli.dev/favicon.png", + "description": "Slidev is a markdown-based slide deck maker and presenter, built for developers. Self-hosted instance runs a live dev server with hot reload, plus an MCP server entrypoint so AI agents (Claude Code/Desktop) can edit slides directly.", + "install_methods": [ + { + "type": "default", + "script": "ct/slidev.sh", + "config_path": "/home/slidev/my-slides/slides.md", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "slidev", + "password": null + }, + "notes": [ + { + "text": "Dev server binds 0.0.0.0:3030, no auth built in — restrict to LAN/firewall.", + "type": "warning" + }, + { + "text": "MCP server entrypoint at /home/slidev/mcp-start.sh, invoke over SSH from client-side Claude Code config.", + "type": "info" + } + ] +} From a3a6d497026da15a858fc9433c38beb0a15abcd0 Mon Sep 17 00:00:00 2001 From: Finn Dilan Date: Mon, 10 Aug 2026 15:44:24 +0200 Subject: [PATCH 2/2] fix: address Copilot review findings on PR #2167 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Only set a random SSH password when no root authorized_keys exist to copy — avoids enabling password auth for the common key-present case - Final message reflects which auth method was actually configured instead of unconditionally printing (possibly empty) SLIDEV_SSH_PASS - Hardcode /usr/bin/node and /usr/bin/npm in the systemd unit instead of deriving the bin dir from /usr/bin/node at install time — matches the convention every other Node-based script in this repo already uses, and doesn't depend on node/npm living in the same directory - Add the documented (commented, unset) var_arm64 line so support status is discoverable, per AGENTS.md - update_script now stops the service before npm install and starts it back up after, instead of running npm install against a live node_modules the running dev server may still be using Co-Authored-By: Claude Sonnet 5 --- ct/slidev.sh | 12 ++++++++++-- install/slidev-install.sh | 18 ++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ct/slidev.sh b/ct/slidev.sh index ef2e38bd61..0044a8e91e 100644 --- a/ct/slidev.sh +++ b/ct/slidev.sh @@ -17,6 +17,7 @@ var_disk="${var_disk:-8}" var_os="${var_os:-debian}" var_version="${var_version:-13}" var_unprivileged="${var_unprivileged:-1}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified header_info "$APP" variables @@ -33,10 +34,17 @@ function update_script() { exit fi + msg_info "Stopping ${APP}" + systemctl stop slidev + msg_ok "Stopped ${APP}" + msg_info "Updating ${APP}" - su - slidev -c "cd my-slides && npm install" - systemctl restart slidev + su - slidev -c "cd my-slides && npm install" /etc/systemd/system/slidev.service [Unit] Description=Slidev Presentation Server @@ -53,8 +56,7 @@ After=network.target Type=simple User=slidev WorkingDirectory=/home/slidev/my-slides -Environment=PATH=${NODE_BIN_DIR}:/usr/bin:/bin -ExecStart=${NODE_BIN_DIR}/npm run dev -- --remote --port 3030 +ExecStart=/usr/bin/npm run dev -- --remote --port 3030 Restart=on-failure RestartSec=5 @@ -78,5 +80,9 @@ msg_ok "Installed Slidev MCP server helper" motd_ssh customize -msg_ok "SSH login for slidev user: slidev / ${SLIDEV_SSH_PASS}" +if [[ -n "$SLIDEV_SSH_PASS" ]]; then + msg_ok "SSH login for slidev user: slidev / ${SLIDEV_SSH_PASS}" +else + msg_ok "SSH login for slidev user: key-based (root's authorized_keys)" +fi cleanup_lxc