From 28a192440e8bbb7abce6c683c61cc3d1686de70c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Apr 2026 20:48:53 +0200 Subject: [PATCH] Add ClickHouse CT template and installer Introduce ClickHouse support by adding a container template (ct/clickhouse.sh), an installer script (install/clickhouse-install.sh) and app metadata (json/clickhouse.json). The installer configures ClickHouse to listen on 0.0.0.0, restarts the service, and performs OS update, networking checks, MOTD/customization and cleanup. Metadata declares default resources (2 CPU, 4GB RAM, 10GB disk), interface port 8123, documentation/website links, and a warning about the default user having no password. --- ct/clickhouse.sh | 43 +++++++++++++++++++++++++++++++++++ install/clickhouse-install.sh | 29 +++++++++++++++++++++++ json/clickhouse.json | 38 +++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 ct/clickhouse.sh create mode 100644 install/clickhouse-install.sh create mode 100644 json/clickhouse.json diff --git a/ct/clickhouse.sh b/ct/clickhouse.sh new file mode 100644 index 00000000..1adadf5b --- /dev/null +++ b/ct/clickhouse.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: community-scripts ORG +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://clickhouse.com + +APP="ClickHouse" +var_tags="${var_tags:-database;analytics}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +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 ! command -v clickhouse-server &>/dev/null; then + msg_error "No ${APP} Installation Found!" + exit + fi + + setup_clickhouse + 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}:8123${CL}" diff --git a/install/clickhouse-install.sh b/install/clickhouse-install.sh new file mode 100644 index 00000000..b63a8c77 --- /dev/null +++ b/install/clickhouse-install.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: community-scripts ORG +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://clickhouse.com + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +setup_clickhouse + +msg_info "Configuring ClickHouse" +cat </etc/clickhouse-server/config.d/listen.xml + + 0.0.0.0 + +EOF +systemctl restart clickhouse-server +msg_ok "Configured ClickHouse" + +motd_ssh +customize +cleanup_lxc diff --git a/json/clickhouse.json b/json/clickhouse.json new file mode 100644 index 00000000..13374201 --- /dev/null +++ b/json/clickhouse.json @@ -0,0 +1,38 @@ +{ + "name": "ClickHouse", + "slug": "clickhouse", + "categories": [8], + "date_created": "2026-04-14", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8123, + "documentation": "https://clickhouse.com/docs/", + "website": "https://clickhouse.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/clickhouse.webp", + "description": "ClickHouse is an open-source, high-performance columnar database management system designed for real-time analytics and data processing using SQL queries.", + "install_methods": [ + { + "type": "default", + "script": "ct/clickhouse.sh", + "config_path": "/etc/clickhouse-server/config.xml", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 10, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": "default", + "password": null + }, + "notes": [ + { + "text": "The default user 'default' has no password. Set a password for production use.", + "type": "warning" + } + ] +}