From 2184eab0c5b5b855775852f5d0653d8edfc48d77 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:19:53 +0200 Subject: [PATCH 01/41] Add new LXC: Wallos (#3956) --- ct/wallos.sh | 99 +++++++++++++++++++++++++++++++++++++++ install/wallos-install.sh | 81 ++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 ct/wallos.sh create mode 100644 install/wallos-install.sh diff --git a/ct/wallos.sh b/ct/wallos.sh new file mode 100644 index 000000000..0bd4dc275 --- /dev/null +++ b/ct/wallos.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ __ ____ +| | / /___ _/ / /___ _____ +| | /| / / __ `/ / / __ \/ ___/ +| |/ |/ / /_/ / / / /_/ (__ ) +|__/|__/\__,_/_/_/\____/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Wallos" +var_disk="5" +var_cpu="1" +var_ram="1024" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/wallos ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +RELEASE=$(curl -s https://api.github.com/repos/ellite/Wallos/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt + wget -q "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" + mv /opt/wallos/db/wallos.db /opt/wallos.db + unzip -q v${RELEASE}.zip + mv Wallos-${RELEASE} /opt/wallos + rm -rf /opt/wallos/db/wallos.empty.db + mv /opt/wallos.db /opt/wallos/db/wallos.db + chown -R www-data:www-data /opt/wallos + chmod -R 755 /opt/wallos + curl http://localhost/endpoints/db/migrate.php &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Reload Apache2" + systemctl reload apache2 + msg_ok "Apache2 Reloaded" + + msg_info "Cleaning Up" + rm -R /opt/v${RELEASE}.zip + msg_ok "Cleaned" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP} ${CL} \n" diff --git a/install/wallos-install.sh b/install/wallos-install.sh new file mode 100644 index 000000000..0407b05fb --- /dev/null +++ b/install/wallos-install.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/ellite/wallos + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + apache2 \ + libapache2-mod-php \ + php8.2-{mbstring,gd,curl,intl,imagick,bz2,sqlite3,zip,xml} +msg_ok "Installed Dependencies" + +msg_info "Installing Wallos (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/ellite/Wallos/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/ellite/Wallos/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv Wallos-${RELEASE} /opt/wallos +cd /opt/wallos +mv /opt/wallos/db/wallos.empty.db /opt/wallos/db/wallos.db +chown -R www-data:www-data /opt/wallos +chmod -R 755 /opt/wallos +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" + +cat </etc/apache2/sites-available/wallos.conf + + ServerAdmin webmaster@localhost + DocumentRoot /opt/wallos + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog \${APACHE_LOG_DIR}/wallos_error.log + CustomLog \${APACHE_LOG_DIR}/wallos_access.log combined + +EOF +$STD a2ensite wallos.conf +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +$STD curl http://localhost/endpoints/db/migrate.php +msg_ok "Installed Wallos" + +msg_info "Setting up Crontabs" +cat < /opt/wallos.cron +0 1 * * * php /opt/wallos/endpoints/cronjobs/updatenextpayment.php >> /var/log/cron/updatenextpayment.log 2>&1 +0 2 * * * php /opt/wallos/endpoints/cronjobs/updateexchange.php >> /var/log/cron/updateexchange.log 2>&1 +0 8 * * * php /opt/wallos/endpoints/cronjobs/sendcancellationnotifications.php >> /var/log/cron/sendcancellationnotifications.log 2>&1 +0 9 * * * php /opt/wallos/endpoints/cronjobs/sendnotifications.php >> /var/log/cron/sendnotifications.log 2>&1 +*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendverificationemails.php >> /var/log/cron/sendverificationemail.log 2>&1 +*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendresetpasswordemails.php >> /var/log/cron/sendresetpasswordemails.log 2>&1 +0 */6 * * * php /opt/wallos/endpoints/cronjobs/checkforupdates.php >> /var/log/cron/checkforupdates.log 2>&1 +EOF +crontab /opt/wallos.cron +msg_ok "Crontabs setup" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From 7176eaa99d916580f5cf0b2a87d3b968a6177ec8 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Oct 2024 14:16:41 -0400 Subject: [PATCH 02/41] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9472a5efe..601c1e105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-23 + +### Changed + +- **Wallos LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/wallos-install.sh) + - NEW Script + ## 2024-10-19 ### Changed From f5978717d4d6767ab181578289de755647ab9d62 Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 23 Oct 2024 21:23:15 -0400 Subject: [PATCH 03/41] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 601c1e105..516b195fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ All LXC instances created using this repository come pre-installed with Midnight - **Wallos LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/wallos-install.sh) - NEW Script +- **Open WebUI LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/openwebui-install.sh) + - NEW Script ## 2024-10-19 From 1d835626615c3450b7ce19b6faae33370c226157 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Oct 2024 02:34:54 -0400 Subject: [PATCH 04/41] Update actualbudget-install.sh fix install --- install/actualbudget-install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install/actualbudget-install.sh b/install/actualbudget-install.sh index fbd07867c..94ff1fb13 100644 --- a/install/actualbudget-install.sh +++ b/install/actualbudget-install.sh @@ -35,6 +35,13 @@ msg_ok "Installed Node.js" msg_info "Installing Actual Budget" $STD git clone https://github.com/actualbudget/actual-server.git /opt/actualbudget +mkdir -p /opt/actualbudget/server-files +chown -R root:root /opt/actualbudget/server-files +chmod 755 /opt/actualbudget/server-files +cat < /opt/actualbudget/.env +ACTUAL_UPLOAD_DIR=/opt/actualbudget/server-files +PORT=5006 +EOF cd /opt/actualbudget $STD yarn install msg_ok "Installed Actual Budget" @@ -46,9 +53,14 @@ Description=Actual Budget Service After=network.target [Service] -Type=exec +Type=simple +User=root +Group=root WorkingDirectory=/opt/actualbudget +EnvironmentFile=/opt/actualbudget/.env ExecStart=/usr/bin/yarn start +Restart=always +RestartSec=10 [Install] WantedBy=multi-user.target From 5c711293b94f7d2dd526d675c286fddaf8ee2afe Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Oct 2024 06:13:39 -0400 Subject: [PATCH 05/41] Update paperless-ngx-install.sh fixes https://github.com/tteck/Proxmox/issues/3964 --- install/paperless-ngx-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index a3a7d97f3..759f9d1e8 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -40,7 +40,8 @@ $STD apt-get install -y --no-install-recommends \ mc msg_ok "Installed Dependencies" -msg_info "Installing Python3 Dependencies" +msg_info "Installing Python3 Dependencies (Patience)" +$STD python3 -m nltk.downloader all $STD apt-get install -y --no-install-recommends \ python3 \ python3-pip \ From 64eab60a4cfad9b1acf868691451a5ab0aff8fe6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 24 Oct 2024 21:32:06 -0400 Subject: [PATCH 06/41] Update openwebui-install.sh tweak --- install/openwebui-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index a5edd8640..93bbec5e6 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -51,6 +51,7 @@ ENV=prod ENABLE_OLLAMA_API=false EOF $STD npm install +export NODE_OPTIONS="--max-old-space-size=4096" $STD npm run build msg_ok "Installed Open WebUI" From edf075312082ca4a6a84a58210750542f81532e1 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:14:53 -0400 Subject: [PATCH 07/41] Update zoraxy.sh - breaking change - switch to binary install --- ct/zoraxy.sh | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index a9694ac7c..dab18c49f 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -20,7 +20,7 @@ header_info echo -e "Loading..." APP="Zoraxy" var_disk="6" -var_cpu="4" +var_cpu="2" var_ram="2048" var_os="debian" var_version="12" @@ -54,30 +54,28 @@ function default_settings() { function update_script() { header_info -if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 -msg_info "Updating $APP" -systemctl stop zoraxy -cd /opt/zoraxy/src -systemctl stop zoraxy -if git pull | grep -q 'Already up to date.'; then - msg_ok "Already up to date. No update required." -else - go mod tidy - go build +if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + msg_info "Updating $APP to ${RELEASE}" + systemctl stop zoraxy + RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') + wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64" + rm /opt/zoraxy/zoraxy + mv zoraxy_linux_amd64 /opt/zoraxy/zoraxy + chmod +x /opt/zoraxy/zoraxy + systemctl start zoraxy + echo "${RELEASE}" >/opt/${APP}_version.txt msg_ok "Updated $APP" -fi -systemctl start zoraxy -exit +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + exit } start build_container description -msg_info "Setting Container to Normal Resources" -pct set $CTID -cores 2 -msg_ok "Set Container to Normal Resources" msg_ok "Completed Successfully!\n" echo -e "${APP} should be reachable by going to the following URL. ${BL}http://${IP}:8000${CL} \n" From 468a5d367ded4cf453a1507452e112ac3e234e2a Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:16:08 -0400 Subject: [PATCH 08/41] Update zoraxy-install.sh - breaking change - switch to binary install --- install/zoraxy-install.sh | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/install/zoraxy-install.sh b/install/zoraxy-install.sh index 73787ed16..b0f7d6c8e 100644 --- a/install/zoraxy-install.sh +++ b/install/zoraxy-install.sh @@ -17,23 +17,16 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y git msg_ok "Installed Dependencies" -msg_info "Installing Golang" -set +o pipefail -RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) -wget -q https://golang.org/dl/$RELEASE -$STD tar -xzf $RELEASE -C /usr/local -$STD ln -s /usr/local/go/bin/go /usr/local/bin/go -set -o pipefail -msg_ok "Installed Golang" - msg_info "Installing Zoraxy (Patience)" -$STD git clone https://github.com/tobychui/zoraxy /opt/zoraxy -cd /opt/zoraxy/src -$STD go mod tidy -$STD go build +RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64" +mkdir -p /opt/zoraxy +mv zoraxy_linux_amd64 /opt/zoraxy/zoraxy +chmod +x /opt/zoraxy/zoraxy +ln -s /opt/zoraxy/zoraxy /usr/local/bin/zoraxy +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Zoraxy" msg_info "Creating Service" @@ -43,8 +36,8 @@ Description=General purpose request proxy and forwarding tool After=syslog.target network-online.target [Service] -ExecStart=/opt/zoraxy/src/./zoraxy -WorkingDirectory=/opt/zoraxy/src/ +ExecStart=/opt/zoraxy/./zoraxy +WorkingDirectory=/opt/zoraxy/ Restart=always [Install] @@ -57,7 +50,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf $RELEASE $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From 744e183eea2e47bdcd0a725042142b407abec299 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:20:49 -0400 Subject: [PATCH 09/41] Update zoraxy.sh tweak --- ct/zoraxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index dab18c49f..7ab7a132a 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -56,9 +56,9 @@ function update_script() { header_info if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating $APP to ${RELEASE}" systemctl stop zoraxy - RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64" rm /opt/zoraxy/zoraxy mv zoraxy_linux_amd64 /opt/zoraxy/zoraxy From c2c48b52c7008ce5d6011ad37330ab987cfdea7d Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:22:56 -0400 Subject: [PATCH 10/41] Update zoraxy.sh tweak --- ct/zoraxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 7ab7a132a..887aaf65d 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] ; then RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating $APP to ${RELEASE}" systemctl stop zoraxy From 540fcd24f253e5b1349e222e9cfbc600f04adf35 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:25:19 -0400 Subject: [PATCH 11/41] Update zoraxy.sh tweak --- ct/zoraxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 887aaf65d..8ae57d1a3 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,7 +55,7 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] ; then +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating $APP to ${RELEASE}" systemctl stop zoraxy From 2a844122d00f32331190827b21bb91bb96709ce6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:31:13 -0400 Subject: [PATCH 12/41] Update zoraxy.sh tweak --- ct/zoraxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/zoraxy.sh b/ct/zoraxy.sh index 8ae57d1a3..ed88e1e87 100644 --- a/ct/zoraxy.sh +++ b/ct/zoraxy.sh @@ -55,8 +55,8 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/zoraxy/ ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - RELEASE=$(curl -s https://api.github.com/repos/tobychui/zoraxy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') msg_info "Updating $APP to ${RELEASE}" systemctl stop zoraxy wget -q "https://github.com/tobychui/zoraxy/releases/download/${RELEASE}/zoraxy_linux_amd64" From bb2c143cc8b5782088f4a336081190aa2f044835 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 05:38:49 -0400 Subject: [PATCH 13/41] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 516b195fe..9549e1145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-25 + +### Changed + +- **Zoraxy LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/468a5d367ded4cf453a1507452e112ac3e234e2a) + - Switch built from source to a pre-compiled binary version. + - Breaking Change + ## 2024-10-23 ### Changed From 9a5d43e4d35f7de6895a88990c34894fc3100f7c Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 07:32:56 -0400 Subject: [PATCH 14/41] Update paperless-ngx-install.sh fixes https://github.com/tteck/Proxmox/issues/3974 --- install/paperless-ngx-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 759f9d1e8..59389a6a8 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -41,13 +41,14 @@ $STD apt-get install -y --no-install-recommends \ msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies (Patience)" -$STD python3 -m nltk.downloader all $STD apt-get install -y --no-install-recommends \ python3 \ python3-pip \ python3-dev \ python3-setuptools \ - python3-wheel + python3-wheel \ + nltk + $STD python3 -m nltk.downloader all msg_ok "Installed Python3 Dependencies" msg_info "Installing OCR Dependencies (Patience)" From 55c8d1187bb1c8655b7a939a48cf2e982a431cdd Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 25 Oct 2024 07:35:07 -0400 Subject: [PATCH 15/41] Update paperless-ngx-install.sh tweak --- install/paperless-ngx-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 59389a6a8..7170611f9 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -46,9 +46,7 @@ $STD apt-get install -y --no-install-recommends \ python3-pip \ python3-dev \ python3-setuptools \ - python3-wheel \ - nltk - $STD python3 -m nltk.downloader all + python3-wheel msg_ok "Installed Python3 Dependencies" msg_info "Installing OCR Dependencies (Patience)" From 5ae25108efaf609f1ed30de38153034c357caaf6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 25 Oct 2024 18:00:35 +0200 Subject: [PATCH 16/41] Add new LXC: AdventureLog (#3971) --- ct/adventurelog.sh | 110 ++++++++++++++++++++ install/adventurelog-install.sh | 175 ++++++++++++++++++++++++++++++++ 2 files changed, 285 insertions(+) create mode 100644 ct/adventurelog.sh create mode 100644 install/adventurelog-install.sh diff --git a/ct/adventurelog.sh b/ct/adventurelog.sh new file mode 100644 index 000000000..3d7137e57 --- /dev/null +++ b/ct/adventurelog.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ___ __ __ __ + / | ____/ / _____ ____ / /___ __________ / / ____ ____ _ + / /| |/ __ / | / / _ \/ __ \/ __/ / / / ___/ _ \/ / / __ \/ __ `/ + / ___ / /_/ /| |/ / __/ / / / /_/ /_/ / / / __/ /___/ /_/ / /_/ / +/_/ |_\__,_/ |___/\___/_/ /_/\__/\__,_/_/ \___/_____/\____/\__, / + /____/ +EOF +} +header_info +echo -e "Loading..." +APP="AdventureLog" +var_disk="7" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} +function update_script() { +header_info +if [[ ! -d /opt/adventurelog ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then + read -r -p "Warning: Storage is dangerously low, continue anyway? " prompt + [[ ${prompt,,} =~ ^(y|yes)$ ]] || exit +fi +RELEASE=$(curl -s https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Services" + systemctl stop adventurelog-backend + systemctl stop adventurelog-frontend + msg_ok "Services Stopped" + + msg_info "Updating ${APP} to ${RELEASE}" + cp /opt/adventurelog/backend/server/.env /opt/server.env + cp /opt/adventurelog/frontend/env /opt/frontend.env + wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip" + unzip -q v${RELEASE}.zip + mv AdventureLog-${RELEASE} /opt/adventurelog + mv /opt/server.env /opt/adventurelog/backend/server/.env + cd /opt/adventurelog/backend/server + pip install --upgrade pip &>/dev/null + pip install -r requirements.txt &>/dev/null + python3 manage.py collectstatic --noinput &>/dev/null + python3 manage.py migrate &>/dev/null + + mv /opt/frontend.env /opt/adventurelog/frontend/.env + cd /opt/adventurelog/frontend + pnpm install &>/dev/null + pnpm run build &>/dev/null + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP}" + + msg_info "Starting Services" + systemctl start adventurelog-backend + systemctl start adventurelog-frontend + msg_ok "Started Services" + + msg_info "Cleaning Up" + rm -rf v${RELEASE}.zip + msg_ok "Cleaned" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} Setup should be reachable by going to the following URL. + ${BL}http://${IP}:3000${CL} \n" \ No newline at end of file diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh new file mode 100644 index 000000000..f4913880b --- /dev/null +++ b/install/adventurelog-install.sh @@ -0,0 +1,175 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/seanmorley15/AdventureLog + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + gpg \ + curl \ + sudo \ + mc \ + gdal-bin \ + libgdal-dev \ + git \ + python3-venv \ + python3-pip +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Setting up PostgreSQL Repository" +curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg +echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list +msg_ok "Set up PostgreSQL Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g pnpm +msg_ok "Installed Node.js" + +msg_info "Install/Set up PostgreSQL Database" +$STD apt-get install -y postgresql-16 postgresql-16-postgis +DB_NAME="adventurelog_db" +DB_USER="adventurelog_user" +DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)" +$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$STD sudo -u postgres psql -c "CREATE EXTENSION IF NOT EXISTS postgis;" $DB_NAME +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" +$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';" +{ + echo "AdventureLog-Credentials" + echo "AdventureLog Database User: $DB_USER" + echo "AdventureLog Database Password: $DB_PASS" + echo "AdventureLog Database Name: $DB_NAME" + echo "AdventureLog Secret: $SECRET_KEY" +} >> ~/adventurelog.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing AdventureLog (Patience)" +DJANGO_ADMIN_USER="djangoadmin" +DJANGO_ADMIN_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" +LOCAL_IP="$(hostname -I | awk '{print $1}')" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/seanmorley15/AdventureLog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/seanmorley15/AdventureLog/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv AdventureLog-${RELEASE} /opt/adventurelog +cat < /opt/adventurelog/backend/server/.env +PGHOST='localhost' +PGDATABASE='${DB_NAME}' +PGUSER='${DB_USER}' +PGPASSWORD='${DB_PASS}' +SECRET_KEY='${SECRET_KEY}' +PUBLIC_URL='http://$LOCAL_IP:8000' +DEBUG=True +FRONTEND_URL='http://$LOCAL_IP:3000' +CSRF_TRUSTED_ORIGINS='http://127.0.0.1:3000,http://localhost:3000,http://$LOCAL_IP:3000' +DJANGO_ADMIN_USERNAME='${DJANGO_ADMIN_USER}' +DJANGO_ADMIN_PASSWORD='${DJANGO_ADMIN_PASS}' +DISABLE_REGISTRATION=False +# EMAIL_BACKEND='email' +# EMAIL_HOST='smtp.gmail.com' +# EMAIL_USE_TLS=False +# EMAIL_PORT=587 +# EMAIL_USE_SSL=True +# EMAIL_HOST_USER='user' +# EMAIL_HOST_PASSWORD='password' +# DEFAULT_FROM_EMAIL='user@example.com' +EOF +cd /opt/adventurelog/backend/server +mkdir -p /opt/adventurelog/backend/server/media +$STD pip install --upgrade pip +$STD pip install -r requirements.txt +$STD python3 manage.py collectstatic --noinput +$STD python3 manage.py migrate +$STD python3 manage.py download-countries +cat < /opt/adventurelog/frontend/.env +PUBLIC_SERVER_URL=http://$LOCAL_IP:8000 +BODY_SIZE_LIMIT=Infinity +ORIGIN='http://$LOCAL_IP:3000' +EOF +cd /opt/adventurelog/frontend +$STD pnpm i +$STD pnpm build +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed AdventureLog" + +msg_info "Setting up Django Admin" +$STD python3 /opt/adventurelog/backend/server/manage.py shell << EOF +from django.contrib.auth import get_user_model +UserModel = get_user_model() +user = UserModel.objects.create_user('$DJANGO_ADMIN_USER', password='$DJANGO_ADMIN_PASS') +user.is_superuser = True +user.is_staff = True +user.save() +EOF +{ + echo "" + echo "Django-Credentials" + echo "Django Admin User: $DJANGO_ADMIN_USER" + echo "Django Admin Password: $DJANGO_ADMIN_PASS" +} >> ~/adventurelog.creds +msg_ok "Setup Django Admin" + +msg_info "Creating Service" +cat </etc/systemd/system/adventurelog-backend.service +[Unit] +Description=AdventureLog Backend Service +After=network.target postgresql.service + +[Service] +WorkingDirectory=/opt/adventurelog/backend/server +ExecStart=python3 manage.py runserver 0.0.0.0:8000 +Restart=always +EnvironmentFile=/opt/adventurelog/backend/server/.env + +[Install] +WantedBy=multi-user.target +EOF +cat </etc/systemd/system/adventurelog-frontend.service +[Unit] +Description=AdventureLog SvelteKit Frontend Service +After=network.target + +[Service] +WorkingDirectory=/opt/adventurelog/frontend +ExecStart=/usr/bin/node build 127.0.0.1:3000 +Restart=always +EnvironmentFile=/opt/adventurelog/frontend/.env + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now adventurelog-backend.service +systemctl enable -q --now adventurelog-frontend.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/v${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file From af0376f25b0972e5e76ab47d088b2c2321d03fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sat, 26 Oct 2024 21:20:48 +0200 Subject: [PATCH 17/41] Add new LXC: Ollama (#3979) --- ct/ollama.sh | 72 +++++++++++++++++++++++++++++ install/ollama-install.sh | 96 +++++++++++++++++++++++++++++++++++++++ misc/build.func | 4 +- 3 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 ct/ollama.sh create mode 100644 install/ollama-install.sh diff --git a/ct/ollama.sh b/ct/ollama.sh new file mode 100644 index 000000000..1b275ab64 --- /dev/null +++ b/ct/ollama.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + ____ ____ + / __ \/ / /___ _____ ___ ____ _ + / / / / / / __ `/ __ `__ \/ __ `/ +/ /_/ / / / /_/ / / / / / / /_/ / +\____/_/_/\__,_/_/ /_/ /_/\__,_/ + +EOF +} +header_info +echo -e "Loading..." +APP="Ollama" +var_disk="24" +var_cpu="4" +var_ram="4096" +var_os="ubuntu" +var_version="22.04" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/ollama ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating ${APP}" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated Successfully" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:11434${CL} \n" diff --git a/install/ollama-install.sh b/install/ollama-install.sh new file mode 100644 index 000000000..ea8a849a2 --- /dev/null +++ b/install/ollama-install.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y git +$STD apt-get install -y build-essential +$STD apt-get install -y pkg-config +$STD apt-get install -y cmake +msg_ok "Installed Dependencies" + +msg_info "Installing Golang" +$STD wget https://golang.org/dl/go1.23.2.linux-amd64.tar.gz +$STD tar -xzf go1.23.2.linux-amd64.tar.gz -C /usr/local +$STD ln -s /usr/local/go/bin/go /usr/local/bin/go +rm -rf go1.23.2.linux-amd64.tar.gz +msg_ok "Installed Golang" + +msg_info "Setting up Intel® Repositories" +mkdir -p /etc/apt/keyrings +curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor -o /etc/apt/keyrings/intel-graphics.gpg +echo "deb [arch=amd64,i386 signed-by=/etc/apt/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" >/etc/apt/sources.list.d/intel-gpu-jammy.list +curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor -o /etc/apt/keyrings/oneapi-archive-keyring.gpg +echo "deb [signed-by=/etc/apt/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" >/etc/apt/sources.list.d/oneAPI.list +$STD apt-get update +msg_ok "Set up Intel® Repositories" + +msg_info "Setting Up Hardware Acceleration" +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools,intel-level-zero-gpu,level-zero,level-zero-dev} +if [[ "$CTTYPE" == "0" ]]; then + chgrp video /dev/dri + chmod 755 /dev/dri + chmod 660 /dev/dri/* + $STD adduser $(id -u -n) video + $STD adduser $(id -u -n) render +fi +msg_ok "Set Up Hardware Acceleration" + +msg_info "Installing Intel® oneAPI Base Toolkit (Patience)" +$STD apt-get install -y --no-install-recommends intel-basekit-2024.1 +msg_ok "Installed Intel® oneAPI Base Toolkit" + +msg_info "Installing Ollama (Patience)" +$STD git clone https://github.com/ollama/ollama.git /opt/ollama +cd /opt/ollama +$STD go generate ./... +$STD go build . +msg_ok "Installed Ollama" + +msg_info "Creating Service" +cat </etc/systemd/system/ollama.service +[Unit] +Description=Ollama Service +After=network-online.target + +[Service] +Type=exec +ExecStart=/opt/ollama/ollama serve +Environment=HOME=$HOME +Environment=OLLAMA_INTEL_GPU=true +Environment=OLLAMA_HOST=0.0.0.0 +Environment=OLLAMA_NUM_GPU=999 +Environment=SYCL_CACHE_PERSISTENT=1 +Environment=ZES_ENABLE_SYSMAN=1 +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now ollama.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/misc/build.func b/misc/build.func index 8d46624c5..bcb949ceb 100644 --- a/misc/build.func +++ b/misc/build.func @@ -588,7 +588,7 @@ EOF fi if [ "$CT_TYPE" == "0" ]; then - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then cat <>$LXC_CONFIG # VAAPI hardware transcoding lxc.cgroup2.devices.allow: c 226:0 rwm @@ -600,7 +600,7 @@ lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,creat EOF fi else - if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "ErsatzTV" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" || "$APP" == "Ollama" ]]; then if [[ -e "/dev/dri/renderD128" ]]; then if [[ -e "/dev/dri/card0" ]]; then cat <>$LXC_CONFIG From 846d75dca1231b26340a503d85b784550404037c Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 26 Oct 2024 15:20:57 -0400 Subject: [PATCH 18/41] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9549e1145..5c1d82e3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-26 + +### Changed + +- **AdventureLog LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/adventurelog-install.sh) + - NEW Script + ## 2024-10-25 ### Changed From e4912cec78a4fca588075a959fa0d0616a304d24 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Oct 2024 01:16:41 -0400 Subject: [PATCH 19/41] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 6c1c5d637..710e20eab 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -36,7 +36,8 @@ $STD apt-get install -y \ python3-dev \ python3-pip \ python3-venv \ - python3-cffi + python3-cffi \ + python3-certbot-dns-cloudflare $STD pip3 install certbot certbot-dns-multi $STD python3 -m venv /opt/certbot/ ln -s /usr/local/bin/certbot /usr/bin/certbot From 399786c5bdfa75bd618c469cbaa324b77affefab Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Oct 2024 04:57:06 -0400 Subject: [PATCH 20/41] Update nginxproxymanager-install.sh fixes https://github.com/tteck/Proxmox/issues/3982 --- install/nginxproxymanager-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 710e20eab..1ec234aa8 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -40,7 +40,6 @@ $STD apt-get install -y \ python3-certbot-dns-cloudflare $STD pip3 install certbot certbot-dns-multi $STD python3 -m venv /opt/certbot/ -ln -s /usr/local/bin/certbot /usr/bin/certbot rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python Dependencies" From 77b06ee3f9b1e22f7aae98400a34c8485e748759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 27 Oct 2024 18:29:28 +0100 Subject: [PATCH 21/41] Add update path to Gotify LXC (#3989) --- ct/gotify.sh | 24 +++++++++++++++++++++++- install/gotify-install.sh | 5 ++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ct/gotify.sh b/ct/gotify.sh index 15f911df0..71b982782 100644 --- a/ct/gotify.sh +++ b/ct/gotify.sh @@ -55,7 +55,29 @@ function default_settings() { function update_script() { header_info if [[ ! -d /opt/gotify ]]; then msg_error "No ${APP} Installation Found!"; exit; fi -msg_error "There is currently no update path available." + +RELEASE=$(curl -s https://api.github.com/repos/gotify/server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping ${APP}" + systemctl stop gotify + msg_ok "Stopped ${APP}" + + msg_info "Updating ${APP} to ${RELEASE}" + cd /opt/gotify + wget -q https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-linux-amd64.zip + unzip -oq gotify-linux-amd64.zip + rm -rf gotify-linux-amd64.zip + chmod +x gotify-linux-amd64 + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated ${APP} to ${RELEASE}" + + msg_info "Starting ${APP}" + systemctl start gotify + msg_ok "Started ${APP}" + msg_ok "Updated Successfully" +else + msg_ok "No update required. ${APP} is already at ${RELEASE}" +fi exit } diff --git a/install/gotify-install.sh b/install/gotify-install.sh index 674013f8e..d18f46e11 100644 --- a/install/gotify-install.sh +++ b/install/gotify-install.sh @@ -27,7 +27,10 @@ wget -q https://github.com/gotify/server/releases/download/v${RELEASE}/gotify-li $STD unzip gotify-linux-amd64.zip rm -rf gotify-linux-amd64.zip chmod +x gotify-linux-amd64 +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Gotify" +msg_info "Creating Service" cat </etc/systemd/system/gotify.service [Unit] Description=Gotify @@ -46,7 +49,7 @@ RestartSec=3 WantedBy=multi-user.target EOF systemctl enable -q --now gotify -msg_ok "Installed Gotify" +msg_ok "Created Service" motd_ssh customize From 8a21f6e7f025a911865395d4c0fa9a001bd0d512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:14:57 +0100 Subject: [PATCH 22/41] Add option to install Ollama in Open WebUI LXC (#3991) --- install/openwebui-install.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 93bbec5e6..94e14c3b5 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -49,12 +49,40 @@ cp .env.example .env cat </opt/open-webui/.env ENV=prod ENABLE_OLLAMA_API=false +OLLAMA_BASE_URL=http://0.0.0.0:11434 EOF $STD npm install export NODE_OPTIONS="--max-old-space-size=4096" $STD npm run build msg_ok "Installed Open WebUI" +read -r -p "Would you like to add Ollama? " prompt +if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + msg_info "Installing Ollama" + curl -fsSLO https://ollama.com/download/ollama-linux-amd64.tgz + tar -C /usr -xzf ollama-linux-amd64.tgz + rm -rf ollama-linux-amd64.tgz + cat </etc/systemd/system/ollama.service +[Unit] +Description=Ollama Service +After=network-online.target + +[Service] +Type=exec +ExecStart=/usr/bin/ollama serve +Environment=HOME=$HOME +Environment=OLLAMA_HOST=0.0.0.0 +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target +EOF + systemctl enable -q --now ollama.service + sed -i 's/ENABLE_OLLAMA_API=false/ENABLE_OLLAMA_API=true/g' /opt/open-webui/.env + msg_ok "Installed Ollama" +fi + msg_info "Creating Service" cat </etc/systemd/system/open-webui.service [Unit] From 0340aec1428cd08ab905de087baba856ba112a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:24:22 +0100 Subject: [PATCH 23/41] Adjust max-old-space-size in openwebui-install.sh (#3992) --- install/openwebui-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 94e14c3b5..31930cb59 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -52,7 +52,7 @@ ENABLE_OLLAMA_API=false OLLAMA_BASE_URL=http://0.0.0.0:11434 EOF $STD npm install -export NODE_OPTIONS="--max-old-space-size=4096" +export NODE_OPTIONS="--max-old-space-size=3584" $STD npm run build msg_ok "Installed Open WebUI" From 28896707bcb61e784125860bb366588573fa7112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:36:01 +0100 Subject: [PATCH 24/41] Add max-old-space-size in openwebui.sh (#3993) --- ct/openwebui.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/openwebui.sh b/ct/openwebui.sh index 051c42f68..daee783a0 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -67,6 +67,7 @@ then fi systemctl stop open-webui.service npm install &>/dev/null +export NODE_OPTIONS="--max-old-space-size=3584" npm run build &>/dev/null cd ./backend pip install -r requirements.txt -U &>/dev/null From 32cd74e49f68868308e8549eeee3f14e4ea3749a Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 27 Oct 2024 19:05:32 -0400 Subject: [PATCH 25/41] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1d82e3f..ba9489a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. +## 2024-10-27 + +### Changed + +- **Open WebUI LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/8a21f6e7f025a911865395d4c0fa9a001bd0d512) + - Refactor Script to add an option to add Ollama. + ## 2024-10-26 ### Changed From 06742f7ef5773b82a4b3cd127a4fdae16d058251 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 28 Oct 2024 05:49:42 -0400 Subject: [PATCH 26/41] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba9489a45..e47c7dd07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ All LXC instances created using this repository come pre-installed with Midnight ### Changed - **Open WebUI LXC** [(Commit)](https://github.com/tteck/Proxmox/commit/8a21f6e7f025a911865395d4c0fa9a001bd0d512) - - Refactor Script to add an option to add Ollama. + - Refactor Script to add an option to install Ollama. ## 2024-10-26 From 6881f0743793d50adad120337055111d65a0b6f5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:17:11 +0100 Subject: [PATCH 27/41] Tweak / Remove Git and get complete project file (#3996) --- ct/tianji.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index 6ff10f9cf..ce41532c0 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -61,12 +61,29 @@ if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then fi RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Setting Container to Higher Resources" + pct set $CTID -memory 4096 + pct set $CTID -cores 4 + msg_ok "Set Container to Higher Resources" msg_info "Stopping ${APP} Service" systemctl stop tianji msg_ok "Stopped ${APP} Service" msg_info "Updating ${APP} to ${RELEASE}" - cd /opt/tianji - git checkout -f -q v${RELEASE} + cd /opt + cp /opt/tianji/src/server/.env /opt/.env + mv /opt/tianji /opt/tianji_bak + wget -q "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip" + unzip -q v${RELEASE}.zip + rm -R + mv tianji-${RELEASE} /opt/tianji + cd tianji + pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile >/dev/null 2>&1 + pnpm build:static >/dev/null 2>&1 + pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false >/dev/null 2>&1 + mkdir -p ./src/server/public >/dev/null 2>&1 + cp -r ./geo ./src/server/public >/dev/null 2>&1 + pnpm build:server >/dev/null 2>&1 + mv /opt/.env /opt/tianji/src/server/.env cd src/server pnpm db:migrate:apply >/dev/null 2>&1 echo "${RELEASE}" >/opt/${APP}_version.txt @@ -74,6 +91,13 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v msg_info "Starting ${APP}" systemctl start tianji msg_ok "Started ${APP}" + msg_info "Cleaning up" + rm -R /opt/v${RELEASE}.zip + rm -rf /opt/tianji_bak + rm -rf /opt/tianji/src/client + rm -rf /opt/tianji/website + rm -rf /opt/tianji/reporter + msg_ok "Cleaned" msg_ok "Updated Successfully" else msg_ok "No update required. ${APP} is already at ${RELEASE}." From 902aee0c0bb1cb00e4cac813222f49fcbe194e27 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 28 Oct 2024 11:23:32 -0400 Subject: [PATCH 28/41] Update tianji.sh tweak --- ct/tianji.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index ce41532c0..f9c9914f9 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -61,10 +61,7 @@ if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then fi RELEASE=$(curl -s https://api.github.com/repos/msgbyte/tianji/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then - msg_info "Setting Container to Higher Resources" - pct set $CTID -memory 4096 - pct set $CTID -cores 4 - msg_ok "Set Container to Higher Resources" + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "SET RESOURCES" "Please set the resources in your ${APP} LXC to ${var_cpu}vCPU and ${var_ram}RAM for the build process before continuing" 10 75 msg_info "Stopping ${APP} Service" systemctl stop tianji msg_ok "Stopped ${APP} Service" From b603da7778797ca99a0db88ccd33bebdc217872c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:50:52 +0100 Subject: [PATCH 29/41] Tweak (#3997) Removed wrong line --- ct/tianji.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ct/tianji.sh b/ct/tianji.sh index f9c9914f9..f4d07f1d8 100644 --- a/ct/tianji.sh +++ b/ct/tianji.sh @@ -71,7 +71,6 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v mv /opt/tianji /opt/tianji_bak wget -q "https://github.com/msgbyte/tianji/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip - rm -R mv tianji-${RELEASE} /opt/tianji cd tianji pnpm install --filter @tianji/client... --config.dedupe-peer-dependents=false --frozen-lockfile >/dev/null 2>&1 From 2d3cae43cbf679a8171c68ef2dd72e13d521cd74 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 28 Oct 2024 15:10:48 -0400 Subject: [PATCH 30/41] Update pihole-install.sh Correct interface IP --- install/pihole-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 7f79ff8c0..5b869d0d9 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -49,7 +49,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then cat </etc/unbound/unbound.conf.d/pi-hole.conf server: verbosity: 0 - interface: 0.0.0.0 + interface: 127.0.0.1 port: 5335 do-ip6: no do-ip4: yes From eceb52a67a2948e2c7c05ee4eeaf597c3228ec3a Mon Sep 17 00:00:00 2001 From: Jacob <630000+stickpin@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:45:40 +0100 Subject: [PATCH 31/41] Change update script (#4005) Change update script to make sure that it overwrites all the local changes in the local browserless git folder --- ct/changedetection.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/changedetection.sh b/ct/changedetection.sh index 85067c6b0..b7881b086 100644 --- a/ct/changedetection.sh +++ b/ct/changedetection.sh @@ -63,7 +63,8 @@ fi pip3 install changedetection.io --upgrade &>/dev/null pip3 install playwright --upgrade &>/dev/null if [[ -f /etc/systemd/system/browserless.service ]]; then - git -C /opt/browserless/ pull &>/dev/null + git -C /opt/browserless/ fetch --all &>/dev/null + git -C /opt/browserless/ reset --hard origin/main &>/dev/null npm update --prefix /opt/browserless &>/dev/null npm run build --prefix /opt/browserless &>/dev/null npm run build:function --prefix /opt/browserless &>/dev/null From 409936a9fcec23f647f017fbf66a6f0fc1d0950d Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 29 Oct 2024 11:51:45 -0400 Subject: [PATCH 32/41] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 20da75719..98d916e97 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +
+

Proxmox VE Helper-Scripts Project Update

+

Dear Community,

+

I wanted to share a personal update. I’ve recently transitioned into hospice care and, as a result, will be slowing down the development of this project. While I’m grateful for the progress we’ve made together, I recognize that I’ll be taking a step back for some rest and reflection during this time.

+

Thank you for your continued support, encouragement, and understanding. Your dedication to the community and this project means the world to me, and I am grateful for each of you.

+

Warm regards,
tteck/tteckster

+
From 8cdb218e381b811a52e4e91ef02711af352a5030 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:03:12 +0100 Subject: [PATCH 33/41] Tweak: Fix Paperless Ghostscript (#4012) --- ct/paperless-ngx.sh | 12 ++++++++++++ install/paperless-ngx-install.sh | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ct/paperless-ngx.sh b/ct/paperless-ngx.sh index d23986b1f..a36824276 100644 --- a/ct/paperless-ngx.sh +++ b/ct/paperless-ngx.sh @@ -67,6 +67,18 @@ function update_script() { header_info if [ "$UPD" == "1" ]; then if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then + if [[ "$(gs --version 2>/dev/null)" != "10.04.0" ]]; then + msg_info "Updating Ghostscript" + cd /tmp + wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz + tar -xzf ghostscript-10.04.0.tar.gz + cd ghostscript-10.04.0 + ./configure &>/dev/null + make &>/dev/null + sudo make install &>/dev/null + rm -rf /tmp/ghostscript* + msg_ok "Ghostscript updated to 10.04.0" + fi msg_info "Stopping all Paperless-ngx Services" systemctl stop paperless-consumer paperless-webserver paperless-scheduler paperless-task-queue.service msg_ok "Stopped all Paperless-ngx Services" diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index 7170611f9..134772a07 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -52,7 +52,6 @@ msg_ok "Installed Python3 Dependencies" msg_info "Installing OCR Dependencies (Patience)" $STD apt-get install -y --no-install-recommends \ unpaper \ - ghostscript \ icc-profiles-free \ qpdf \ liblept5 \ @@ -61,6 +60,14 @@ $STD apt-get install -y --no-install-recommends \ zlib1g \ tesseract-ocr \ tesseract-ocr-eng + +cd /tmp +wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10040/ghostscript-10.04.0.tar.gz +$STD tar -xzf ghostscript-10.04.0.tar.gz +cd ghostscript-10.04.0 +$STD ./configure +$STD make +$STD sudo make install msg_ok "Installed OCR Dependencies" msg_info "Installing JBIG2" @@ -221,6 +228,7 @@ customize msg_info "Cleaning up" rm -rf /opt/paperless/docker +rm -rf /tmp/ghostscript* $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" From d22879b5e9d53f0cd49082aaa5c578bd92a84948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Gj=C3=B8by=20Thom?= <34199185+havardthom@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:04:23 +0100 Subject: [PATCH 34/41] Add new LXC: NZBGet (#4000) --- ct/nzbget.sh | 72 +++++++++++++++++++++++++++++++++++++++ install/nzbget-install.sh | 45 ++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 ct/nzbget.sh create mode 100644 install/nzbget-install.sh diff --git a/ct/nzbget.sh b/ct/nzbget.sh new file mode 100644 index 000000000..d4caa8f60 --- /dev/null +++ b/ct/nzbget.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + _ _______ ____ ______ __ + / | / /__ / / __ )/ ____/__ / /_ + / |/ / / / / __ / / __/ _ \/ __/ + / /| / / /__/ /_/ / /_/ / __/ /_ +/_/ |_/ /____/_____/\____/\___/\__/ + +EOF +} +header_info +echo -e "Loading..." +APP="NZBGet" +var_disk="4" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -f /lib/systemd/system/nzbget.service ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP LXC" +apt-get update &>/dev/null +apt-get -y upgrade &>/dev/null +msg_ok "Updated $APP LXC" +exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:6789${CL} \n" diff --git a/install/nzbget-install.sh b/install/nzbget-install.sh new file mode 100644 index 000000000..b4f95b912 --- /dev/null +++ b/install/nzbget-install.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: havardthom +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y gpg +$STD apt-get install -y par2 +cat </etc/apt/sources.list.d/non-free.list +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware +EOF +$STD apt-get update +$STD apt-get install -y unrar +rm /etc/apt/sources.list.d/non-free.list +msg_ok "Installed Dependencies" + +msg_info "Installing NZBGet" +mkdir -p /etc/apt/keyrings +curl -fsSL https://nzbgetcom.github.io/nzbgetcom.asc | gpg --dearmor -o /etc/apt/keyrings/nzbgetcom.gpg +echo "deb [signed-by=/etc/apt/keyrings/nzbgetcom.gpg] https://nzbgetcom.github.io/deb stable main" >/etc/apt/sources.list.d/nzbgetcom.list +$STD apt-get update +$STD apt-get install -y nzbget +msg_ok "Installed NZBGet" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From f26410759a78bd817f729207f61ac406fe5ffe1a Mon Sep 17 00:00:00 2001 From: tteckster Date: Wed, 30 Oct 2024 06:09:28 -0400 Subject: [PATCH 35/41] Update build.func tweak --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index bcb949ceb..c28216017 100644 --- a/misc/build.func +++ b/misc/build.func @@ -503,7 +503,7 @@ install_script() { start() { if command -v pveversion >/dev/null 2>&1; then - if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "To ensure the safety of your system, please use ONLY https://tteck.github.io/Proxmox/\n\nThis will create a New ${APP} LXC. Proceed?" 10 90); then + if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then clear echo -e "⚠ User exited script \n" exit From 57b9cde44d9b71115eae1e56d0c021b1496aad55 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:25:02 +0100 Subject: [PATCH 36/41] Add new LXC: Memos (#4013) --- ct/memos.sh | 88 ++++++++++++++++++++++++++++++++++++++ install/memos-install.sh | 91 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 ct/memos.sh create mode 100644 install/memos-install.sh diff --git a/ct/memos.sh b/ct/memos.sh new file mode 100644 index 000000000..ceb1fd913 --- /dev/null +++ b/ct/memos.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func) +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE + +function header_info { +clear +cat <<"EOF" + __ ___ + / |/ /__ ____ ___ ____ _____ + / /|_/ / _ \/ __ `__ \/ __ \/ ___/ + / / / / __/ / / / / / /_/ (__ ) +/_/ /_/\___/_/ /_/ /_/\____/____/ + +EOF +} +header_info +echo -e "Loading..." +APP="Memos" +var_disk="7" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" +variables +color +catch_errors + +function default_settings() { + CT_TYPE="1" + PW="" + CT_ID=$NEXTID + HN=$NSAPP + DISK_SIZE="$var_disk" + CORE_COUNT="$var_cpu" + RAM_SIZE="$var_ram" + BRG="vmbr0" + NET="dhcp" + GATE="" + APT_CACHER="" + APT_CACHER_IP="" + DISABLEIP6="no" + MTU="" + SD="" + NS="" + MAC="" + VLAN="" + SSH="no" + VERB="no" + echo_default +} + +function update_script() { +header_info +if [[ ! -d /opt/memos ]]; then msg_error "No ${APP} Installation Found!"; exit; fi +msg_info "Updating $APP (Patience)" +cd /opt/memos +output=$(git pull --no-rebase) +if echo "$output" | grep -q "Already up to date." +then + msg_ok "$APP is already up to date." + exit +fi +systemctl stop memos +cd /opt/memos/web +pnpm i --frozen-lockfile &>/dev/null +pnpm build &>/dev/null +cd /opt/memos +mkdir -p /opt/memos/server/dist +cp -r web/dist/* /opt/memos/server/dist/ +cp -r web/dist/* /opt/memos/server/router/frontend/dist/ +go build -o /opt/memos/memos -tags=embed bin/memos/main.go &>/dev/null +systemctl start memos +msg_ok "Updated $APP" +exit +} + + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${APP} should be reachable by going to the following URL. + ${BL}http://${IP}:9030${CL} \n" diff --git a/install/memos-install.sh b/install/memos-install.sh new file mode 100644 index 000000000..f41d6f275 --- /dev/null +++ b/install/memos-install.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2024 tteck +# Author: tteck +# Co-Author: MickLesk (Canbiz) +# License: MIT +# https://github.com/tteck/Proxmox/raw/main/LICENSE +# Source: https://github.com/usememos/memos + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + build-essential \ + git \ + curl \ + sudo \ + tzdata \ + mc +msg_ok "Installed Dependencies" + +msg_info "Setting up Node.js Repository" +mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +msg_ok "Set up Node.js Repository" + +msg_info "Installing Node.js" +$STD apt-get update +$STD apt-get install -y nodejs +msg_ok "Installed Node.js" + +msg_info "Installing pnpm" +$STD npm install -g pnpm +msg_ok "Installed pnpm" + +msg_info "Installing Golang" +set +o pipefail +GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1) +wget -q https://golang.org/dl/$GOLANG +tar -xzf $GOLANG -C /usr/local +ln -s /usr/local/go/bin/go /usr/local/bin/go +set -o pipefail +msg_ok "Installed Golang" + +msg_info "Installing Memos (Patience)" +mkdir -p /opt/memos_data +$STD sudo git clone https://github.com/usememos/memos.git /opt/memos +cd /opt/memos/web +$STD pnpm i --frozen-lockfile +$STD pnpm build +cd /opt/memos +mkdir -p /opt/memos/server/dist +cp -r web/dist/* /opt/memos/server/dist/ +cp -r web/dist/* /opt/memos/server/router/frontend/dist/ +$STD go build -o /opt/memos/memos -tags=embed bin/memos/main.go +msg_ok "Installed Memos" + +msg_info "Creating Service" +cat </etc/systemd/system/memos.service +[Unit] +Description=Memos Server +After=network.target + +[Service] +ExecStart=/opt/memos/memos +Environment="MEMOS_MODE=prod" +Environment="MEMOS_PORT=9030" +Environment="MEMOS_DATA=/opt/memos_data" +WorkingDirectory=/opt/memos +Restart=always + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now memos.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" From 38d3f2c868bb426895aeb59ea41e89acd465b06a Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 31 Oct 2024 02:18:28 -0400 Subject: [PATCH 37/41] Update nginxproxymanager-install.sh tweak --- install/nginxproxymanager-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/nginxproxymanager-install.sh b/install/nginxproxymanager-install.sh index 1ec234aa8..4314e293c 100644 --- a/install/nginxproxymanager-install.sh +++ b/install/nginxproxymanager-install.sh @@ -37,8 +37,9 @@ $STD apt-get install -y \ python3-pip \ python3-venv \ python3-cffi \ + python3-certbot \ python3-certbot-dns-cloudflare -$STD pip3 install certbot certbot-dns-multi +$STD pip3 install certbot-dns-multi $STD python3 -m venv /opt/certbot/ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python Dependencies" From f4c9cc11561d904cf7d3a03329bd225e35f48cdb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 1 Nov 2024 08:44:02 +0100 Subject: [PATCH 38/41] Tweak (#4024) --- ct/zabbix.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/zabbix.sh b/ct/zabbix.sh index 3eb578d07..370a0f583 100644 --- a/ct/zabbix.sh +++ b/ct/zabbix.sh @@ -58,6 +58,7 @@ if [[ ! -f /etc/zabbix/zabbix_server.conf ]]; then msg_error "No ${APP} Installa msg_info "Updating $APP LXC" apt-get update &>/dev/null apt-get -y upgrade &>/dev/null +systemctl restart zabbix-server msg_ok "Updated $APP LXC" exit } From 7452b47c9f143fda0d7ca07f3bd7e78716df59d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Nov 2024 03:45:32 -0400 Subject: [PATCH 39/41] Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 98d916e97..dcb7506a9 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,6 @@ --- -> [!CAUTION] -Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes. It is imperative to rely solely on information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/ for accurate and trustworthy content. - These scripts empower users to create a Linux container or virtual machine interactively, providing choices for both simple and advanced configurations. The basic setup adheres to default settings, while the advanced setup gives users the ability to customize these defaults. Options are displayed to users in a dialog box format. Once the user makes their selections, the script collects and validates their input to generate the final configuration for the container or virtual machine. From 9ef8058194324b6c65005c96a57f6c3d6d790835 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 1 Nov 2024 03:46:13 -0400 Subject: [PATCH 40/41] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e47c7dd07..4d99a84ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@

All notable changes to this project will be documented in this file.

> [!CAUTION] -Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes. It is imperative to rely solely on information from https://Helper-Scripts.com/ or https://tteck.github.io/Proxmox/ for accurate and trustworthy content. +Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes. > [!NOTE] All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment. From 930760840c27ad92430c41ae1c0ff2a886d6ba63 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 2 Nov 2024 01:39:01 -0400 Subject: [PATCH 41/41] Update README.md --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index dcb7506a9..e8e02da20 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,4 @@ -
-

Proxmox VE Helper-Scripts Project Update

-

Dear Community,

-

I wanted to share a personal update. I’ve recently transitioned into hospice care and, as a result, will be slowing down the development of this project. While I’m grateful for the progress we’ve made together, I recognize that I’ll be taking a step back for some rest and reflection during this time.

-

Thank you for your continued support, encouragement, and understanding. Your dedication to the community and this project means the world to me, and I am grateful for each of you.

-

Warm regards,
tteck/tteckster

-
+

Proxmox VE Helper-Scripts: A Community Legacy

Dear Community,

As we prepare to archive this repository, we’re excited to announce a new home for the project: https://github.com/community-scripts/ProxmoxVE. While we’re still settling in, this will soon become the go-to place for the latest Proxmox VE scripts.

Thank you for your continued support.


The Community