From 946c0d87c3e414138bbbc6ac126f2fded9ee8a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Wed, 22 Jan 2025 17:10:54 -0300 Subject: [PATCH 1/3] Add files via upload --- ct/cloudpanel.sh | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ct/cloudpanel.sh diff --git a/ct/cloudpanel.sh b/ct/cloudpanel.sh new file mode 100644 index 00000000..bedf9c2c --- /dev/null +++ b/ct/cloudpanel.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: NĂ­colas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +# App Default Values +APP="CloudPanel" +var_tags="asset-management;hosting-control-panel" +var_cpu="2" +var_ram="2048" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if ! command -v clpctl >/dev/null 2>&1; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Ther is currently no automatic update function for ${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}https://${IP}:8443{CL}" From a9f6e500f5030287ab3cd1b4430385904f6f249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Wed, 22 Jan 2025 17:11:03 -0300 Subject: [PATCH 2/3] Add files via upload --- json/cloudpanel.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 json/cloudpanel.json diff --git a/json/cloudpanel.json b/json/cloudpanel.json new file mode 100644 index 00000000..326ecdb6 --- /dev/null +++ b/json/cloudpanel.json @@ -0,0 +1,35 @@ + +{ + "name": "CloudPanel", + "slug": "cloudpanel", + "categories": [ + 21 + ], + "date_created": "2025-01-22", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 8443, + "documentation": "https://www.cloudpanel.io/docs/v2/introduction/", + "website": "https://www.cloudpanel.io/", + "logo": "https://www.cloudpanel.io/assets/images/apple-touch-icon.png", + "description": "CloudPanel is a free web hosting control panel with advanced features for server management. It offers a fast technology stack built with lightweight components for maximum performance. The open source control panel provides a suite of tools to strengthen security at the server level.", + "install_methods": [ + { + "type": "default", + "script": "ct/cloudpanel.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 10, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 508ab8470e267fb9f75878a152be5cbbf1697c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=ADcolas=20Pastorello?= Date: Wed, 22 Jan 2025 17:11:13 -0300 Subject: [PATCH 3/3] Add files via upload --- install/cloudpanel-install.sh | 122 ++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 install/cloudpanel-install.sh diff --git a/install/cloudpanel-install.sh b/install/cloudpanel-install.sh new file mode 100644 index 00000000..0a4fe169 --- /dev/null +++ b/install/cloudpanel-install.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: NĂ­colas Pastorello (opastorello) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Starting the process to check and install required packages" +$STD apt-get install -y \ + curl \ + git \ + sudo \ + mc \ + gpg \ + wget \ + lsof \ + gnupg \ + apt-transport-https \ + debsums \ + chrony \ + redis-server \ + postfix +msg_ok "Required packages installed" + +msg_info "Starting the process to set up required packages and swap" +$STD apt -y upgrade +echo "CONF_SWAPFILE=/home/.swap" > /etc/dphys-swapfile +echo "CONF_SWAPSIZE=2048" >> /etc/dphys-swapfile +echo "CONF_MAXSWAP=2048" >> /etc/dphys-swapfile +$STD apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew install dphys-swapfile +msg_ok "Swap file and required packages set up" + +msg_info "Starting the process to generate locales" +$STD apt -y install locales locales-all +$STD /usr/sbin/locale-gen en_US.UTF-8 +msg_ok "Locales generated" + +msg_info "Starting the process to remove unnecessary packages" +$STD apt -y --purge remove mysql* &> /dev/null +msg_ok "Unnecessary packages removed" + +msg_info "Starting the process to add CloudPanel repositories" +curl -fsSL https://d17k9fuiwb52nc.cloudfront.net/key.gpg | sudo gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/cloudpanel-keyring.gpg + +cat < /etc/apt/sources.list.d/packages.cloudpanel.io.list +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm main +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm nginx +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-7.1 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-7.2 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-7.3 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-7.4 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-8.0 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-8.1 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-8.2 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-8.3 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm php-8.4 +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm proftpd +deb https://d17k9fuiwb52nc.cloudfront.net/ bookworm varnish-7 +EOF + +cat < /etc/apt/preferences.d/00packages.cloudpanel.io.pref +Package: * +Pin: origin d17k9fuiwb52nc.cloudfront.net +Pin-Priority: 1000 +EOF + +$STD apt -y update +msg_ok "CloudPanel repositories added" + +msg_info "Starting the process to install MariaDB" +wget -qO- https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/mariadb.gpg +echo "deb [arch=amd64,arm64] https://mirror.mariadb.org/repo/11.4/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list +$STD apt -y update +$STD apt -y install mariadb-server +ln -sf /usr/bin/mariadb /usr/bin/mysql +ln -sf /usr/bin/mariadb-access /usr/bin/mysqlaccess +ln -sf /usr/bin/mariadb-admin /usr/bin/mysqladmin +ln -sf /usr/bin/mariadb-check /usr/bin/mysqlanalyze +ln -sf /usr/bin/mariadb-binlog /usr/bin/mysqlbinlog +ln -sf /usr/bin/mariadb-check /usr/bin/mysqlcheck +ln -sf /usr/bin/mariadb-convert-table-format /usr/bin/mysql_convert_table_format +ln -sf /usr/bin/mariadbd-multi /usr/bin/mysqld_multi +ln -sf /usr/bin/mariadbd-safe /usr/bin/mysqld_safe +ln -sf /usr/bin/mariadbd-safe-helper /usr/bin/mysqld_safe_helper +ln -sf /usr/bin/mariadb-dump /usr/bin/mysqldump +ln -sf /usr/bin/mariadb-dumpslow /usr/bin/mysqldumpslow +ln -sf /usr/bin/mariadb-find-rows /usr/bin/mysql_find_rows +ln -sf /usr/bin/mariadb-fix-extensions /usr/bin/mysql_fix_extensions +ln -sf /usr/bin/mariadb-hotcopy /usr/bin/mysqlhotcopy +ln -sf /usr/bin/mariadb-import /usr/bin/mysqlimport +ln -sf /usr/bin/mariadb-install-db /usr/bin/mysql_install_db +ln -sf /usr/bin/mariadb-check /usr/bin/mysqloptimize +ln -sf /usr/bin/mariadb-plugin /usr/bin/mysql_plugin +ln -sf /usr/bin/mariadb-check /usr/bin/mysqlrepair +ln -sf /usr/bin/mariadb-report /usr/bin/mysqlreport +ln -sf /usr/bin/mariadb-secure-installation /usr/bin/mysql_secure_installation +ln -sf /usr/bin/mariadb-setpermission /usr/bin/mysql_setpermission +ln -sf /usr/bin/mariadb-show /usr/bin/mysqlshow +ln -sf /usr/bin/mariadb-slap /usr/bin/mysqlslap +ln -sf /usr/bin/mariadb-tzinfo-to-sql /usr/bin/mysql_tzinfo_to_sql +ln -sf /usr/bin/mariadb-upgrade /usr/bin/mysql_upgrade +ln -sf /usr/bin/mariadb-waitpid /usr/bin/mysql_waitpid +msg_ok "MariaDB installed and MySQL links created" + +msg_info "Starting the process to install CloudPanel" +$STD apt -o Dpkg::Options::="--force-overwrite" install -y cloudpanel +msg_ok "CloudPanel installed" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"