From e2c43712adc4a3bf9bbf1a6c27af8e5614c60f18 Mon Sep 17 00:00:00 2001 From: Sam <54530346+asylumexp@users.noreply.github.com> Date: Wed, 8 Jan 2025 00:02:53 +1000 Subject: [PATCH] Move all upstream changes to repo --- install/homepage-install.sh | 10 +- install/inspircd-install.sh | 56 ++++++++ install/jenkins-install.sh | 38 ++++++ install/kimai-install.sh | 109 ++++++++++++++++ install/komga-install.sh | 60 +++++++++ install/komodo-install.sh | 97 ++++++++++++++ install/kubo-install.sh | 4 +- install/lazylibrarian-install.sh | 28 ++-- install/linkwarden-install.sh | 67 ++++++---- install/listmonk-install.sh | 82 ++++++++++++ install/lubelogger-install.sh | 74 +++++++++++ install/mongodb-install.sh | 20 ++- install/mqtt-install.sh | 9 +- install/mylar3-install.sh | 70 ++++++++++ install/mysql-install.sh | 16 ++- install/navidrome-install.sh | 1 + install/netbox-install.sh | 121 ++++++++++++++++++ install/nextcloudpi-install.sh | 14 +- install/nextpvr-install.sh | 48 +++++++ install/nzbget-install.sh | 6 +- install/ollama-install.sh | 16 +-- install/onedev-install.sh | 47 +++++++ install/openwebui-install.sh | 7 +- install/part-db-install.sh | 114 +++++++++++++++++ install/pf2etools-install.sh | 77 +++++++++++ install/pialert-install.sh | 6 +- install/pihole-install.sh | 36 +++++- install/postgresql-install.sh | 6 +- install/proxmox-datacenter-manager-install.sh | 41 ++++++ install/qbittorrent-install.sh | 2 +- install/recyclarr-install.sh | 39 ++++++ install/sabnzbd-install.sh | 5 +- install/semaphore-install.sh | 89 +++++++++++++ install/sftpgo-install.sh | 11 +- install/silverbullet-install.sh | 61 +++++++++ install/snipeit-install.sh | 110 ++++++++++++++++ install/spoolman-install.sh | 8 +- install/teddycloud-install.sh | 64 +++++++++ install/the-lounge-install.sh | 53 ++++++++ install/trilium-install.sh | 5 +- install/typesense-install.sh | 41 ++++++ install/umami-install.sh | 6 +- install/unbound-install.sh | 96 ++++++++++++++ install/vikunja-install.sh | 45 +++++++ install/wallos-install.sh | 12 +- install/wavelog-install.sh | 90 +++++++++++++ install/wireguard-install.sh | 17 ++- install/zabbix-install.sh | 31 +++-- install/zammad-install.sh | 63 +++++++++ install/zigbee2mqtt-install.sh | 71 +++++----- install/zwave-js-ui-install.sh | 40 +++--- 51 files changed, 2060 insertions(+), 179 deletions(-) create mode 100644 install/inspircd-install.sh create mode 100644 install/jenkins-install.sh create mode 100644 install/kimai-install.sh create mode 100644 install/komga-install.sh create mode 100644 install/komodo-install.sh create mode 100644 install/listmonk-install.sh create mode 100644 install/lubelogger-install.sh create mode 100644 install/mylar3-install.sh create mode 100644 install/netbox-install.sh create mode 100644 install/nextpvr-install.sh create mode 100644 install/onedev-install.sh create mode 100644 install/part-db-install.sh create mode 100644 install/pf2etools-install.sh create mode 100644 install/proxmox-datacenter-manager-install.sh create mode 100644 install/recyclarr-install.sh create mode 100644 install/semaphore-install.sh create mode 100644 install/silverbullet-install.sh create mode 100644 install/snipeit-install.sh create mode 100644 install/teddycloud-install.sh create mode 100644 install/the-lounge-install.sh create mode 100644 install/typesense-install.sh create mode 100644 install/unbound-install.sh create mode 100644 install/vikunja-install.sh create mode 100644 install/wavelog-install.sh create mode 100644 install/zammad-install.sh diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 704ffa35a..cf287ae49 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -17,11 +17,7 @@ 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 make -$STD apt-get install -y g++ -$STD apt-get install -y gcc $STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg $STD apt-get install -y wget $STD apt-get install -y gpg $STD apt-get install -y openssh-server @@ -50,6 +46,8 @@ rm -rf homepage-${RELEASE} cd /opt/homepage cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install +export NEXT_PUBLIC_VERSION="v$RELEASE" +export NEXT_PUBLIC_REVISION="source" $STD pnpm build echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Homepage v${RELEASE}" diff --git a/install/inspircd-install.sh b/install/inspircd-install.sh new file mode 100644 index 000000000..b6e33839d --- /dev/null +++ b/install/inspircd-install.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + mc \ + sudo \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + + +msg_info "Installing InspIRCd" +RELEASE=$(curl -s https://api.github.com/repos/inspircd/inspircd/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +wget -q https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb +$STD apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/null +cat </etc/inspircd/inspircd.conf + + + + + + +EOF + +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed InspIRCd" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/inspircd_${RELEASE}.deb12u1_amd64.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/jenkins-install.sh b/install/jenkins-install.sh new file mode 100644 index 000000000..59aefa5cf --- /dev/null +++ b/install/jenkins-install.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + mc \ + sudo \ + openjdk-17-jre \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setup Jenkins" +wget -qO /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian/jenkins.io-2023.key +echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" https://pkg.jenkins.io/debian binary/ >/etc/apt/sources.list.d/jenkins.list +$STD apt-get update +$STD apt-get install -y jenkins +msg_ok "Setup Jenkins" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/kimai-install.sh b/install/kimai-install.sh new file mode 100644 index 000000000..266675bc0 --- /dev/null +++ b/install/kimai-install.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk +# 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 \ + apt-transport-https \ + sudo \ + mc \ + curl \ + apache2 \ + git \ + expect \ + composer \ + mariadb-server \ + libapache2-mod-php \ + php8.2-{mbstring,gd,intl,pdo,mysql,tokenizer,zip,xml} \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up database" +DB_NAME=kimai_db +DB_USER=kimai +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+') +mysql -u root -e "CREATE DATABASE $DB_NAME;" +mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "Kimai-Credentials" + echo "Kimai Database User: $DB_USER" + echo "Kimai Database Password: $DB_PASS" + echo "Kimai Database Name: $DB_NAME" +} >> ~/kimai.creds +msg_ok "Set up database" + +msg_info "Installing Kimai (Patience)" +RELEASE=$(curl -s https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv kimai-${RELEASE} /opt/kimai +cd /opt/kimai +echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc +source ~/.bashrc +$STD composer install --no-dev --optimize-autoloader --no-interaction +cp .env.dist .env +sed -i "/^DATABASE_URL=/c\DATABASE_URL=mysql://$DB_USER:$DB_PASS@127.0.0.1:3306/$DB_NAME?charset=utf8mb4&serverVersion=$MYSQL_VERSION" /opt/kimai/.env +$STD bin/console kimai:install -n +chown -R :www-data /opt/* +chmod -R g+r /opt/* +chmod -R g+rw /opt/* +sudo chown -R www-data:www-data /opt/* +sudo chmod -R 755 /opt/* +$STD expect <"/opt/${APPLICATION}_version.txt" +msg_ok "Installed Kimai" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/kimai.conf + + ServerAdmin webmaster@localhost + DocumentRoot /opt/kimai/public/ + + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/error.log + CustomLog /var/log/apache2/access.log combined + + +EOF +$STD a2ensite kimai.conf +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf ${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/komga-install.sh b/install/komga-install.sh new file mode 100644 index 000000000..5c0f53ef7 --- /dev/null +++ b/install/komga-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: madelyn (DysfunctionalProgramming) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + mc \ + sudo \ + openjdk-17-jre \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing Komga" +RELEASE=$(curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar +mkdir -p /opt/komga +mv -f komga-${RELEASE}.jar /opt/komga/komga.jar +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed Komga" + +msg_info "Creating Service" +cat </etc/systemd/system/komga.service +[Unit] +Description=Komga +After=syslog.target network.target + +[Service] +Type=simple +WorkingDirectory=/opt/komga/ +ExecStart=/usr/bin/java -jar -Xmx2g komga.jar +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q komga +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/install/komodo-install.sh b/install/komodo-install.sh new file mode 100644 index 000000000..82fbd8f63 --- /dev/null +++ b/install/komodo-install.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://komo.do/ + +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 \ + ca-certificates \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setup Docker Repository" +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc +chmod a+r /etc/apt/keyrings/docker.asc +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +$STD apt-get update +msg_ok "Setup Docker Repository" + +msg_info "Installing Docker" +$STD apt-get install -y \ + docker-ce \ + docker-ce-cli \ + containerd.io \ + docker-buildx-plugin \ + docker-compose-plugin +msg_ok "Installed Docker" + +echo "Choose the database for Komodo installation:" +echo "1) MongoDB (recommended)" +echo "2) SQLite" +echo "3) PostgreSQL" +read -rp "Enter your choice (default: 1): " DB_CHOICE +DB_CHOICE=${DB_CHOICE:-1} + +case $DB_CHOICE in + 1) + DB_COMPOSE_FILE="mongo.compose.yaml" + ;; + 2) + DB_COMPOSE_FILE="sqlite.compose.yaml" + ;; + 3) + DB_COMPOSE_FILE="postgres.compose.yaml" + ;; + *) + echo "Invalid choice. Defaulting to MongoDB." + DB_COMPOSE_FILE="mongo.compose.yaml" + ;; +esac +mkdir -p /opt/komodo +cd /opt/komodo +wget -q "https://raw.githubusercontent.com/mbecker20/komodo/main/compose/$DB_COMPOSE_FILE" + + +msg_info "Setup Komodo Environment" +wget -q -O /opt/komodo/compose.env https://raw.githubusercontent.com/mbecker20/komodo/main/compose/compose.env +DB_PASSWORD=$(openssl rand -base64 16 | tr -d '/+=') +PASSKEY=$(openssl rand -base64 24 | tr -d '/+=') +WEBHOOK_SECRET=$(openssl rand -base64 24 | tr -d '/+=') +JWT_SECRET=$(openssl rand -base64 24 | tr -d '/+=') + +sed -i "s/^DB_USERNAME=.*/DB_USERNAME=komodo_admin/" /opt/komodo/compose.env +sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASSWORD}/" /opt/komodo/compose.env +sed -i "s/^PASSKEY=.*/PASSKEY=${PASSKEY}/" /opt/komodo/compose.env +sed -i "s/^KOMODO_WEBHOOK_SECRET=.*/KOMODO_WEBHOOK_SECRET=${WEBHOOK_SECRET}/" /opt/komodo/compose.env +sed -i "s/^KOMODO_JWT_SECRET=.*/KOMODO_JWT_SECRET=${JWT_SECRET}/" /opt/komodo/compose.env +msg_ok "Setup Komodo Environment" + +msg_info "Initialize Komodo" +$STD docker compose -p komodo -f /opt/komodo/$DB_COMPOSE_FILE --env-file /opt/komodo/compose.env up -d +msg_ok "Initialized Komodo" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/kubo-install.sh b/install/kubo-install.sh index 657a135f6..5e44e7c69 100644 --- a/install/kubo-install.sh +++ b/install/kubo-install.sh @@ -22,7 +22,7 @@ $STD apt-get install -y wget $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" -msg_info "Installing Kubo" +msg_info "Installing IPFS" RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) $STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz" tar -xzf "kubo_${RELEASE}_linux-arm64.tar.gz" -C /usr/local @@ -35,7 +35,7 @@ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://${LXCI ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" $STD rm "kubo_${RELEASE}_linux-arm64.tar.gz" -msg_ok "Installed Kubo" +msg_ok "Installed IPFS" msg_info "Creating Service" cat </etc/systemd/system/ipfs.service diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index 35977d908..09bef0c3f 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: MountyMapleSyrup (MountyMapleSyrup) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -15,17 +15,23 @@ 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 git -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + libpng-dev \ + libjpeg-dev \ + libtiff-dev \ + imagemagick \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" -$STD apt-get install -y pip -$STD apt-get install -y python3-irc +$STD apt-get install -y \ + pip \ + python3-irc rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD pip install jaraco.stream $STD pip install python-Levenshtein @@ -34,6 +40,8 @@ msg_ok "Installed Python3 Dependencies" msg_info "Installing LazyLibrarian" $STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian +cd /opt/LazyLibrarian +$STD pip install . msg_ok "Installed LazyLibrarian" msg_info "Creating Service" diff --git a/install/linkwarden-install.sh b/install/linkwarden-install.sh index 47116018a..419196bc8 100644 --- a/install/linkwarden-install.sh +++ b/install/linkwarden-install.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) +# Co-Author: MickLesk (Canbiz) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,14 +15,16 @@ 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 git -$STD apt-get install -y gpg -$STD apt-get install -y postgresql -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + make \ + postgresql \ + cargo \ + gnupg \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -36,22 +39,28 @@ $STD apt-get install -y nodejs $STD npm install -g yarn msg_ok "Installed Node.js/Yarn" -msg_info "Clone Linkwarden Repository" -$STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden -cd /opt/linkwarden -msg_ok "Cloned Linkwarden Repository" +msg_info "Installing Monolith" +$STD cargo install monolith +export PATH=~/.cargo/bin:$PATH +msg_ok "Installed Monolith" msg_info "Setting up PostgreSQL DB" DB_NAME=linkwardendb DB_USER=linkwarden DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)" +SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 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 TEMPLATE template0;" - -echo "" >>~/linkwarden.creds -echo -e "Linkwarden Database User: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds -echo -e "Linkwarden Database Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds -echo -e "Linkwarden Database Name: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds +$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;" +$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 "Linkwarden-Credentials" + echo "Linkwarden Database User: $DB_USER" + echo "Linkwarden Database Password: $DB_PASS" + echo "Linkwarden Database Name: $DB_NAME" + echo "Linkwarden Secret: $SECRET_KEY" +} >> ~/linkwarden.creds msg_ok "Set up PostgreSQL DB" read -r -p "Would you like to add Adminer? " prompt @@ -68,17 +77,28 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds + { + echo "" + echo "Adminer-Credentials" + echo "Adminer WebUI: $IP/adminer/" + echo "Adminer Database User: $DB_USER" + echo "Adminer Database Password: $DB_PASS" + echo "Adminer Database Name: $DB_NAME" +} >> ~/linkwarden.creds msg_ok "Installed Adminer" fi msg_info "Installing Linkwarden (Patience)" +cd /opt RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv linkwarden-${RELEASE:1} /opt/linkwarden +cd /opt/linkwarden $STD yarn $STD npx playwright install-deps $STD yarn playwright install IP=$(hostname -I | awk '{print $1}') -SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)" env_path="/opt/linkwarden/.env" echo " NEXTAUTH_SECRET=${SECRET_KEY} @@ -87,6 +107,7 @@ DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME} " >$env_path $STD yarn build $STD yarn prisma migrate deploy +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Linkwarden" msg_info "Creating Service" @@ -97,6 +118,7 @@ After=network.target [Service] Type=exec +Environment=PATH=$PATH WorkingDirectory=/opt/linkwarden ExecStart=/usr/bin/yarn start @@ -110,6 +132,7 @@ motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/listmonk-install.sh b/install/listmonk-install.sh new file mode 100644 index 000000000..52f7a5edf --- /dev/null +++ b/install/listmonk-install.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + postgresql \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=listmonk +DB_USER=listmonk +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +$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 TEMPLATE template0;" +{ +echo "listmonk-Credentials" +echo -e "listmonk Database User: \e[32m$DB_USER\e[0m" +echo -e "listmonk Database Password: \e[32m$DB_PASS\e[0m" +echo -e "listmonk Database Name: \e[32m$DB_NAME\e[0m" +} >> ~/listmonk.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing listmonk" +cd /opt +mkdir /opt/listmonk +mkdir /opt/listmonk/uploads +RELEASE=$(curl -s https://api.github.com/repos/knadh/listmonk/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_arm64.tar.gz" +tar -xzf "listmonk_${RELEASE}_linux_arm64.tar.gz" -C /opt/listmonk + +$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml +sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml +$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml + +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed listmonk" + +msg_info "Creating Service" +cat </etc/systemd/system/listmonk.service +[Unit] +Description=Listmonk Service +Wants=network.target +After=postgresql.service + +[Service] +Type=simple +ExecStart=/opt/listmonk/listmonk --config /opt/listmonk/config.toml +Restart=always +RestartSec=3 +WorkingDirectory=/opt/listmonk + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now listmonk +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/listmonk_${RELEASE}_linux_arm64.tar.gz" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/lubelogger-install.sh b/install/lubelogger-install.sh new file mode 100644 index 000000000..0413b80b4 --- /dev/null +++ b/install/lubelogger-install.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + wget \ + mc \ + zip \ + jq \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + + +msg_info "Installing LubeLogger" +cd /opt +mkdir -p /opt/lubelogger +RELEASE=$(curl -s https://api.github.com/repos/hargata/lubelog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +RELEASE_TRIMMED=$(echo "${RELEASE}" | tr -d ".") +cd /opt/lubelogger +wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip +unzip -q LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip +chmod 700 /opt/lubelogger/CarCareTracker +cp /opt/lubelogger/appsettings.json /opt/lubelogger/appsettings_bak.json +jq '.Kestrel = {"Endpoints": {"Http": {"Url": "http://0.0.0.0:5000"}}}' /opt/lubelogger/appsettings_bak.json > /opt/lubelogger/appsettings.json +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed LubeLogger" + +msg_info "Creating Service" +cat </etc/systemd/system/lubelogger.service +[Unit] +Description=LubeLogger Daemon +After=network.target + +[Service] +User=root + +Type=simple +WorkingDirectory=/opt/lubelogger +ExecStart=/opt/lubelogger/CarCareTracker +TimeoutStopSec=20 +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable --now -q lubelogger.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/lubelogger/appsettings_bak.json +rm -rf /opt/lubelogger/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/mongodb-install.sh b/install/mongodb-install.sh index dd2c03169..84ed80dad 100644 --- a/install/mongodb-install.sh +++ b/install/mongodb-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -29,14 +29,22 @@ $STD apt-get install -y wget $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" -msg_info "Installing MongoDB" -wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg -echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 multiverse" +# Abfrage für die MongoDB-Version +read -p "Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8 +if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then + MONGODB_VERSION="8.0" +else + MONGODB_VERSION="7.0" +fi + +msg_info "Installing MongoDB $MONGODB_VERSION" +wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg +echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list $STD apt-get update $STD apt-get install -y mongodb-org sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf systemctl enable -q --now mongod.service -msg_ok "Installed MongoDB" +msg_ok "Installed MongoDB $MONGODB_VERSION" motd_ssh customize diff --git a/install/mqtt-install.sh b/install/mqtt-install.sh index cd694f8a9..c98a4b83a 100644 --- a/install/mqtt-install.sh +++ b/install/mqtt-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -23,6 +23,11 @@ $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" msg_info "Installing Mosquitto MQTT Broker" +source /etc/os-release +curl -fsSL http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/usr/share/keyrings/mosquitto-repo.gpg.key +chmod go+r /usr/share/keyrings/mosquitto-repo.gpg.key +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mosquitto-repo.gpg.key] http://repo.mosquitto.org/debian ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/mosquitto.list +$STD apt-get update $STD apt-get -y install mosquitto $STD apt-get -y install mosquitto-clients cat </etc/mosquitto/conf.d/default.conf diff --git a/install/mylar3-install.sh b/install/mylar3-install.sh new file mode 100644 index 000000000..7687deeac --- /dev/null +++ b/install/mylar3-install.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: davalanche +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/mylar3/mylar3 + +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 \ + jq \ + wget \ + openssh-server +echo "deb http://deb.debian.org/debian bookworm non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.list +$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 "Updating Python3" +$STD apt-get install -y python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED +$STD pip install -U --no-cache-dir pip +msg_ok "Updated Python3" + +msg_info "Installing ${APPLICATION}" +mkdir -p /opt/mylar3 +mkdir -p /opt/mylar3-data +RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | jq -r '.tag_name') +wget -qO- https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz | tar -xz --strip-components=1 -C /opt/mylar3 +$STD pip install --no-cache-dir -r /opt/mylar3/requirements.txt +echo "${RELEASE}" > /opt/${APPLICATION}_version.txt +msg_ok "Installed ${APPLICATION}" + +msg_info "Creating Service" +cat </etc/systemd/system/mylar3.service +[Unit] +Description=Mylar3 Service +After=network-online.target + +[Service] +ExecStart=/usr/bin/python3 /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data +GuessMainPID=no +Type=forking +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now mylar3.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/install/mysql-install.sh b/install/mysql-install.sh index 27fdc8d28..cb6b592ac 100644 --- a/install/mysql-install.sh +++ b/install/mysql-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: MickLesk (Canbiz) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://www.mysql.com/products/community | https://www.phpmyadmin.net source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" @@ -26,9 +26,17 @@ $STD apt-get install -y \ openssh-server msg_ok "Installed Dependencies" +RELEASE_REPO="mysql-8.0" +RELEASE_AUTH="mysql_native_password" +read -r -p "Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? " prompt +if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then + RELEASE_REPO="mysql-8.4-lts" + RELEASE_AUTH="caching_sha2_password" +fi + msg_info "Installing MySQL" curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg -echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) mysql-8.0" >/etc/apt/sources.list.d/mysql.list +echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list $STD apt-get update export DEBIAN_FRONTEND=noninteractive $STD apt-get install -y \ @@ -38,7 +46,7 @@ msg_ok "Installed MySQL" msg_info "Configure MySQL Server" ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)" -$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$ADMIN_PASS'; FLUSH PRIVILEGES;" +$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH $RELEASE_AUTH BY '$ADMIN_PASS'; FLUSH PRIVILEGES;" echo "" >~/mysql.creds echo -e "MySQL user: root" >>~/mysql.creds echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 1422ad0cd..bfe26deda 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -30,6 +30,7 @@ install -d -o root -g root /var/lib/navidrome wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_arm64.tar.gz -O Navidrome.tar.gz $STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ chown -R root:root /opt/navidrome +chmod +x /opt/navidrome/navidrome mkdir -p /music cat </var/lib/navidrome/navidrome.toml MusicFolder = '/music' diff --git a/install/netbox-install.sh b/install/netbox-install.sh new file mode 100644 index 000000000..c05ce6aa5 --- /dev/null +++ b/install/netbox-install.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + apache2 \ + redis-server \ + postgresql \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + build-essential \ + libxml2-dev \ + libxslt1-dev \ + libffi-dev \ + libpq-dev \ + libssl-dev \ + zlib1g-dev \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=netbox +DB_USER=netbox +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +$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 TEMPLATE template0;" +{ +echo "Netbox-Credentials" +echo -e "Netbox Database User: \e[32m$DB_USER\e[0m" +echo -e "Netbox Database Password: \e[32m$DB_PASS\e[0m" +echo -e "Netbox Database Name: \e[32m$DB_NAME\e[0m" +} >> ~/netbox.creds +msg_ok "Set up PostgreSQL" + +msg_info "Installing NetBox (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/netbox-community/netbox/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip" +unzip -q "v${RELEASE}.zip" +mv /opt/netbox-${RELEASE}/ /opt/netbox + +$STD adduser --system --group netbox +chown --recursive netbox /opt/netbox/netbox/media/ +chown --recursive netbox /opt/netbox/netbox/reports/ +chown --recursive netbox /opt/netbox/netbox/scripts/ + +mv /opt/netbox/netbox/netbox/configuration_example.py /opt/netbox/netbox/netbox/configuration.py + +SECRET_KEY=$(python3 /opt/netbox/netbox/generate_secret_key.py) +ESCAPED_SECRET_KEY=$(printf '%s\n' "$SECRET_KEY" | sed 's/[&/\]/\\&/g') + +sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ["*"]/' /opt/netbox/netbox/netbox/configuration.py +sed -i "s|SECRET_KEY = ''|SECRET_KEY = '${ESCAPED_SECRET_KEY}'|" /opt/netbox/netbox/netbox/configuration.py +sed -i "/DATABASE = {/,/}/s/'USER': '[^']*'/'USER': '$DB_USER'/" /opt/netbox/netbox/netbox/configuration.py +sed -i "/DATABASE = {/,/}/s/'PASSWORD': '[^']*'/'PASSWORD': '$DB_PASS'/" /opt/netbox/netbox/netbox/configuration.py + +$STD /opt/netbox/upgrade.sh +ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping + +mv /opt/netbox/contrib/apache.conf /etc/apache2/sites-available/netbox.conf +$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/netbox.key -out /etc/ssl/certs/netbox.crt -subj "/C=US/O=NetBox/OU=Certificate/CN=localhost" +$STD a2enmod ssl proxy proxy_http headers rewrite +$STD a2ensite netbox +systemctl restart apache2 + +mv /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py +mv /opt/netbox/contrib/*.service /etc/systemd/system/ +systemctl daemon-reload +systemctl enable -q --now netbox netbox-rq + +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +echo -e "Netbox Secret: \e[32m$SECRET_KEY\e[0m" >> ~/netbox.creds +msg_ok "Installed NetBox" + +msg_info "Setting up Django Admin" +DJANGO_USER=Admin +DJANGO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) + +source /opt/netbox/venv/bin/activate +$STD python3 /opt/netbox/netbox/manage.py shell << EOF +from django.contrib.auth import get_user_model +UserModel = get_user_model() +user = UserModel.objects.create_user('$DJANGO_USER', password='$DJANGO_PASS') +user.is_superuser = True +user.is_staff = True +user.save() +EOF +{ +echo "" +echo "Netbox-Django-Credentials" +echo -e "Django User: \e[32m$DJANGO_USER\e[0m" +echo -e "Django Password: \e[32m$DJANGO_PASS\e[0m" +} >> ~/netbox.creds +msg_ok "Setup Django Admin" + +motd_ssh +customize + +msg_info "Cleaning up" +rm "/opt/v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/nextcloudpi-install.sh b/install/nextcloudpi-install.sh index f12ff0871..1ec7d8982 100644 --- a/install/nextcloudpi-install.sh +++ b/install/nextcloudpi-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -22,17 +22,7 @@ $STD apt-get install -y openssh-server msg_ok "Installed Dependencies" msg_info "Installing NextCloudPi (Patience)" -$STD apt-get install -y systemd-resolved -systemctl enable -q --now systemd-resolved -cat <<'EOF' >/etc/systemd/resolved.conf -[Resolve] -DNS=8.8.8.8 -FallbackDNS=8.8.4.4 -EOF -systemctl restart systemd-resolved $STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) -systemctl disable -q --now systemd-resolved -$STD apt-get remove -y systemd-resolved msg_ok "Installed NextCloudPi" motd_ssh diff --git a/install/nextpvr-install.sh b/install/nextpvr-install.sh new file mode 100644 index 000000000..a3ab3b70c --- /dev/null +++ b/install/nextpvr-install.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# 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 "Installing Dependencies (Patience)" +$STD apt-get install -y \ + mediainfo \ + libmediainfo-dev \ + libc6 \ + curl \ + sudo \ + libgdiplus \ + acl \ + dvb-tools \ + libdvbv5-0 \ + dtv-scan-tables \ + libc6-dev \ + ffmpeg \ + mc \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setup NextPVR (Patience)" +cd /opt +wget -q https://nextpvr.com/nextpvr-helper.deb +$STD dpkg -i nextpvr-helper.deb +msg_ok "Installed NextPVR" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/nextpvr-helper.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/nzbget-install.sh b/install/nzbget-install.sh index b4f95b912..8ccc90716 100644 --- a/install/nzbget-install.sh +++ b/install/nzbget-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: havardthom # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -20,6 +20,8 @@ $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y gpg $STD apt-get install -y par2 +$STD apt-get install -y wget +$STD apt-get install -y openssh-server cat </etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware EOF diff --git a/install/ollama-install.sh b/install/ollama-install.sh index ea8a849a2..701560bde 100644 --- a/install/ollama-install.sh +++ b/install/ollama-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: havardthom # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -26,10 +26,10 @@ $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 wget https://golang.org/dl/go1.23.2.linux-arm64.tar.gz +$STD tar -xzf go1.23.2.linux-arm64.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 +rm -rf go1.23.2.linux-arm64.tar.gz msg_ok "Installed Golang" msg_info "Setting up Intel® Repositories" @@ -42,7 +42,7 @@ $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} +$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,vainfo,level-zero,level-zero-dev} if [[ "$CTTYPE" == "0" ]]; then chgrp video /dev/dri chmod 755 /dev/dri @@ -52,10 +52,6 @@ if [[ "$CTTYPE" == "0" ]]; then 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 diff --git a/install/onedev-install.sh b/install/onedev-install.sh new file mode 100644 index 000000000..1acc780cd --- /dev/null +++ b/install/onedev-install.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + mc \ + sudo \ + default-jdk \ + git \ + git-lfs \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + + +msg_info "Installing OneDev" +cd /opt +wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz +tar -xzf onedev-latest.tar.gz +mv /opt/onedev-latest /opt/onedev +$STD /opt/onedev/bin/server.sh install +systemctl start onedev +RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2) +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed OneDev" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/onedev-latest.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 31930cb59..84ce4054f 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: havardthom # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -20,12 +20,15 @@ $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 wget +$STD apt-get install -y openssh-server msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" $STD apt-get install -y --no-install-recommends \ python3 \ python3-pip +rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python3 Dependencies" msg_info "Setting up Node.js Repository" diff --git a/install/part-db-install.sh b/install/part-db-install.sh new file mode 100644 index 000000000..bc6e61959 --- /dev/null +++ b/install/part-db-install.sh @@ -0,0 +1,114 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + zip \ + ca-certificates \ + software-properties-common \ + apt-transport-https \ + lsb-release \ + php-{opcache,curl,gd,mbstring,xml,bcmath,intl,zip,xsl,pgsql} \ + libapache2-mod-php \ + composer \ + postgresql \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up PostgreSQL" +DB_NAME=partdb +DB_USER=partdb +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) +$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 TEMPLATE template0;" +{ +echo "Part-DB Credentials" +echo "Part-DB Database User: $DB_USER" +echo "Part-DB Database Password: $DB_PASS" +echo "Part-DB Database Name: $DB_NAME" +} >> ~/partdb.creds +msg_ok "Set up PostgreSQL" + +msg_info "Setting up Node.js/Yarn" +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 +$STD apt-get update +$STD apt-get install -y nodejs +$STD npm install -g npm@latest +$STD npm install -g yarn +msg_ok "Installed Node.js/Yarn" + +msg_info "Installing Part-DB (Patience)" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/Part-DB/Part-DB-server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip" +unzip -q "v${RELEASE}.zip" +mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb + +cd /opt/partdb/ +cp .env .env.local +sed -i "s|DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/app.db\"|DATABASE_URL=\"postgresql://${DB_USER}:${DB_PASS}@127.0.0.1:5432/${DB_NAME}?serverVersion=12.19&charset=utf8\"|" .env.local + +export COMPOSER_ALLOW_SUPERUSER=1 +$STD composer install --no-dev -o --no-interaction +$STD yarn install +$STD yarn build +$STD php bin/console cache:clear +php bin/console doctrine:migrations:migrate -n > ~/database-migration-output +chown -R www-data:www-data /opt/partdb +ADMIN_PASS=$(grep -oP 'The initial password for the "admin" user is: \K\w+' ~/database-migration-output) +{ +echo "" +echo "Part-DB Admin User: admin" +echo "Part-DB Admin Password: $ADMIN_PASS" +} >> ~/partdb.creds +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Part-DB" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/partdb.conf + + ServerName partdb + DocumentRoot /opt/partdb/public + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/partdb_error.log + CustomLog /var/log/apache2/partdb_access.log combined + +EOF +$STD a2ensite partdb +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf ~/database-migration-output +rm -rf "/opt/v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/pf2etools-install.sh b/install/pf2etools-install.sh new file mode 100644 index 000000000..cf26abcc1 --- /dev/null +++ b/install/pf2etools-install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: TheRealVira +# License: MIT +# Source: https://pf2etools.com/ + +# Import Functions und Setup +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 \ + mc \ + sudo \ + apache2 \ + gpg \ + ca-certificates \ + git \ + wget \ + openssh-server +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" + +# Setup App +msg_info "Setup Pf2eTools" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip" +unzip -q "${RELEASE}.zip" +mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools +cd /opt/Pf2eTools +$STD npm install +$STD npm run build +cd ~ +echo "${RELEASE}" >/opt/Pf2eTools_version.txt +msg_ok "Set up Pf2eTools" + +msg_info "Creating Service" +cat <> /etc/apache2/apache2.conf + + SetHandler server-status + Order deny,allow + Allow from all + +EOF +rm -rf /var/www/html +ln -s "/opt/Pf2eTools" /var/www/html +chown -R www-data: "/opt/Pf2eTools" +chmod -R 755 "/opt/Pf2eTools" +msg_ok "Created Service" + +# Cleanup +msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" + +motd_ssh +customize diff --git a/install/pialert-install.sh b/install/pialert-install.sh index 4819ed30b..78aa6d7d1 100644 --- a/install/pialert-install.sh +++ b/install/pialert-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -82,8 +82,6 @@ done sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf sed -i 's/$HOME/\/opt/g' /opt/pialert/install/pialert.cron crontab /opt/pialert/install/pialert.cron -echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update -chmod +x /usr/bin/update echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan chmod +x /usr/bin/scan echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions diff --git a/install/pihole-install.sh b/install/pihole-install.sh index 1b87d0f2b..455b8b1d9 100644 --- a/install/pihole-install.sh +++ b/install/pihole-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -46,6 +46,7 @@ msg_ok "Installed Pi-hole" read -r -p "Would you like to add Unbound? " prompt if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + read -r -p "Unbound is configured as a recursive DNS server by default, would you like it to be configured as a forwarding DNS server (using DNS-over-TLS (DoT)) instead? " prompt msg_info "Installing Unbound" $STD apt-get install -y unbound cat </etc/unbound/unbound.conf.d/pi-hole.conf @@ -75,7 +76,6 @@ server: infra-cache-slabs: 8 key-cache-slabs: 8 serve-expired: yes - root-hints: /var/lib/unbound/root.hints serve-expired-ttl: 3600 edns-buffer-size: 1232 prefetch: yes @@ -96,8 +96,34 @@ EOF cat </etc/dnsmasq.d/99-edns.conf edns-packet-max=1232 EOF - wget -qO /var/lib/unbound/root.hints https://www.internic.net/domain/named.root - sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e 's/PIHOLE_DNS_2=8.8.4.4/#PIHOLE_DNS_2=8.8.4.4/' /etc/pihole/setupVars.conf + + if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then + cat <>/etc/unbound/unbound.conf.d/pi-hole.conf + tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt" +forward-zone: + name: "." + forward-tls-upstream: yes + forward-first: no + + forward-addr: 8.8.8.8@853#dns.google + forward-addr: 8.8.4.4@853#dns.google + forward-addr: 2001:4860:4860::8888@853#dns.google + forward-addr: 2001:4860:4860::8844@853#dns.google + + #forward-addr: 1.1.1.1@853#cloudflare-dns.com + #forward-addr: 1.0.0.1@853#cloudflare-dns.com + #forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com + #forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com + + #forward-addr: 9.9.9.9@853#dns.quad9.net + #forward-addr: 149.112.112.112@853#dns.quad9.net + #forward-addr: 2620:fe::fe@853#dns.quad9.net + #forward-addr: 2620:fe::9@853#dns.quad9.net +EOF + fi + + sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e '/PIHOLE_DNS_2=8.8.4.4/d' /etc/pihole/setupVars.conf + sed -i -e 's/server=8.8.8.8/server=127.0.0.1#5335/' -e '/server=8.8.4.4/d' /etc/dnsmasq.d/01-pihole.conf systemctl enable -q --now unbound systemctl restart pihole-FTL.service msg_ok "Installed Unbound" diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index c60d1f887..3e85f11ef 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -37,7 +37,7 @@ cat </etc/postgresql/17/main/pg_hba.conf local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only -local all all peer +local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 scram-sha-256 host all all 0.0.0.0/24 md5 diff --git a/install/proxmox-datacenter-manager-install.sh b/install/proxmox-datacenter-manager-install.sh new file mode 100644 index 000000000..750a1dc3d --- /dev/null +++ b/install/proxmox-datacenter-manager-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: CrazyWolf13 +# License: MIT +# Source: Proxmox Server Solution GmbH + +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 \ + gpg \ + mc \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing Proxmox Datacenter Manager" +curl -fsSL https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg | gpg --dearmor -o /etc/apt/keyrings/proxmox-release-bookworm.gpg +echo "deb [signed-by=/etc/apt/keyrings/proxmox-release-bookworm.gpg] http://download.proxmox.com/debian/pdm bookworm pdm-test " >/etc/apt/sources.list.d/proxmox-release-bookworm.list +$STD apt-get update +$STD apt-get install -y \ + proxmox-datacenter-manager \ + proxmox-datacenter-manager-ui +msg_ok "Installed Proxmox Datacenter Manager" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/qbittorrent-install.sh b/install/qbittorrent-install.sh index c447ed761..8458dd779 100644 --- a/install/qbittorrent-install.sh +++ b/install/qbittorrent-install.sh @@ -39,7 +39,7 @@ cat </etc/systemd/system/qbittorrent-nox.service Description=qBittorrent client After=network.target [Service] -ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090 +ExecStart=/usr/bin/qbittorrent-nox Restart=always [Install] WantedBy=multi-user.target diff --git a/install/recyclarr-install.sh b/install/recyclarr-install.sh new file mode 100644 index 000000000..7349a8079 --- /dev/null +++ b/install/recyclarr-install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MrYadro +# 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 "Installing Dependencies" +$STD apt-get install -y curl +$STD apt-get install -y git +$STD apt-get install -y sudo +$STD apt-get install -y mc +$STD apt-get install -y wget +$STD apt-get install -y openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing Recyclarr" +wget -q $(curl -s https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-arm64 | cut -d\" -f4) +tar -C /usr/local/bin -xJf recyclarr*.tar.xz +mkdir -p /root/.config/recyclarr +recyclarr config create +msg_ok "Installed Recyclarr" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf recyclarr*.tar.xz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/sabnzbd-install.sh b/install/sabnzbd-install.sh index 9a76ee786..ad4bc475b 100644 --- a/install/sabnzbd-install.sh +++ b/install/sabnzbd-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -33,7 +33,6 @@ msg_info "Updating Python3" $STD apt-get install -y \ python3-dev \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD apt-get install -y python3-setuptools rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Updated Python3" diff --git a/install/semaphore-install.sh b/install/semaphore-install.sh new file mode 100644 index 000000000..730db6b23 --- /dev/null +++ b/install/semaphore-install.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + mc \ + git \ + gpg \ + sudo \ + wget \ + openssh-server + +wget -qO- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour >/usr/share/keyrings/ansible-archive-keyring.gpg +cat </etc/apt/sources.list.d/ansible.list +deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu jammy main +EOF +$STD apt update +$STD apt install -y ansible +msg_ok "Installed Dependencies" + +msg_info "Setup Semaphore" +RELEASE=$(curl -s https://api.github.com/repos/semaphoreui/semaphore/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +mkdir -p /opt/semaphore +cd /opt/semaphore +wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_arm64.deb +$STD dpkg -i semaphore_${RELEASE}_linux_arm64.deb + +SEM_HASH=$(openssl rand -base64 32) +SEM_ENCRYPTION=$(openssl rand -base64 32) +SEM_KEY=$(openssl rand -base64 32) +SEM_PW=$(openssl rand -base64 12) +cat </opt/semaphore/config.json +{ + "bolt": { + "host": "/opt/semaphore/semaphore_db.bolt" + }, + "tmp_path": "/opt/semaphore/tmp", + "cookie_hash": "${SEM_HASH}", + "cookie_encryption": "${SEM_ENCRYPTION}", + "access_key_encryption": "${SEM_KEY}" +} +EOF + +$STD semaphore user add --admin --login admin --email admin@helper-scripts.com --name Administrator --password ${SEM_PW} --config /opt/semaphore/config.json +echo "${SEM_PW}" >~/semaphore.creds +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Setup Semaphore" + +msg_info "Creating Service" +cat </etc/systemd/system/semaphore.service +[Unit] +Description=Semaphore UI +Documentation=https://docs.semaphoreui.com/ +Wants=network-online.target +After=network-online.target + +[Service] +ExecStart=/usr/bin/semaphore server --config /opt/semaphore/config.json +Restart=always +RestartSec=10s + +[Install] +WantedBy=multi-user.target +EOF + +systemctl enable --now -q semaphore.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf semaphore_${RELEASE}_linux_arm64.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/sftpgo-install.sh b/install/sftpgo-install.sh index 40cc9fb1a..c44892c57 100644 --- a/install/sftpgo-install.sh +++ b/install/sftpgo-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -25,8 +25,9 @@ msg_ok "Installed Dependencies" msg_info "Installing Golang" set +o pipefail -wget -q https://golang.org/dl/go1.22.2.linux-arm64.tar.gz -tar -xzf go1.22.2.linux-arm64.tar.gz -C /usr/local +RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-arm64.tar.gz" | head -n 1) +wget -q https://golang.org/dl/$RELEASE +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" @@ -42,7 +43,7 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf go1.22.2.linux-arm64.tar.gz +rm -rf $RELEASE $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/silverbullet-install.sh b/install/silverbullet-install.sh new file mode 100644 index 000000000..6c9c39078 --- /dev/null +++ b/install/silverbullet-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Dominik Siebel (dsiebel) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing Silverbullet" +RELEASE=$(curl -s https://api.github.com/repos/silverbulletmd/silverbullet/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +mkdir -p /opt/silverbullet/bin /opt/silverbullet/space +wget -q https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-aarch64.zip +unzip -oq -d /opt/silverbullet/bin/ silverbullet-server-linux-aarch64.zip +chmod +x /opt/silverbullet/bin/silverbullet +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Silverbullet" + +msg_info "Creating Service" + +cat </etc/systemd/system/silverbullet.service +[Unit] +Description=Silverbullet Daemon +After=syslog.target network.target + +[Service] +User=root +Type=simple +ExecStart=/opt/silverbullet/bin/silverbullet --hostname 0.0.0.0 --port 3000 /opt/silverbullet/space +WorkingDirectory=/opt/silverbullet +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q silverbullet +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf silverbullet-server-linux-aarch64.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/snipeit-install.sh b/install/snipeit-install.sh new file mode 100644 index 000000000..53b1f20d1 --- /dev/null +++ b/install/snipeit-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + + +#Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (michelroegl-brunner) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + composer \ + git \ + sudo \ + mc \ + nginx \ + php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} \ + mariadb-server \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up database" +DB_NAME=snipeit_db +DB_USER=snipeit +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +mysql -u root -e "CREATE DATABASE $DB_NAME;" +mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "SnipeIT-Credentials" + echo "SnipeIT Database User: $DB_USER" + echo "SnipeIT Database Password: $DB_PASS" + echo "SnipeIT Database Name: $DB_NAME" +} >> ~/snipeit.creds +msg_ok "Set up database" + +msg_info "Installing Snipe-IT" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" +unzip -q v${RELEASE}.zip +mv snipe-it-${RELEASE} /opt/snipe-it + +cd /opt/snipe-it +cp .env.example .env +IPADDRESS=$(hostname -I | awk '{print $1}') + +sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \ + -e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \ + -e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \ + -e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env + +chown -R www-data: /opt/snipe-it +chmod -R 755 /opt/snipe-it + + +export COMPOSER_ALLOW_SUPERUSER=1 +$STD composer update --no-plugins --no-scripts +$STD composer install --no-dev --prefer-source --no-plugins --no-scripts + +$STD php artisan key:generate --force +msg_ok "Installed SnipeIT" + +msg_info "Creating Service" + +cat </etc/nginx/conf.d/snipeit.conf +server { + listen 80; + root /opt/snipe-it/public; + server_name $IPADDRESS; + index index.php; + + location / { + try_files \$uri \$uri/ /index.php?\$query_string; + } + + location ~ \.php\$ { + include fastcgi.conf; + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.+)\$; + fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; + include fastcgi_params; + } +} +EOF + +systemctl reload nginx +msg_ok "Configured 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" diff --git a/install/spoolman-install.sh b/install/spoolman-install.sh index a1351d00c..7d7a20dcf 100644 --- a/install/spoolman-install.sh +++ b/install/spoolman-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/Donkie/Spoolman source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" @@ -34,15 +34,15 @@ $STD apt-get install -y \ python3-setuptools \ python3-wheel \ python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED msg_ok "Installed Python3" msg_info "Installing Spoolman" RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) +cd /opt wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip unzip -q spoolman.zip -d spoolman rm -rf spoolman.zip -cd /opt/spoolman +cd spoolman $STD pip3 install -r requirements.txt wget -q https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example -O .env echo "${RELEASE}" >/opt/${APPLICATION}_version.txt diff --git a/install/teddycloud-install.sh b/install/teddycloud-install.sh new file mode 100644 index 000000000..75c04b12d --- /dev/null +++ b/install/teddycloud-install.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Dominik Siebel (dsiebel) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + libubsan1 \ + ffmpeg \ + curl \ + ca-certificates \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing TeddyCloud" +RELEASE="$(curl -s https://api.github.com/repos/toniebox-reverse-engineering/teddycloud/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')" +VERSION="${RELEASE#tc_v}" +wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip" +unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip" +ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud +echo "${VERSION}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed TeddyCloud" + +msg_info "Creating Service" +cat </etc/systemd/system/teddycloud.service +[Unit] +Description=TeddyCloud Server +After=network.target + +[Service] +User=root +Type=simple +ExecStart=/opt/teddycloud/teddycloud +WorkingDirectory=/opt/teddycloud +Restart=on-failure + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable --now -q teddycloud +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get --yes autoremove +$STD apt-get --yes autoclean +rm -rf "teddycloud.amd64.release_v${VERSION}.zip" +msg_ok "Cleaned" diff --git a/install/the-lounge-install.sh b/install/the-lounge-install.sh new file mode 100644 index 000000000..8b6bdefc0 --- /dev/null +++ b/install/the-lounge-install.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: kristocopani +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + gpg \ + wget \ + mc \ + wget \ + openssh-server +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 +$STD npm install --global yarn +msg_ok "Installed Node.js" + +msg_info "Installing The Lounge" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb +$STD dpkg -i ./thelounge_${RELEASE}_all.deb +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed The Lounge" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/thelounge_${RELEASE}_all.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/trilium-install.sh b/install/trilium-install.sh index dd2ae597d..8dc3512a7 100644 --- a/install/trilium-install.sh +++ b/install/trilium-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -18,6 +18,7 @@ $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc $STD apt-get install -y openssh-server +$STD apt-get install -y wget msg_ok "Installed Dependencies" RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') diff --git a/install/typesense-install.sh b/install/typesense-install.sh new file mode 100644 index 000000000..beab980ee --- /dev/null +++ b/install/typesense-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tlissak +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://typesense.org/ + +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 \ + mc \ + sudo \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing TypeSense" +RELEASE=$(curl -s https://api.github.com/repos/typesense/typesense/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +wget -q https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-amd64.deb +$STD apt install -y /opt/typesense-server-${RELEASE}-amd64.deb +echo 'enable-cors = true' >> /etc/typesense/typesense-server.ini +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +msg_ok "Installed TypeSense" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/typesense-server-${RELEASE}-amd64.deb +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/umami-install.sh b/install/umami-install.sh index 6f3c42d63..1b850aee2 100644 --- a/install/umami-install.sh +++ b/install/umami-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -39,7 +39,7 @@ msg_ok "Installed Node.js" msg_info "Setting up postgresql" DB_NAME=umamidb DB_USER=umami -DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 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;" diff --git a/install/unbound-install.sh b/install/unbound-install.sh new file mode 100644 index 000000000..387e57e75 --- /dev/null +++ b/install/unbound-install.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: wimb0 +# 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 "Installing Dependencies" +$STD apt-get install -y \ + sudo \ + curl \ + mc \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Installing Unbound" +$STD apt-get install -y \ + unbound \ + unbound-host +msg_info "Installed Unbound" + +cat </etc/unbound/unbound.conf.d/unbound.conf +server: + interface: 0.0.0.0 + port: 5335 + do-ip6: no + hide-identity: yes + hide-version: yes + harden-referral-path: yes + cache-min-ttl: 300 + cache-max-ttl: 14400 + serve-expired: yes + serve-expired-ttl: 3600 + prefetch: yes + prefetch-key: yes + target-fetch-policy: "3 2 1 1 1" + unwanted-reply-threshold: 10000000 + rrset-cache-size: 256m + msg-cache-size: 128m + so-rcvbuf: 1m + private-address: 192.168.0.0/16 + private-address: 169.254.0.0/16 + private-address: 172.16.0.0/12 + private-address: 10.0.0.0/8 + private-address: fd00::/8 + private-address: fe80::/10 + access-control: 192.168.0.0/16 allow + access-control: 172.16.0.0/12 allow + access-control: 10.0.0.0/8 allow + access-control: 127.0.0.1/32 allow + chroot: "" + logfile: /var/log/unbound.log +EOF + +touch /var/log/unbound.log +chown unbound:unbound /var/log/unbound.log + +systemctl restart unbound +msg_ok "Installed Unbound" + +msg_ok "Configuring Logrotate" +cat </etc/logrotate.d/unbound +/var/log/unbound.log { + daily + rotate 7 + missingok + notifempty + compress + delaycompress + sharedscripts + create 644 + postrotate + /usr/sbin/unbound-control log_reopen + endscript +} +EOF + +systemctl restart logrotate +msg_ok "Configured Logrotate" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/vikunja-install.sh b/install/vikunja-install.sh new file mode 100644 index 000000000..9245647bd --- /dev/null +++ b/install/vikunja-install.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (Canbiz) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + make \ + mc \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setup Vikunja (Patience)" +cd /opt +RELEASE=$(curl -s https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) +wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb" +$STD dpkg -i vikunja-$RELEASE-amd64.deb +sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml +sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml +sed -i 's|./files|/etc/vikunja/files|' /etc/vikunja/config.yml +systemctl start vikunja.service +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Vikunja" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opt/vikunja-$RELEASE-amd64.deb +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" diff --git a/install/wallos-install.sh b/install/wallos-install.sh index 0407b05fb..7c876dc30 100644 --- a/install/wallos-install.sh +++ b/install/wallos-install.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck # Co-Author: MickLesk (Canbiz) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/ellite/wallos source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" @@ -22,7 +22,10 @@ $STD apt-get install -y \ mc \ apache2 \ libapache2-mod-php \ - php8.2-{mbstring,gd,curl,intl,imagick,bz2,sqlite3,zip,xml} + php8.2-{mbstring,gd,curl,intl,imagick,bz2,sqlite3,zip,xml} \ + wget \ + openssh-server \ + cron msg_ok "Installed Dependencies" msg_info "Installing Wallos (Patience)" @@ -59,6 +62,7 @@ $STD curl http://localhost/endpoints/db/migrate.php msg_ok "Installed Wallos" msg_info "Setting up Crontabs" +mkdir -p /var/log/cron 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 @@ -78,4 +82,4 @@ 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 +msg_ok "Cleaned" diff --git a/install/wavelog-install.sh b/install/wavelog-install.sh new file mode 100644 index 000000000..5785d718e --- /dev/null +++ b/install/wavelog-install.sh @@ -0,0 +1,90 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Don Locke (DonLocke) +# License: MIT +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/wavelog/wavelog + +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 \ + libapache2-mod-php \ + mariadb-server \ + mc \ + php8.2-{curl,mbstring,mysql,xml,zip,gd} \ + sudo \ + unzip \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up Database" +DB_NAME=wavelog +DB_USER=waveloguser +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "Wavelog-Credentials" + echo "Wavelog Database User: $DB_USER" + echo "Wavelog Database Password: $DB_PASS" + echo "Wavelog Database Name: $DB_NAME" +} >> ~/wavelog.creds +msg_ok "Set up database" + +msg_info "Setting up PHP" +sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini +sed -i '/memory_limit/s/= .*/= 256M/' /etc/php/8.2/apache2/php.ini +sed -i '/upload_max_filesize/s/= .*/= 8M/' /etc/php/8.2/apache2/php.ini +msg_ok "Set up PHP" + +msg_info "Installing Wavelog" +RELEASE=$(curl -s https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv wavelog-${RELEASE}/ /opt/wavelog +chown -R www-data:www-data /opt/wavelog/ +find /opt/wavelog/ -type d -exec chmod 755 {} \; +find /opt/wavelog/ -type f -exec chmod 664 {} \; +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed Wavelog" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/wavelog.conf + + ServerAdmin webmaster@localhost + DocumentRoot /opt/wavelog + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/error.log + CustomLog /var/log/apache2/access.log combined + +EOF +$STD a2ensite wavelog.conf +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -f ${RELEASE}.zip +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/wireguard-install.sh b/install/wireguard-install.sh index 0b91425d9..f5aa93670 100644 --- a/install/wireguard-install.sh +++ b/install/wireguard-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -38,6 +38,19 @@ echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf $STD sysctl -p /etc/sysctl.conf msg_ok "Installed WGDashboard" +msg_info "Create Example Config for WGDashboard" +private_key=$(wg genkey) +cat </etc/wireguard/wg0.conf +[Interface] +PrivateKey = ${private_key} +Address = 10.0.0.1/24 +SaveConfig = true +PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; +PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; +ListenPort = 51820 +EOF +msg_ok "Created Example Config for WGDashboard" + msg_info "Creating Service" cat </etc/systemd/system/wg-dashboard.service [Unit] diff --git a/install/zabbix-install.sh b/install/zabbix-install.sh index b0280044d..2a0e56ab0 100644 --- a/install/zabbix-install.sh +++ b/install/zabbix-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,19 +14,21 @@ 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 wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Zabbix" -wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-1+debian12_all.deb -$STD dpkg -i zabbix-release_7.0-1+debian12_all.deb -rm zabbix-release_7.0-1+debian12_all.deb +cd /tmp +wget -q https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb +$STD dpkg -i /tmp/zabbix-release_latest+debian12_all.deb $STD apt-get update -$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent +$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts +$STD apt-get install -y zabbix-agent2 zabbix-agent2-plugin-* msg_ok "Installed Zabbix" msg_info "Setting up PostgreSQL" @@ -39,7 +41,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO $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'" -zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null +zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf @@ -52,14 +54,15 @@ echo -e "zabbix Database Name: \e[32m$DB_NAME\e[0m" >>~/zabbix.creds msg_ok "Set up PostgreSQL" msg_info "Starting Services" -systemctl restart zabbix-server zabbix-agent apache2 -systemctl enable -q zabbix-server zabbix-agent apache2 +systemctl restart zabbix-server zabbix-agent2 apache2 +systemctl enable -q --now zabbix-server zabbix-agent2 apache2 msg_ok "Started Services" motd_ssh customize msg_info "Cleaning up" +rm -rf /tmp/zabbix-release_latest+debian12_all.deb $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zammad-install.sh b/install/zammad-install.sh new file mode 100644 index 000000000..eea279ee6 --- /dev/null +++ b/install/zammad-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +#Copyright (c) 2021-2025 community-scripts ORG +# Author: Michel Roegl-Brunner (michelroegl-brunner) +# 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 "Installing Dependencies" +$STD apt-get install -y \ + curl \ + git \ + sudo \ + gpg \ + wget \ + nginx \ + apt-transport-https \ + gnupg \ + wget \ + openssh-server +msg_ok "Installed Dependencies" + +msg_info "Setting up Elasticsearch" +curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list >/dev/null +$STD apt-get update +$STD apt-get -y install elasticsearch +echo "-Xms2g" >>/etc/elasticsearch/jvm.options +echo "-Xmx2g" >>/etc/elasticsearch/jvm.options +$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b +systemctl -q restart elasticsearch +msg_ok "Setup Elasticsearch" + +msg_info "Installing Zammad" +curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | gpg --dearmor | sudo tee /etc/apt/keyrings/pkgr-zammad.gpg >/dev/null +echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/debian 12 main" | sudo tee /etc/apt/sources.list.d/zammad.list >/dev/null +$STD apt-get update +$STD apt-get -y install zammad +$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')" +$STD zammad run rake zammad:searchindex:rebuild +msg_ok "Installed Zammad" + +msg_info "Setup Services" +cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf +IPADDRESS=$(hostname -I | awk '{print $1}') +sed -i "s/server_name localhost;/server_name $IPADDRESS;/g" /etc/nginx/sites-available/zammad.conf +$STD systemctl reload nginx +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/install/zigbee2mqtt-install.sh b/install/zigbee2mqtt-install.sh index e3f01f53b..8dc8cedb6 100644 --- a/install/zigbee2mqtt-install.sh +++ b/install/zigbee2mqtt-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,23 +14,24 @@ 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 git -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + git \ + make \ + g++ \ + gcc \ + ca-certificates \ + gnupg \ + wget \ + openssh-server 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 +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" @@ -38,49 +39,47 @@ $STD apt-get update $STD apt-get install -y nodejs msg_ok "Installed Node.js" -msg_info "Setting up Zigbee2MQTT Repository" -$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt -msg_ok "Set up Zigbee2MQTT Repository" +msg_info "Installing pnpm" +$STD npm install -g pnpm +msg_ok "Installed pnpm" -read -r -p "Switch to Edge/dev branch? (y/N) " prompt -if [[ $prompt == "y" ]]; then - DEV="y" -else - DEV="n" -fi - -msg_info "Installing Zigbee2MQTT" +msg_info "Setting up Zigbee2MQTT" +cd /opt +RELEASE=$(curl -s https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') +wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip" +unzip -q ${RELEASE}.zip +mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt +cd /opt/zigbee2mqtt/data +mv configuration.example.yaml configuration.yaml cd /opt/zigbee2mqtt -if [[ $DEV == "y" ]]; then -$STD git fetch origin dev:dev -$STD git checkout dev -$STD git pull -fi -$STD npm ci +$STD pnpm install --frozen-lockfile +$STD pnpm build msg_ok "Installed Zigbee2MQTT" msg_info "Creating Service" -service_path="/etc/systemd/system/zigbee2mqtt.service" -echo "[Unit] +cat </etc/systemd/system/zigbee2mqtt.service +[Unit] Description=zigbee2mqtt After=network.target [Service] Environment=NODE_ENV=production -ExecStart=/usr/bin/npm start +ExecStart=/usr/bin/pnpm start WorkingDirectory=/opt/zigbee2mqtt StandardOutput=inherit StandardError=inherit Restart=always User=root [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable zigbee2mqtt.service +WantedBy=multi-user.target +EOF +systemctl enable -q --now zigbee2mqtt.service msg_ok "Created Service" motd_ssh customize msg_info "Cleaning up" +rm -rf /opt/${RELEASE}.zip $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned" diff --git a/install/zwave-js-ui-install.sh b/install/zwave-js-ui-install.sh index 74c360c17..4d0ee268f 100644 --- a/install/zwave-js-ui-install.sh +++ b/install/zwave-js-ui-install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -# Copyright (c) 2021-2024 tteck +# Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT -# https://github.com/tteck/Proxmox/raw/main/LICENSE +# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" color @@ -14,35 +14,45 @@ 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 wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Z-Wave JS UI" -mkdir /opt/zwave-js-ui +mkdir -p /opt/zwave-js-ui +mkdir -p /opt/zwave_store cd /opt/zwave-js-ui RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') -$STD wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip -$STD unzip zwave-js-ui-${RELEASE}-linux-arm64.zip +wget -q https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip +unzip -q zwave-js-ui-${RELEASE}-linux-arm64.zip +cat </opt/.env +ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave_store/.config-db +STORE_DIR=/opt/zwave_store +EOF +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed Z-Wave JS UI" msg_info "Creating Service" -service_path="/etc/systemd/system/zwave-js-ui.service" -echo "[Unit] +cat < /etc/systemd/system/zwave-js-ui.service +[Unit] Description=zwave-js-ui Wants=network-online.target After=network-online.target + [Service] User=root WorkingDirectory=/opt/zwave-js-ui ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux +EnvironmentFile=/opt/.env + [Install] -WantedBy=multi-user.target" >$service_path -systemctl start zwave-js-ui -$STD systemctl enable zwave-js-ui +WantedBy=multi-user.target +EOF +systemctl enable -q --now zwave-js-ui msg_ok "Created Service" motd_ssh