This commit is contained in:
Omar
2025-05-18 22:09:30 -04:00
273 changed files with 19680 additions and 7812 deletions

View File

@@ -0,0 +1,85 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bitmagnet-io/bitmagnet
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing dependencies"
$STD apk add --no-cache \
gcc \
musl-dev \
git \
iproute2-ss \
sudo
$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go
msg_ok "Installed dependencies"
msg_info "Installing PostgreSQL"
$STD apk add --no-cache \
postgresql16 \
postgresql16-contrib \
postgresql16-openrc
$STD rc-update add postgresql
$STD rc-service postgresql start
msg_ok "Installed PostreSQL"
RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing bitmagnet v${RELEASE}"
mkdir -p /opt/bitmagnet
temp_file=$(mktemp)
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet
VREL=v$RELEASE
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}"
read -rp "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
msg_info "Enabling bitmagnet Service"
cat <<EOF >/etc/init.d/bitmagnet
#!/sbin/openrc-run
description="bitmagnet Service"
directory="/opt/bitmagnet"
command="/opt/bitmagnet/bitmagnet"
command_args="worker run --all"
command_background="true"
command_user="root"
pidfile="/var/run/bitmagnet.pid"
depend() {
use net
}
start_pre() {
export TMDB_API_KEY="$tmdbapikey"
}
EOF
chmod +x /etc/init.d/bitmagnet
$STD rc-update add bitmagnet default
msg_ok "Enabled bitmagnet Service"
msg_info "Starting bitmagnet"
$STD service bitmagnet start
msg_ok "Started bitmagnet"
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apk cache clean
msg_ok "Cleaned"

View File

@@ -1,40 +0,0 @@
#!/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: https://gitea.io/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add \
newt \
curl \
openssh \
nano \
mc \
gpg
msg_ok "Installed Dependencies"
msg_info "Installing Gitea"
apk add --no-cache gitea
msg_ok "Installed Gitea"
msg_info "Enabling Gitea Service"
rc-update add gitea default
msg_ok "Enabled Gitea Service"
msg_info "Starting Gitea"
service gitea start
msg_ok "Started Gitea"
motd_ssh
customize

View File

@@ -4,8 +4,8 @@
# Author: tteck (tteckster)
# License: MIT
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors

View File

@@ -1,64 +0,0 @@
#!/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: https://mariadb.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add \
newt \
curl \
openssh \
nano \
mc \
gpg
msg_ok "Installed Dependencies"
msg_info "Installing MariaDB"
$STD apk add --no-cache mariadb mariadb-client
$STD rc-update add mariadb default
$STD rc-service mariadb start
msg_ok "Installed MariaDB"
msg_info "Configuring MariaDB"
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql >/dev/null 2>&1
$STD rc-service mariadb restart
msg_ok "MariaDB Configured"
read -r -p "Would you like to install Adminer with lighthttpd? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer"
$STD apk add --no-cache lighttpd php php-cgi php-mysqli php-mbstring php-zip php-gd php-json php-curl jq
sed -i 's|server.modules += ( "mod_cgi" )|server.modules += ( "mod_cgi", "mod_fastcgi" )|' /etc/lighttpd/lighttpd.conf
echo 'fastcgi.server += ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/php-cgi.sock" )))' >>/etc/lighttpd/lighttpd.conf
ADMINER_VERSION=$(curl -s https://api.github.com/repos/vrana/adminer/releases/latest | jq -r '.tag_name' | sed 's/v//')
wget -q -O /var/www/adminer.php "https://github.com/vrana/adminer/releases/download/v${ADMINER_VERSION}/adminer-${ADMINER_VERSION}.php"
chown lighttpd:lighttpd /var/www/adminer.php
chmod 755 /var/www/adminer.php
msg_ok "Adminer Installed"
msg_info "Starting Lighttpd"
$STD rc-update add lighttpd default
$STD rc-service lighttpd restart
msg_ok "Lighttpd Started"
echo -e "Adminer is available at: ${BL}http://$(hostname -I | awk '{print $1}')/adminer${CL}"
else
echo -e "Skipped Adminer Installation..."
fi
motd_ssh
customize
msg_info "Cleaning up"
msg_ok "Cleaned"

View File

@@ -1,61 +0,0 @@
#!/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: https://nodered.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add --no-cache \
newt \
curl \
openssh \
nano \
mc \
gpg \
git \
nodejs \
npm
msg_ok "Installed Dependencies"
msg_info "Creating Node-RED User"
adduser -D -H -s /sbin/nologin -G users nodered
msg_ok "Created Node-RED User"
msg_info "Installing Node-RED"
npm install -g --unsafe-perm node-red
msg_ok "Installed Node-RED"
msg_info "Creating Node-RED Service"
service_path="/etc/init.d/nodered"
echo '#!/sbin/openrc-run
description="Node-RED Service"
command="/usr/bin/node-red"
command_args="--max-old-space-size=128 -v"
command_user="nodered"
pidfile="/var/run/nodered.pid"
depend() {
use net
}' >$service_path
chmod +x $service_path
$STD rc-update add nodered default
msg_ok "Created Node-RED Service"
msg_info "Starting Node-RED"
$STD service nodered start
msg_ok "Started Node-RED"
motd_ssh
customize

View File

@@ -1,108 +0,0 @@
#!/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: https://www.postgresql.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add \
newt \
curl \
openssh \
nano \
mc \
gpg
msg_ok "Installed Dependencies"
msg_info "Installing PostgreSQL and Dependencies"
apk add --no-cache postgresql postgresql-contrib
msg_ok "Installed PostgreSQL"
msg_info "Initializing PostgreSQL Database"
mkdir -p /var/lib/postgresql
chown postgres:postgres /var/lib/postgresql
sudo -u postgres initdb -D /var/lib/postgresql/data
msg_ok "Initialized PostgreSQL Database"
msg_info "Creating PostgreSQL Service"
service_path="/etc/init.d/postgresql"
echo '#!/sbin/openrc-run
description="PostgreSQL Database Server"
command="/usr/bin/postgres"
command_args="-D /var/lib/postgresql/data"
command_user="postgres"
pidfile="/var/run/postgresql.pid"
depend() {
use net
}' >$service_path
chmod +x $service_path
rc-update add postgresql default
msg_ok "Created PostgreSQL Service"
msg_info "Starting PostgreSQL"
service postgresql start
msg_ok "Started PostgreSQL"
read -p "Do you want to install Adminer with Lighttpd? (y/N): " install_adminer
if [[ "$install_adminer" =~ ^[Yy]$ ]]; then
msg_info "Installing Adminer with Lighttpd"
apk add --no-cache lighttpd php php-pdo_pgsql php-session php-json php-mbstring
msg_ok "Installed Lighttpd and PHP"
msg_info "Downloading Adminer"
mkdir -p /var/www/adminer
curl -L "https://www.adminer.org/latest.php" -o /var/www/adminer/index.php
chown -R lighttpd:lighttpd /var/www/adminer
msg_ok "Installed Adminer"
msg_info "Configuring Lighttpd"
echo 'server.modules = (
"mod_access",
"mod_alias",
"mod_fastcgi"
)
server.document-root = "/var/www/adminer"
server.port = 8080
server.bind = "0.0.0.0"
index-file.names = ("index.php")
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/var/run/php-fcgi.sock"
)))
server.dir-listing = "disable"
accesslog.filename = "/var/log/lighttpd/access.log"
server.errorlog = "/var/log/lighttpd/error.log"
include "modules.conf"' > /etc/lighttpd/lighttpd.conf
rc-update add lighttpd default
msg_ok "Configured Lighttpd"
msg_info "Starting Lighttpd"
service lighttpd start
msg_ok "Started Lighttpd (Adminer available on Port 8080)"
else
msg_ok "Skipped Adminer and Lighttpd installation."
fi
}
motd_ssh
customize

View File

@@ -1,40 +0,0 @@
#!/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: https://prometheus.io/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add \
newt \
curl \
openssh \
nano \
mc \
gpg
msg_ok "Installed Dependencies"
msg_info "Installing Prometheus"
apk add --no-cache prometheus
msg_ok "Installed Prometheus"
msg_info "Enabling Prometheus Service"
rc-update add prometheus default
msg_ok "Enabled Prometheus Service"
msg_info "Starting Prometheus"
service prometheus start
msg_ok "Started Prometheus"
motd_ssh
customize

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://syncthing.net/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Setup Syncthing"
$STD apk add --no-cache syncthing
msg_ok "Setup Syncthing"
msg_info "Enabling Syncthing Service"
$STD rc-update add syncthing default
msg_ok "Enabled Syncthing Service"
msg_info "Starting Syncthing"
$STD rc-service syncthing start
msg_ok "Started Syncthing"
motd_ssh
customize

View File

@@ -1,32 +0,0 @@
#!/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: https://www.wireguard.com/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apk add \
newt \
curl \
openssh \
nano \
mc \
gpg
msg_ok "Installed Dependencies"
msg_info "Installing WireGuard"
apk add --no-cache wireguard-tools
msg_ok "Installed WireGuard"
motd_ssh
customize

View File

@@ -0,0 +1,108 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | http
# Source: https://github.com/babybuddy/babybuddy
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 \
uwsgi \
uwsgi-plugin-python3 \
libopenjp2-7-dev \
libpq-dev \
nginx \
python3
msg_ok "Installed Dependencies"
setup_uv
msg_info "Installing Babybuddy"
RELEASE=$(curl -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
temp_file=$(mktemp)
mkdir -p /opt/{babybuddy,data}
curl -fsSL "https://github.com/babybuddy/babybuddy/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/babybuddy
cd /opt/babybuddy
$STD uv venv .venv
$STD source .venv/bin/activate
$STD uv pip install -r requirements.txt
cp babybuddy/settings/production.example.py babybuddy/settings/production.py
SECRET_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
ALLOWED_HOSTS=$(hostname -I | tr ' ' ',' | sed 's/,$//')",127.0.0.1,localhost"
sed -i \
-e "s/^SECRET_KEY = \"\"/SECRET_KEY = \"$SECRET_KEY\"/" \
-e "s/^ALLOWED_HOSTS = \[\"\"\]/ALLOWED_HOSTS = \[$(echo \"$ALLOWED_HOSTS\" | sed 's/,/\",\"/g')\]/" \
babybuddy/settings/production.py
export DJANGO_SETTINGS_MODULE=babybuddy.settings.production
$STD python manage.py migrate
chown -R www-data:www-data /opt/data
chmod 640 /opt/data/db.sqlite3
chmod 750 /opt/data
msg_ok "Installed Babybuddy"
msg_info "Configuring uWSGI"
cat <<EOF >/etc/uwsgi/apps-available/babybuddy.ini
[uwsgi]
plugins = python3
project = babybuddy
base_dir = /opt/babybuddy
chdir = %(base_dir)
virtualenv = %(base_dir)/.venv
module = %(project).wsgi:application
env = DJANGO_SETTINGS_MODULE=%(project).settings.production
master = True
vacuum = True
socket = /var/run/uwsgi/app/babybuddy/socket
chmod-socket = 660
uid = www-data
gid = www-data
EOF
ln -sf /etc/uwsgi/apps-available/babybuddy.ini /etc/uwsgi/apps-enabled/babybuddy.ini
service uwsgi restart
msg_ok "Configured uWSGI"
msg_info "Configuring NGINX"
cat <<EOF >/etc/nginx/sites-available/babybuddy
upstream babybuddy {
server unix:///var/run/uwsgi/app/babybuddy/socket;
}
server {
listen 80;
server_name _;
location / {
uwsgi_pass babybuddy;
include uwsgi_params;
}
location /media {
alias /opt/data/media;
}
}
EOF
ln -sf /etc/nginx/sites-available/babybuddy /etc/nginx/sites-enabled/babybuddy
rm /etc/nginx/sites-enabled/default
systemctl enable -q --now nginx
service nginx reload
msg_ok "Configured NGINX"
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: ksad (enirys31)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://garethgeorge.github.io/backrest/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Backrest"
RELEASE=$(curl -fsSL https://api.github.com/repos/garethgeorge/backrest/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
mkdir -p /opt/backrest/{bin,config,data}
cd /opt/backrest/bin
curl -fsSL "https://github.com/garethgeorge/backrest/releases/download/v${RELEASE}/backrest_Linux_x86_64.tar.gz" -o "backrest_Linux_x86_64.tar.gz"
tar -xzf backrest_Linux_x86_64.tar.gz
chmod +x backrest
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Backrest"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/backrest.service
[Unit]
Description=Backrest
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/backrest/bin/backrest
Environment="BACKREST_PORT=9898"
Environment="BACKREST_CONFIG=/opt/backrest/config/config.json"
Environment="BACKREST_DATA=/opt/backrest/data"
Environment="XDG_CACHE_HOME=/opt/backrest/cache"
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now backrest
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
rm -rf backrest_Linux_x86_64.tar.gz
rm -f install.sh uninstall.sh
msg_ok "Cleaned"

View File

@@ -0,0 +1,220 @@
#!/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: https://github.com/karlomikus/bar-assistant
# Source: https://github.com/karlomikus/vue-salt-rim
# Source: https://www.meilisearch.com/
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 \
composer \
redis-server \
npm \
nginx \
lsb-release \
libvips
msg_ok "Installed Dependencies"
msg_info "Adding PHP8.4 Repository"
$STD curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
$STD dpkg -i /tmp/debsuryorg-archive-keyring.deb
$STD sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
$STD apt-get update
msg_ok "Added PHP8.4 Repository"
msg_info "Installing / configuring PHP"
$STD apt-get remove -y php8.2*
$STD apt-get install -y \
php8.4 \
php8.4-{ffi,opcache,redis,zip,pdo-sqlite,bcmath,pdo,curl,dom,fpm}
PHPVER=$(php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION . "\n";')
sed -i.bak -E 's/^\s*;?\s*ffi\.enable\s*=.*/ffi.enable=true/' /etc/php/${PHPVER}/fpm/php.ini
$STD systemctl reload php${PHPVER}-fpm
msg_info "Installed / configured PHP"
msg_info "Installing MeiliSearch"
cd /opt
RELEASE_MEILISEARCH=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o meilisearch.deb
$STD dpkg -i meilisearch.deb
curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml
MASTER_KEY=$(openssl rand -base64 12)
sed -i \
-e 's|^env =.*|env = "production"|' \
-e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
-e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
-e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
-e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
-e 's|^# no_analytics = true|no_analytics = true|' \
-e 's|^http_addr =.*|http_addr = "127.0.0.1:7700"|' \
/etc/meilisearch.toml
echo "${RELEASE_MEILISEARCH}" >/opt/meilisearch_version.txt
msg_ok "Installed MeiliSearch"
msg_info "Creating MeiliSearch service"
cat <<EOF >/etc/systemd/system/meilisearch.service
[Unit]
Description=Meilisearch
After=network.target
[Service]
ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now meilisearch
msg_ok "Created Service MeiliSearch"
msg_info "Installing Bar Assistant"
# RELEASE_BARASSISTANT=$(curl -s https://api.github.com/repos/karlomikus/bar-assistant/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
RELEASE_BARASSISTANT="5.3.0"
cd /opt
curl -fsSL "https://github.com/karlomikus/bar-assistant/archive/refs/tags/v${RELEASE_BARASSISTANT}.zip" -o barassistant.zip
unzip -q barassistant.zip
mv /opt/bar-assistant-${RELEASE_BARASSISTANT}/ /opt/bar-assistant
cd /opt/bar-assistant
cp /opt/bar-assistant/.env.dist /opt/bar-assistant/.env
MeiliSearch_API_KEY=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"key":"[^"]*"' | head -n 1 | sed 's/"key":"//;s/"//')
MeiliSearch_API_KEY_UID=$(curl -s -X GET 'http://127.0.0.1:7700/keys' -H "Authorization: Bearer $MASTER_KEY" | grep -o '"uid":"[^"]*"' | head -n 1 | sed 's/"uid":"//;s/"//')
LOCAL_IP=$(hostname -I | awk '{print $1}')
sed -i -e "s|^APP_URL=|APP_URL=http://${LOCAL_IP}/bar/|" \
-e "s|^MEILISEARCH_HOST=|MEILISEARCH_HOST=http://127.0.0.1:7700|" \
-e "s|^MEILISEARCH_KEY=|MEILISEARCH_KEY=${MASTER_KEY}|" \
-e "s|^MEILISEARCH_API_KEY=|MEILISEARCH_API_KEY=${MeiliSearch_API_KEY}|" \
-e "s|^MEILISEARCH_API_KEY_UID=|MEILISEARCH_API_KEY_UID=${MeiliSearch_API_KEY_UID}|" \
/opt/bar-assistant/.env
$STD composer install --no-interaction
$STD php artisan key:generate
touch storage/bar-assistant/database.ba3.sqlite
$STD php artisan migrate --force
$STD php artisan storage:link
$STD php artisan bar:setup-meilisearch
$STD php artisan scout:sync-index-settings
$STD php artisan config:cache
$STD php artisan route:cache
$STD php artisan event:cache
mkdir /opt/bar-assistant/storage/bar-assistant/uploads/temp
chown -R www-data:www-data /opt/bar-assistant
echo "${RELEASE_BARASSISTANT}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Bar Assistant"
msg_info "Installing Salt Rim"
RELEASE_SALTRIM=$(curl -s https://api.github.com/repos/karlomikus/vue-salt-rim/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt
curl -fsSL "https://github.com/karlomikus/vue-salt-rim/archive/refs/tags/v${RELEASE_SALTRIM}.zip" -o saltrim.zip
unzip -q saltrim.zip
mv /opt/vue-salt-rim-${RELEASE_SALTRIM}/ /opt/vue-salt-rim
cd /opt/vue-salt-rim
cat <<EOF >/opt/vue-salt-rim/public/config.js
window.srConfig = {}
window.srConfig.API_URL = "http://${LOCAL_IP}/bar"
window.srConfig.MEILISEARCH_URL = "http://${LOCAL_IP}/search"
EOF
$STD npm install
$STD npm run build
echo "${RELEASE_SALTRIM}" >/opt/vue-salt-rim_version.txt
msg_ok "Installed Salt Rim"
msg_info "Creating Service"
cat <<EOF >/etc/nginx/sites-available/barassistant.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
client_max_body_size 100M;
location /bar/ {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location /search/ {
proxy_pass http://127.0.0.1:7700/;
}
location / {
proxy_pass http://127.0.0.1:8081/;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
}
server {
listen 127.0.0.1:8080;
server_name example.com;
root /opt/bar-assistant/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
include fastcgi_params;
fastcgi_hide_header X-Powered-By;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
server {
listen 127.0.0.1:8081;
server_name _;
root /opt/vue-salt-rim/dist;
location / {
try_files \$uri \$uri/ /index.html;
}
}
EOF
ln -s /etc/nginx/sites-available/barassistant.conf /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
$STD systemctl reload nginx
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/meilisearch.deb
rm -rf "/opt/barassistant.zip"
rm -rf "/opt/saltrim.zip"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,78 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bitmagnet-io/bitmagnet
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 \
iproute2 \
gcc \
musl-dev
msg_ok "Installed Dependencies"
PG_VERSION="16" install_postgresql
install_go
RELEASE=$(curl -fsSL https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Installing bitmagnet v${RELEASE}"
mkdir -p /opt/bitmagnet
temp_file=$(mktemp)
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
cd /opt/bitmagnet
VREL=v$RELEASE
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$VREL"
chmod +x bitmagnet
POSTGRES_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$POSTGRES_PASSWORD';"
$STD sudo -u postgres psql -c "CREATE DATABASE bitmagnet;"
{
echo "PostgreSQL Credentials"
echo ""
echo "postgres user password: $POSTGRES_PASSWORD"
} >>~/postgres.creds
echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}"
read -r -p "${TAB3}Enter your TMDB API key if you have one: " tmdbapikey
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bitmagnet-web.service
[Unit]
Description=bitmagnet Web GUI
After=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/bitmagnet
ExecStart=/opt/bitmagnet/bitmagnet worker run --all
Environment=POSTGRES_HOST=localhost
Environment=POSTGRES_PASSWORD=$POSTGRES_PASSWORD
Environment=TMDB_API_KEY=$tmdbapikey
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bitmagnet-web
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,66 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/bluecherrydvr/
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 python3-distutils
msg_ok "Installed Dependencies"
install_mariadb
msg_info "Setting up Bluecherry"
export DEBIAN_FRONTEND=noninteractive
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
MYSQL_ROOT_PASS="$(openssl rand -base64 18 | cut -c1-13)"
curl -fsSL https://dl.bluecherrydvr.com/key/bluecherry.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/bluecherry.gpg
echo "deb http://dl.bluecherrydvr.com bookworm main" >/etc/apt/sources.list.d/bluecherry.list
$STD apt-get update
echo "bluecherry bluecherry/db_host string localhost" | debconf-set-selections
echo "bluecherry bluecherry/db_name string bluecherry" | debconf-set-selections
echo "bluecherry bluecherry/db_password password $DB_PASS" | debconf-set-selections
echo "bluecherry bluecherry/db_user string bluecherry" | debconf-set-selections
echo "bluecherry bluecherry/mysql_admin_login string root" | debconf-set-selections
echo "bluecherry bluecherry/mysql_admin_password password $MYSQL_ROOT_PASS" | debconf-set-selections
$STD apt-get install bluecherry
msg_ok "Done setting up bluecherry"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/bluecherry.service
[Unit]
Description=bluecherry Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/bluecherry
ExecStart=/opt/bluecherry/bluecherry
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now bluecherry
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
motd_ssh
customize

View File

@@ -1,205 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/crocodilestick/Calibre-Web-Automated
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 \
build-essential \
imagemagick \
git \
libldap2-dev \
libsasl2-dev \
ghostscript \
libldap-2.5-0 \
libmagic1 \
libsasl2-2 \
libxi6 \
libxslt1.1 \
python3-pip \
python3-venv \
xdg-utils \
inotify-tools \
sqlite3
msg_ok "Installed Dependencies"
msg_info "Installing Kepubify"
mkdir -p /opt/kepubify
cd /opt/kepubify
curl -fsSLO https://github.com/pgaskin/kepubify/releases/latest/download/kepubify-linux-64bit &>/dev/null
chmod +x kepubify-linux-64bit
msg_ok "Installed Kepubify"
msg_info "Installing Calibre-Web (Patience)"
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
mkdir -p /opt/calibre-web
$STD apt-get install -y calibre
$STD curl -fsSL -o /opt/calibre-web/metadata.db https://github.com/janeczku/calibre-web/raw/master/library/metadata.db
$STD pip install calibreweb[goodreads,metadata,kobo]
$STD pip install jsonschema
msg_ok "Installed Calibre-Web"
msg_info "Creating Calibre-Web Service"
cat <<EOF >/etc/systemd/system/cps.service
[Unit]
Description=Calibre-Web Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/calibre-web
ExecStart=/usr/local/bin/cps
TimeoutStopSec=20
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
msg_ok "Service file created"
msg_info "Starting and then stopping Calibre-Web Service"
systemctl start cps && sleep 5 && systemctl stop cps
msg_ok "Calibre-Web Service successfully cycled"
msg_info "Setup ${APPLICATION}"
RELEASE=$(curl -s https://api.github.com/repos/crocodilestick/Calibre-Web-Automated/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
$STD git clone https://github.com/crocodilestick/Calibre-Web-Automated.git /opt/cwa --single-branch
cd /opt/cwa
$STD git checkout V${RELEASE}
$STD pip install -r requirements.txt
curl -fsSL https://gist.githubusercontent.com/vhsdream/2e81afeff139c5746db1ede88c01cc7b/raw/51238206e87aec6c0abeccce85dec9f2b0c89000/proxmox-lxc.patch -o /opt/cwa.patch # not for production
$STD git apply --whitespace=fix /opt/cwa.patch # not for production
cd scripts
chmod +x check-cwa-services.sh ingest-service.sh change-detector.sh
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup ${APPLICATION}"
msg_info "Creating necessary files & directories"
mkdir -p /opt/cwa-book-ingest
mkdir -p /var/lib/cwa/{metadata_change_logs,metadata_temp,processed_books,log_archive,.cwa_conversion_tmp}
mkdir -p /var/lib/cwa/processed_books/{converted,imported,failed,fixed_originals}
touch /var/lib/cwa/convert-library.log
msg_ok "Directories & files created"
msg_info "Copying patched Calibre-Web files into local Python lib folder"
cp -r /opt/cwa/root/app/calibre-web/cps/* /usr/local/lib/python3*/dist-packages/calibreweb/cps
msg_ok "Files copied"
msg_info "Creating Services and Timers"
cat <<EOF >/etc/systemd/system/cwa-autolibrary.service
[Unit]
Description=Calibre-Web Automated Auto-Library Service
After=network.target cps.service
[Service]
Type=simple
WorkingDirectory=/opt/cwa
ExecStart=/usr/bin/python3 /opt/cwa/scripts/auto_library.py
TimeoutStopSec=10
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/cwa-ingester.service
[Unit]
Description=Calibre-Web Automated Ingest Service
After=network.target cps.service cwa-autolibrary.service
[Service]
Type=simple
WorkingDirectory=/opt/cwa
ExecStart=/usr/bin/bash -c /opt/cwa/scripts/ingest-service.sh
TimeoutStopSec=10
KillMode=mixed
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/cwa-change-detector.service
[Unit]
Description=Calibre-Web Automated Metadata Change Detector Service
After=network.target cps.service cwa-autolibrary.service
[Service]
Type=simple
WorkingDirectory=/opt/cwa
ExecStart=/usr/bin/bash -c /opt/cwa/scripts/change-detector.sh
TimeoutStopSec=10
KillMode=mixed
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/cwa.target
[Unit]
Description=Calibre-Web Automated Services
After=network-online.target
Wants=cps.service cwa-autolibrary.service cwa-ingester.service cwa-change-detector.service cwa-autozip.timer
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/cwa-autozip.service
[Unit]
Description=Calibre-Web Automated Nightly Auto-Zip Backup Service
After=network.target cps.service
[Service]
Type=simple
WorkingDirectory=/var/lib/cwa/processed_books
ExecStart=/usr/bin/python3 /opt/cwa/scripts/auto_zip.py
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/cwa-autozip.timer
[Unit]
Description=Calibre-Web Automated Nightly Auto-Zip Backup Timer
RefuseManualStart=no
RefuseManualStop=no
[Timer]
Persistent=true
# run every day at 11:59PM
OnCalendar=*-*-* 23:59:00
Unit=cwa-autozip.service
[Install]
WantedBy=timers.target
EOF
systemctl enable -q --now cwa.target
msg_ok "Created Services and Timers"
motd_ssh
customize
# Cleanup
msg_info "Cleaning up"
rm -rf /opt/cwa.patch
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,102 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: edoardop13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/favonia/cloudflare-ddns
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing dependencies"
install_go
msg_ok "Installed dependencies"
# msg_info "Installing Go"
# GO_VERSION=$(curl -s https://go.dev/VERSION?m=text | grep -m1 '^go')
# GO_TARBALL="${GO_VERSION}.linux-amd64.tar.gz"
# GO_URL="https://go.dev/dl/${GO_TARBALL}"
# INSTALL_DIR="/usr/bin"
# rm -rf "${INSTALL_DIR}/go"
# curl -LO "$GO_URL"
# tar -C "$INSTALL_DIR" -xzf "$GO_TARBALL"
# echo 'export PATH=$PATH:/usr/bin/go/bin' >>~/.bashrc
# source ~/.bashrc
# msg_ok "Installed Go"
msg_info "Configure Application"
var_cf_api_token="default"
read -rp "Enter the Cloudflare API token: " var_cf_api_token
var_cf_domains="default"
read -rp "Enter the domains separated with a comma (*.example.org,www.example.org) " var_cf_domains
var_cf_proxied="false"
while true; do
read -rp "Proxied? (y/n): " answer
case "$answer" in
[Yy]*)
var_cf_proxied="true"
break
;;
[Nn]*)
var_cf_proxied="false"
break
;;
*) echo "Please answer y or n." ;;
esac
done
var_cf_ip6_provider="none"
while true; do
read -rp "Enable IPv6 support? (y/n): " answer
case "$answer" in
[Yy]*)
var_cf_ip6_provider="auto"
break
;;
[Nn]*)
var_cf_ip6_provider="none"
break
;;
*) echo "Please answer y or n." ;;
esac
done
msg_ok "Configured Application"
msg_info "Setting up service"
mkdir -p /root/go
cat <<EOF >/etc/systemd/system/cloudflare-ddns.service
[Unit]
Description=Cloudflare DDNS Service (Go run)
After=network.target
[Service]
Environment="CLOUDFLARE_API_TOKEN=${var_cf_api_token}"
Environment="DOMAINS=${var_cf_domains}"
Environment="PROXIED=${var_cf_proxied}"
Environment="IP6_PROVIDER=${var_cf_ip6_provider}"
Environment="GOPATH=/root/go"
Environment="GOCACHE=/tmp/go-build"
ExecStart=/usr/bin/go/bin/go run github.com/favonia/cloudflare-ddns/cmd/ddns@latest
Restart=always
RestartSec=300
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now cloudflare-ddns
msg_ok "Setup Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
#rm -f "$GO_TARBALL"
msg_ok "Cleaned"

View File

@@ -1 +0,0 @@

View File

@@ -5,7 +5,7 @@
# License: MIT
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@@ -14,9 +14,88 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y python3
#$STD apt-get install -y gnup
msg_ok "Installed Dependencies"
PHP_VERSION=8.2 PHP_FPM=YES install_php
install_composer
# Example Setting for Test
#NODE_MODULE="pnpm@10.1,yarn"
#RELEASE=$(curl_handler -fsSL https://api.github.com/repos/babybuddy/babybuddy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
#msg_ok "Get Release $RELEASE"
#NODE_VERSION="22" NODE_MODULE="yarn" install_node_and_modules
#PG_VERSION="15"
#MARIADB_VERSION="11.8"
#MYSQL_VERSION="8.0"
#install_postgresql
#install_mariadb
#install_mysql
# msg_info "Setup DISTRO env"
# DISTRO="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
# msg_ok "Setup DISTRO"
# echo -e $DISTRO
# msg_info "Setting up PostgreSQL Repository"
# curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
# echo "deb https://apt.postgresql.org/pub/repos/apt ${DISTRO}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
# apt-get update
# $STD apt-get install -y postgresql
# msg_ok "Set up PostgreSQL Repository"
# msg_info "Setting up Matrix Server"
# curl -fsSL https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg -o /usr/share/keyrings/matrix-org-archive-keyring.gpg
# echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian ${DISTRO} main" >/etc/apt/sources.list.d/matrix-org.list
# apt-get update
# $STD apt-get install -y matrix-synapse-py3
# msg_info "Set up Matrix Server"
# msg_info "Setup EVCC"
# curl -fsSL https://dl.evcc.io/public/evcc/stable/gpg.EAD5D0E07B0EC0FD.key | gpg --dearmor -o /etc/apt/keyrings/evcc-stable.gpg
# echo "deb [signed-by=/etc/apt/keyrings/evcc-stable.gpg] https://dl.evcc.io/public/evcc/stable/deb/debian ${DISTRO} main" >/etc/apt/sources.list.d/evcc-stable.list
# apt-get update
# $STD apt-get install -y evcc
# msg_ok "Setup EVCC"
# msg_info "Setup PHP"
# curl -fsSL https://packages.sury.org/php/apt.gpg -o /usr/share/keyrings/deb.sury.org-php.gpg
# echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ ${DISTRO} main" >/etc/apt/sources.list.d/php.list
# apt-get update
# $STD apt-get install -y php
# msg_ok "Setup PHP"
# msg_info "Adding Adoptium repository"
# curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /etc/apt/trusted.gpg.d/adoptium.gpg
# echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/adoptium.gpg] https://packages.adoptium.net/artifactory/deb ${DISTRO} main" > /etc/apt/sources.list.d/adoptium.list
# apt-get update
# $STD apt-get install -y temurin-11-jdk
# msg_ok "Adoptium installed"
# msg_info "Adding Nginx repository"
# curl -fsSL https://nginx.org/keys/nginx_signing.key | gpg --dearmor -o /usr/share/keyrings/nginx-archive-keyring.gpg
# echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian ${DISTRO} nginx" > /etc/apt/sources.list.d/nginx.list
# apt-get update
# $STD apt-get install -y nginx=1.26.3*
# msg_ok "Nginx installed"
# msg_info "Adding MongoDB repository"
# curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg
# echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian ${DISTRO}/mongodb-org/7.0 main" > /etc/apt/sources.list.d/mongodb-org-7.0.list
# apt-get update
# $STD apt-get install -y mongodb-org
# msg_ok "MongoDB installed"
# msg_info "Adding SFTPGo repository"
# curl -fsSL https://ftp.osuosl.org/pub/sftpgo/apt/gpg.key | gpg --dearmor -o /usr/share/keyrings/sftpgo-archive-keyring.gpg
# echo "deb [signed-by=/usr/share/keyrings/sftpgo-archive-keyring.gpg] https://ftp.osuosl.org/pub/sftpgo/apt ${DISTRO} main" > /etc/apt/sources.list.d/sftpgo.list
# apt-get update
# $STD apt-get install -y sftpgo
# msg_ok "SFTPGo installed"
motd_ssh
customize
@@ -24,3 +103,12 @@ msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
# read -p "Remove this script? <y/N> " prompt
# if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
# pct stop "$CTID"
# pct remove "$CTID"
# msg_ok "Removed this script"
# else
# msg_warn "Did not remove this script"
# fi

View File

@@ -0,0 +1,83 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: MickLesk (Canbiz)
# 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 (Patience)"
apt-get install -y \
apache2 \
cron \
flac \
vorbis-tools \
lame \
ffmpeg \
lsb-release \
gosu \
wget \
curl \
git \
make \
inotify-tools \
libavcodec-extra \
libev-libevent-dev \
libmp3lame-dev \
libtheora-dev \
libvorbis-dev \
libvpx-dev
msg_ok "Installed Dependencies"
PHP_VERSION=8.4
PHP_MODULE=bcmath,bz2,cli,common,curl,fpm,gd,imagick,intl,mbstring,mysql,sqlite3,xml,xmlrpc,zip
PHP_APACHE=YES
install_php
install_mariadb
msg_info "Setting up Database"
DB_NAME=ampache2
DB_USER=ampache2
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
sudo mysql -u root -e "CREATE DATABASE $DB_NAME;"
sudo mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
sudo mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
echo "" >>~/ampache.creds
echo -e "Ampache Database User: \e $DB_USER\e" >>~/ampache.creds
echo -e "Ampache Database Password: \e$DB_PASS\e" >>~/ampache.creds
echo -e "Ampache Database Name: \e$DB_NAME\e" >>~/ampache.creds
msg_ok "Set up database"
msg_info "Installing Ampache(Patience)"
cd /opt
AMPACHE_VERSION=$(wget -q https://github.com/ampache/ampache/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
wget https://github.com/ampache/ampache/releases/download/${AMPACHE_VERSION}/ampache-${AMPACHE_VERSION}_all_php8.4.zip
unzip -q ampache-${AMPACHE_VERSION}_all_php8.4.zip -d ampache
rm -rf /var/www/html
ln -s /opt/ampache/public /var/www/html
sudo mv /opt/ampache/rest/.htaccess.dist /opt/ampache/rest/.htaccess
sudo mv /opt/ampache/play/.htaccess.dist /opt/ampache/play/.htaccess
sudo mv /opt/ampache/channel/.htaccess.dist /opt/ampache/channel/.htaccess
sudo cp /opt/ampache/config/ampache.cfg.php.dist /opt/ampache/config/ampache.cfg.php
sudo chmod 664 /opt/ampache/rest/.htaccess /opt/ampache/play/.htaccess
sudo sed -i 's/upload_max_filesize = .*/upload_max_filesize = 50M/' /etc/php/8.4/apache2/php.ini &&
sudo sed -i 's/post_max_size = .*/post_max_size = 50M/' /etc/php/8.4/apache2/php.ini &&
sudo sed -i 's/max_execution_time = .*/max_execution_time = 300/' /etc/php/8.4/apache2/php.ini &&
sudo sed -i 's/memory_limit = .*/memory_limit = 256M/' /etc/php/8.4/apache2/php.ini &&
sudo systemctl restart apache2
msg_ok "Installed Ampache"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,171 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Arian Nasr (arian-nasr)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.freepbx.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 \
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
msg_ok "Installed Dependencies"
msg_info "Installing Asterisk (Patience)"
cd /usr/src
curl -fsSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
tar xf asterisk-21-current.tar.gz
cd asterisk-21.*
$STD contrib/scripts/get_mp3_source.sh
$STD contrib/scripts/install_prereq install
$STD ./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
$STD make
$STD make install
$STD make samples
$STD make config
ldconfig
msg_ok "Installed Asterisk"
msg_info "Setup Asterisk"
groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk:asterisk /usr/lib64/asterisk
sed -i 's|#AST_USER|AST_USER|' /etc/default/asterisk
sed -i 's|#AST_GROUP|AST_GROUP|' /etc/default/asterisk
sed -i 's|;runuser|runuser|' /etc/asterisk/asterisk.conf
sed -i 's|;rungroup|rungroup|' /etc/asterisk/asterisk.conf
echo "/usr/lib64" >>/etc/ld.so.conf.d/x86_64-linux-gnu.conf
ldconfig
msg_ok "Done Setup Asterisk"
msg_info "Setup Apache"
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/8.2/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/8.2/apache2/php.ini
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
$STD a2enmod rewrite
systemctl restart apache2
rm /var/www/html/index.html
msg_ok "Done Setup Apache"
# Configure ODBC
cat <<EOF >/etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF
cat <<EOF >/etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to 'asteriskcdrdb' database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF
msg_info "Installing FreePBX"
cd /usr/local/src
curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz -o freepbx-17.0-latest-EDGE.tgz
tar zxf freepbx-17.0-latest-EDGE.tgz
cd /usr/local/src/freepbx/
$STD ./start_asterisk start
# Even though the php code completes successfully, it is returning non-zero exit code, so in the next line we return true, needed for successful installation
./install -n &>/dev/null || true
$STD fwconsole ma installall
$STD fwconsole reload
$STD fwconsole restart
msg_ok "Installed FreePBX"
msg_info "Setup FreePBX Service"
cat <<EOF >/etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable -q --now freepbx
msg_ok "Done Setup FreePBX Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,161 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# 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 Python3"
$STD apt-get install -y --no-install-recommends \
python3 \
python3-dev \
python3-setuptools \
python3-venv
msg_ok "Installed Python3"
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y --no-install-recommends \
redis \
postgresql \
postgresql-contrib \
postgresql-client \
build-essential \
gnupg \
ffmpeg \
libjpeg-dev \
libpq-dev \
libmagic-dev \
libzbar0 \
poppler-utils \
automake \
libtool \
pkg-config \
curl \
libtiff-dev \
libpng-dev \
libleptonica-dev \
sudo \
make \
mc
msg_ok "Installed Dependencies"
msg_info "Setup Funkwhale Dependencies (Patience)"
export FUNKWHALE_VERSION=1.4.0
$STD sudo apt install -y --no-install-recommends $(curl https://dev.funkwhale.audio/funkwhale/funkwhale/-/raw/$FUNKWHALE_VERSION/deploy/requirements.apt)
$STD sudo useradd --system --shell /bin/bash --create-home --home-dir /opt/funkwhale funkwhale
cd /opt/funkwhale
$STD sudo mkdir -p config api data/static data/media data/music front
$STD sudo chown -R funkwhale:funkwhale data
msg_ok "Initial Setup complete"
msg_ok "Download Funkwhale API"
$STD sudo curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api"
$STD sudo unzip -q "api-$FUNKWHALE_VERSION.zip" -d extracted
$STD sudo mv extracted/api/* api/
$STD sudo rm -rf extracted api-$FUNKWHALE_VERSION.zip
msg_ok "Downloaded and extracted Funkwhale API"
msg_info "Download Funkwhale Frontend"
$STD sudo curl -L -o "front-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_front"
$STD sudo unzip -q "front-$FUNKWHALE_VERSION.zip" -d extracted
$STD sudo mv extracted/front .
$STD sudo rm -rf extracted front-$FUNKWHALE_VERSION.zip
msg_ok "Downloaded and extracted Funkwhale Frontend"
msg_info "Install Funkwhale API and DJANGO"
cd /opt/funkwhale
$STD sudo python3 -m venv venv
$STD sudo venv/bin/pip install --upgrade pip wheel
$STD sudo venv/bin/pip install --editable ./api
$STD sudo curl -L -o /opt/funkwhale/config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/env.prod.sample"
secret_key=$(openssl rand -base64 45 | sed 's/\//\\\//g')
sudo sed -i "s/DJANGO_SECRET_KEY=.*/DJANGO_SECRET_KEY=$secret_key/" /opt/funkwhale/config/.env
sudo sed -i 's/# CACHE_URL=redis:\/\/127.0.0.1:6379\/0/CACHE_URL=redis:\/\/127.0.0.1:6379\/0/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian
sudo sed -i 's/# DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/DATABASE_URL=postgresql:\/\/funkwhale@:5432\/funkwhale/' /opt/funkwhale/config/.env #Remove #Hashtag From Config for Debian
# set the paths to /opt instead of /srv
sudo sed -i 's/MEDIA_ROOT=\/srv\/funkwhale\/data\/media/MEDIA_ROOT=\/opt\/funkwhale\/data\/media/' /opt/funkwhale/config/.env
sudo sed -i 's/STATIC_ROOT=\/srv\/funkwhale\/data\/static/STATIC_ROOT=\/opt\/funkwhale\/data\/static/' /opt/funkwhale/config/.env
sudo sed -i 's/MUSIC_DIRECTORY_PATH=\/srv\/funkwhale\/data\/music/MUSIC_DIRECTORY_PATH=\/opt\/funkwhale\/data\/music/' /opt/funkwhale/config/.env
sudo sed -i 's/MUSIC_DIRECTORY_SERVE_PATH=\/srv\/funkwhale\/data\/music/MUSIC_DIRECTORY_SERVE_PATH=\/opt\/funkwhale\/data\/music/' /opt/funkwhale/config/.env
sudo sed -i 's/FUNKWHALE_FRONTEND_PATH=\/srv\/funkwhale\/front\/dist/FUNKWHALE_FRONTEND_PATH=\/opt\/funkwhale\/front\/dist/' /opt/funkwhale/config/.env
sudo chown funkwhale:funkwhale /opt/funkwhale/config/.env
sudo chmod 600 /opt/funkwhale/config/.env
msg_ok "Environment successfully set up"
msg_info "Setting up Database"
DB_NAME=funkwhale
DB_USER=funkwhale
DB_EXTENSION_UNACCENT=unaccent
DB_EXTENSION_CITEXT=citext
DB_PASS="$(openssl rand -base64 18 | 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;"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
echo "" >>~/funkwhale.creds
echo -e "Funkwhale Database User: \e[32m$DB_USER\e[0m" >>~/funkwhale.creds
echo -e "Funkwhale Database Password: \e[32m$DB_PASS\e[0m" >>~/funkwhale.creds
echo -e "Funkwhale Database Name: \e[32m$DB_NAME\e[0m" >>~/funkwhale.creds
$STD sudo -u postgres psql -c "CREATE EXTENSION $DB_EXTENSION_UNACCENT;"
$STD sudo -u postgres psql -c "CREATE EXTENSION $DB_EXTENSION_CITEXT;"
cd /opt/funkwhale
$STD sudo -u funkwhale venv/bin/funkwhale-manage migrate
msg_ok "Set up PostgreSQL database"
msg_info "Setting up Funkwhale and systemd"
FUNKWHALE_USER=funkwhale_su
FUNKWHALE_MAIL=mail@example.com
FUNKWHALE_PASS="$(openssl rand -base64 18 | cut -c1-13)"
echo -e "Funkwhale Superuser: \e[32m$FUNKWHALE_USER\e[0m" >>~/funkwhale.creds
echo -e "Funkwhale Mail: \e[32m$FUNKWHALE_MAIL\e[0m" >>~/funkwhale.creds
echo -e "Funkwhale Superuser Password: \e[32m$FUNKWHALE_PASS\e[0m" >>~/funkwhale.creds
$STD sudo -u funkwhale venv/bin/funkwhale-manage fw users create --superuser --username $FUNKWHALE_USER --email $FUNKWHALE_MAIL --password $FUNKWHALE_PASS
$STD sudo venv/bin/funkwhale-manage collectstatic
$STD sudo curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale.target"
$STD sudo curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-server.service"
$STD sudo curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-worker.service"
$STD sudo curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale-beat.service"
$STD sudo systemctl daemon-reload
$STD sudo systemctl start funkwhale.target
$STD sudo systemctl enable --now funkwhale.target
msg_ok "Funkwhale successfully set up"
read -r -p "Would you like to Setup Reverse Proxy (Nginx)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing NGINX"
$STD apt install -y nginx
sudo su
$STD curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/funkwhale_proxy.conf"
$STD curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$FUNKWHALE_VERSION/deploy/nginx.template"
$STD set -a && source /opt/funkwhale/config/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \
< /etc/nginx/sites-available/funkwhale.template \
> /etc/nginx/sites-available/funkwhale.conf
$STD grep '${' /etc/nginx/sites-available/funkwhale.conf
$STD ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
$STD systemctl reload nginx
msg_ok "Installed Nginx"
fi
read -r -p "Would you like to Setup TLS (Certbot)? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Certbot"
$STD apt install -y certbot python3-certbot-nginx
$STD sudo certbot --nginx -d $FUNKWHALE_HOSTNAME
msg_ok "Installed Certbot"
fi
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,179 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# Co-Author: jcantosz
# 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 update
$STD apt-get install -y \
curl \
lsb-release \
gpg \
g++ \
git \
make \
openssl \
python3 \
postgresql-15 \
redis
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 --no-install-suggests nodejs
msg_info "Installed Node.js"
msg_info "Installing Postgresql"
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=ghostfolio-db
POSTGRES_USER='postgres'
POSTGRES_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
ACCESS_TOKEN_SALT="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?connect_timeout=300&sslmode=prefer"
JWT_SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
$STD su postgres <<EOSU
psql -c "create database \"$POSTGRES_DB\";"
psql -c "ALTER DATABASE \"$POSTGRES_DB\" OWNER TO \"$POSTGRES_USER\";"
psql -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO \"$POSTGRES_USER\";"
psql -c "ALTER USER \"$POSTGRES_USER\" WITH PASSWORD '$POSTGRES_PASSWORD';"
EOSU
echo "" >~/ghostfolio.creds
echo "Ghostfolio Database Credentials" >>~/ghostfolio.creds
echo "" >>~/ghostfolio.creds
echo -e "Ghostfolio Database User: \e[32m$POSTGRES_USER\e[0m" >>~/ghostfolio.creds
echo -e "Ghostfolio Database Password: \e[32m$POSTGRES_PASSWORD\e[0m" >>~/ghostfolio.creds
echo -e "Ghostfolio Database Name: \e[32m$POSTGRES_DB\e[0m" >>~/ghostfolio.creds
msg_ok "Installed Postgresql"
msg_info "Installing Redis"
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
$STD redis-cli CONFIG SET requirepass "$REDIS_PASSWORD"
$STD redis-cli -a "$REDIS_PASSWORD" CONFIG REWRITE
$STD systemctl restart redis
echo "" >>~/ghostfolio.creds
echo "Ghostfolio Redis Credentials" >>~/ghostfolio.creds
echo "" >>~/ghostfolio.creds
echo -e "Ghostfolio Redis Password: \e[32m$REDIS_PASSWORD\e[0m" >>~/ghostfolio.creds
msg_ok "Installed Redis"
msg_info "Installing Ghostfolio (Patience)"
RELEASE=$(curl -sL https://api.github.com/repos/ghostfolio/ghostfolio/releases/latest | grep '"tag_name":' | cut -d'"' -f4)
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
cd /opt/
$STD curl -Ls -o ghostfolio-$RELEASE.tgz https://github.com/ghostfolio/ghostfolio/archive/refs/tags/$RELEASE.tar.gz
$STD tar xzf ghostfolio-$RELEASE.tgz
$STD rm ghostfolio-$RELEASE.tgz
cp /opt/ghostfolio-$RELEASE/package.json /opt/package.json
cp /opt/ghostfolio-$RELEASE/package-lock.json /opt/package-lock.json
cd /opt/ghostfolio-$RELEASE
$STD npm install
$STD npm run build:production
mv /opt/package-lock.json /opt/ghostfolio-$RELEASE/package-lock.json
cd /opt/ghostfolio-$RELEASE/dist/apps/api/
$STD npm install
cp -r /opt/ghostfolio-$RELEASE/prisma .
mv /opt/package.json /opt/ghostfolio-$RELEASE/dist/apps/api/package.json
$STD npm run database:generate-typings
cd /opt
mv /opt/ghostfolio-$RELEASE/dist/apps /opt/ghostfolio
mv /opt/ghostfolio-$RELEASE/docker/entrypoint.sh /opt/ghostfolio/
rm -rf /opt/ghostfolio-$RELEASE
msg_ok "Installed Ghostfolio"
msg_info "Creating Service"
cat <<EOF >/opt/ghostfolio/api/.env
# CACHE
REDIS_HOST=$REDIS_HOST
REDIS_PORT=$REDIS_PORT
REDIS_PASSWORD=$REDIS_PASSWORD
# POSTGRES
POSTGRES_DB=$POSTGRES_DB
POSTGRES_USER=$POSTGRES_USER
POSTGRES_PASSWORD=$POSTGRES_PASSWORD
# VARIOUS
ACCESS_TOKEN_SALT=$ACCESS_TOKEN_SALT
DATABASE_URL="$DATABASE_URL"
JWT_SECRET_KEY=$JWT_SECRET_KEY
EOF
cat <<EOF >/opt/ghostfolio/start.sh
#!/bin/bash
# Source the environment vars and export them otherwise it wont get them properly
set -a
. /opt/ghostfolio/api/.env
set +a
# Run the docker entrypoint
/opt/ghostfolio/entrypoint.sh
EOF
chmod +x /opt/ghostfolio/start.sh
msg_info "Setup Service"
cat <<EOF >/etc/systemd/system/ghostfolio.service
[Unit]
Description=ghostfolio
[Service]
After=postgresql.service redis.service
Require=postgresql.service redis.service
# Start Service
ExecStart=/opt/ghostfolio/start.sh
WorkingDirectory=/opt/ghostfolio/api/
# Restart service after 10 seconds if node service crashes
RestartSec=10
Restart=always
# Output to syslog
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ghostfolio
[Install]
WantedBy=multi-user.target
EOF
systemctl enable ghostfolio
systemctl start ghostfolio
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,72 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 community-scripts ORG
# Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
# Source: https://github.com/hudikhq/hoodik
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 \
pkg-config \
libssl-dev \
libc6-dev \
libpq-dev \
clang \
llvm \
nettle-dev \
build-essential \
curl \
sudo \
make \
mc
msg_ok "Installed Dependencies"
msg_info "Installing Rust (Patience)"
$STD bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) -y
source ~/.cargo/env
msg_ok "Installed Rust"
msg_info "Installing Hoodik (Patience)"
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv "hoodik-${RELEASE:1}" hoodik
cd hoodik
cargo build -q --release
msg_ok "Installed hoodik"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/hoodik.service
[Unit]
Description=Start Hoodik Service
After=network.target
[Service]
User=root
WorkingDirectory=/opt/hoodik
ExecStart=/root/.cargo/bin/cargo run -q --release
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now hoodik.service
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.zip
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,147 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 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
PG_VERSION="16" install_postgresql
PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php
NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules
install_composer
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
nginx \
apt-transport-https \
lsb-release \
ffmpeg \
cron \
libapache2-mod-xsendfile \
libzip-dev \
locales \
libpng-dev \
libjpeg62-turbo-dev \
libpq-dev \
libwebp-dev
msg_ok "Installed Dependencies"
# PG_VERSION="16" install_postgresql
# PHP_VERSION=8.3 PHP_MODULE="bcmath,bz2,cli,exif,common,curl,fpm,gd,imagick,intl,mbstring,pgsql,sqlite3,xml,xmlrpc,zip" install_php
# NODE_VERSION=22 NODE_MODULE="yarn,npm@latest" install_node_and_modules
# install_composer
msg_info "Setting up PostgreSQL Database"
DB_NAME=koel_db
DB_USER=koel
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
APP_SECRET=$(openssl rand -base64 32)
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "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 "Koel-Credentials"
echo "Koel Database User: $DB_USER"
echo "Koel Database Password: $DB_PASS"
echo "Koel Database Name: $DB_NAME"
} >>~/koel.creds
msg_ok "Set up PostgreSQL Database"
msg_info "Installing Koel(Patience)"
RELEASE=$(curl -fsSL https://github.com/koel/koel/releases/latest | grep "title>Release" | cut -d " " -f 4)
mkdir -p /opt/koel_{media,sync}
curl -fsSL https://github.com/koel/koel/releases/download/${RELEASE}/koel-${RELEASE}.zip -o /opt/koel.zip
cd /opt
unzip koel.zip
cd /opt/koel
mv .env.example .env
$STD composer install --no-interaction
sed -i -e "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" \
-e "s/DB_HOST=.*/DB_HOST=localhost/" \
-e "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" \
-e "s/DB_PORT=.*/DB_PORT=5432/" \
-e "s|APP_KEY=.*|APP_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)|" \
-e "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" \
-e "s|DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" \
-e "s|MEDIA_PATH=.*|MEDIA_PATH=/opt/koel_media|" \
-e "s|FFMPEG_PATH=/usr/local/bin/ffmpeg|FFMPEG_PATH=/usr/bin/ffmpeg|" /opt/koel/.env
php artisan koel:init --no-assets
chown -R :www-data /opt/*
chmod -R g+r /opt/*
chmod -R g+rw /opt/*
chown -R www-data:www-data /opt/*
chmod -R 755 /opt/*
msg_ok "Installed Koel"
msg_info "Set up web services"
cat <<EOF >/etc/nginx/sites-available/koel
server {
listen *:80;
server_name koel.local;
root /opt/koel/public;
index index.php;
gzip on;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;
gzip_comp_level 9;
send_timeout 3600;
client_max_body_size 200M;
location / {
try_files \$uri \$uri/ /index.php?\$args;
}
location /media/ {
alias /opt/koel_media;
autoindex on;
access_log /var/log/nginx/koel.access.log;
error_log /var/log/nginx/koel.error.log;
}
location ~ \.php$ {
try_files \$uri \$uri/ /index.php?\$args;
fastcgi_param PATH_INFO \$fastcgi_path_info;
fastcgi_param PATH_TRANSLATED \$document_root\$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
EOF
ln -s /etc/nginx/sites-available/koel /etc/nginx/sites-enabled/koel
systemctl restart php8.3-fpm
systemctl reload nginx
msg_ok "Created Services"
msg_info "Adding Cronjob (Daily Midnight)"
cat <<EOF >/opt/koel_sync/koel_sync.cron
0 0 * * * cd /opt/koel/ && /usr/bin/php artisan koel:sync >/opt/koel_sync/koel_sync.log 2>&1
EOF
crontab /opt/koel_sync/koel_sync.cron
msg_ok "Cronjob successfully added"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/koel.zip
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,265 @@
#!/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: https://github.com/getmaxun/maxun
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
gpg \
openssl \
redis \
libgbm1 \
libnss3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libdrm2 \
libxkbcommon0 \
libglib2.0-0 \
libdbus-1-3 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxi6 \
libxtst6 \
ca-certificates \
libxrandr2 \
libasound2 \
libxss1 \
libxinerama1 \
nginx
msg_ok "Installed Dependencies"
#configure_lxc "Semantic Search requires a dedicated GPU and at least 16GB RAM. Would you like to install it?" 100 "memory" "16000"
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_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Set up Node.js Repository"
msg_info "Setting up PostgreSQL Repository"
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
$STD apt-get update
$STD apt-get install -y postgresql-17
msg_ok "Set up PostgreSQL Repository"
msg_info "Installing Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed Node.js"
msg_info "Setup Variables"
DB_NAME=maxun_db
DB_USER=maxun_user
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
MINIO_USER=minio_usr
MINIO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
JWT_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
ENCRYPTION_KEY=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)
LOCAL_IP=$(hostname -I | awk '{print $1}')
msg_ok "Set up Variables"
msg_info "Setup Database"
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "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 "Maxun-Credentials"
echo "Maxun Database User: $DB_USER"
echo "Maxun Database Password: $DB_PASS"
echo "Maxun Database Name: $DB_NAME"
echo "Maxun JWT Secret: $JWT_SECRET"
echo "Maxun Encryption Key: $ENCRYPTION_KEY"
} >>~/maxun.creds
msg_ok "Set up Database"
msg_info "Setup MinIO"
cd /tmp
wget -q https://dl.min.io/server/minio/release/linux-amd64/minio
mv minio /usr/local/bin/
chmod +x /usr/local/bin/minio
mkdir -p /data
cat <<EOF >/etc/systemd/system/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
[Service]
User=root
EnvironmentFile=-/etc/default/minio
ExecStart=/usr/local/bin/minio server /data
Restart=always
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
EOF
{
echo "__________________"
echo "MinIO Admin User: $MINIO_USER"
echo "MinIO Admin Password: $MINIO_PASS"
} >>~/maxun.creds
cat <<EOF >/etc/default/minio
MINIO_ROOT_USER=${MINIO_USER}
MINIO_ROOT_PASSWORD=${MINIO_PASS}
EOF
systemctl enable -q --now minio
msg_ok "Setup MinIO"
msg_info "Installing Maxun (Patience)"
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/getmaxun/maxun/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q "https://github.com/getmaxun/maxun/archive/refs/tags/v${RELEASE}.zip"
unzip -q v${RELEASE}.zip
mv maxun-${RELEASE} /opt/maxun
cat <<EOF >/opt/maxun/.env
NODE_ENV=development
JWT_SECRET=${JWT_SECRET}
DB_NAME=${DB_NAME}
DB_USER=${DB_USER}
DB_PASSWORD=${DB_PASS}
DB_HOST=localhost
DB_PORT=5432
ENCRYPTION_KEY=${ENCRYPTION_KEY}
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_CONSOLE_PORT=9001
MINIO_ACCESS_KEY=${MINIO_USER}
MINIO_SECRET_KEY=${MINIO_PASS}
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
BACKEND_PORT=8080
FRONTEND_PORT=5173
BACKEND_URL=http://${LOCAL_IP}:8080
PUBLIC_URL=http://${LOCAL_IP}:5173
VITE_BACKEND_URL=http://${LOCAL_IP}:8080
VITE_PUBLIC_URL=http://${LOCAL_IP}:5173
MAXUN_TELEMETRY=false
EOF
cat <<'EOF' >/usr/local/bin/update-env-ip.sh
env_file="/opt/maxun/.env"
sed -i "s|^BACKEND_URL=.*|BACKEND_URL=http://${LOCAL_IP}:8080|" "$env_file"
sed -i "s|^PUBLIC_URL=.*|PUBLIC_URL=http://${LOCAL_IP}:5173|" "$env_file"
sed -i "s|^VITE_BACKEND_URL=.*|VITE_BACKEND_URL=http://${LOCAL_IP}:8080|" "$env_file"
sed -i "s|^VITE_PUBLIC_URL=.*|VITE_PUBLIC_URL=http://${LOCAL_IP}:5173|" "$env_file"
EOF
chmod +x /usr/local/bin/update-env-ip.sh
cd /opt/maxun
$STD npm install --legacy-peer-deps
cd /opt/maxun/maxun-core
$STD npm install --legacy-peer-deps
$STD npm run build
cd /opt/maxun
$STD npx playwright install --with-deps chromium
$STD npx playwright install-deps
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed Maxun"
#msg_info "Running DB Migrations"
#cd /opt/maxun
#node -e "require('./server/src/db/migrate')().then(() => { console.log('Migrations completed'); })"
#msg_ok "DB Migrations completed"
msg_info "Setting up nginx with CORS Proxy"
cat <<'EOF' >/etc/nginx/sites-available/maxun
server {
listen 80;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location ~ ^/(api|record|workflow|storage|auth|integration|proxy|api-docs) {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_http_version 1.1;
add_header Access-Control-Allow-Origin "$http_origin" always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS always;
add_header Access-Control-Allow-Headers Authorization,Content-Type,X-Requested-With always;
if ($request_method = OPTIONS) {
return 204;
}
proxy_connect_timeout 60s;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
proxy_intercept_errors on;
error_page 502 503 504 /50x.html;
}
}
EOF
ln -sf /etc/nginx/sites-available/maxun /etc/nginx/sites-enabled/maxun
rm -f /etc/nginx/sites-enabled/default
msg_ok "nginx with CORS Proxy set up"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/maxun-update-env.service
[Unit]
Description=Update .env with dynamic LXC IP
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/update-env-ip.sh
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/maxun.service
[Unit]
Description=Maxun Service
After=network.target postgresql.service redis.service minio.service maxun-update-env.service
[Service]
WorkingDirectory=/opt/maxun
ExecStart=/usr/bin/npm run start
Restart=always
EnvironmentFile=/opt/maxun/.env
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now maxun-update-env
systemctl enable -q --now maxun
systemctl enable -q --now nginx
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/v${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2023 tteck
# Author: tteck (tteckster)
# 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 ansible git apache2
msg_ok "Installed Dependencies"
RELEASE=$(curl -sX GET "https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
msg_info "Installing netboot.xyz ${RELEASE}"
$STD curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/netbootxyz/netboot.xyz/archive/${RELEASE}.tar.gz"
$STD tar xvzf ${RELEASE}.tar.gz
VER=$(curl -s https://api.github.com/repos/netbootxyz/netboot.xyz/releases/latest |
grep "tag_name" |
awk '{print substr($2, 2, length($2)-3) }')
rm -rf ${RELEASE}.tar.gz
mv netboot.xyz-${VER} /opt/netboot.xyz
msg_ok "Installed netboot.xyz ${RELEASE}"
msg_info "Creating Service"
service_path="/etc/systemd/system/netbootxyz.service"
echo "[Unit]
Description=netboot.xyz
After=network.target
[Service]
Restart=always
RestartSec=5
Type=simple
User=root
WorkingDirectory=/opt/netboot.xyz
ExecStart="ansible-playbook" -i inventory site.yml
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target" >$service_path
$STD sudo systemctl enable --now netbootxyz.service
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,191 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck
# Co-Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /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 \
build-essential \
gpg \
curl \
sudo \
git \
gnupg2 \
ca-certificates \
lsb-release \
php8.3-{fpm,bcmath,ctype,curl,exif,gd,iconv,intl,mbstring,redis,tokenizer,xml,zip,pgsql,pdo-pgsql,bz2,sqlite3} \
composer \
redis \
ffmpeg \
jpegoptim \
optipng \
pngquant \
make \
mc
msg_ok "Installed Dependencies"
msg_info "Configure Redis Socket"
REDIS_PASS="$(openssl rand -base64 18 | cut -c1-13)"
sed -i 's/^port .*/port 0/' /etc/redis/redis.conf
sed -i "s/^# requirepass foobared/requirepass $REDIS_PASS/" /etc/redis/redis.conf
sed -i 's|^# unixsocket .*|unixsocket /run/redis/redis.sock|' /etc/redis/redis.conf
sed -i 's/^# unixsocketperm .*/unixsocketperm 770/' /etc/redis/redis.conf
systemctl restart redis
msg_ok "Redis Socket configured"
msg_info "Add pixelfed user"
useradd -rU -s /bin/bash pixelfed
msg_ok "Pixelfed User Added"
msg_info "Configure PHP-FPM for Pixelfed"
cp /etc/php/8.3/fpm/pool.d/www.conf /etc/php/8.3/fpm/pool.d/pixelfed.conf
sed -i 's/\[www\]/\[pixelfed\]/' /etc/php/8.3/fpm/pool.d/pixelfed.conf
sed -i 's/^user = www-data/user = pixelfed/' /etc/php/8.3/fpm/pool.d/pixelfed.conf
sed -i 's/^group = www-data/group = pixelfed/' /etc/php/8.3/fpm/pool.d/pixelfed.conf
sed -i 's|^listen = .*|listen = /run/php-fpm/pixelfed.sock|' /etc/php/8.3/fpm/pool.d/pixelfed.conf
systemctl restart php8.3-fpm
msg_ok "successfully configured PHP-FPM"
msg_info "Setup Postgres Database"
DB_NAME=pixelfed_db
DB_USER=pixelfed_user
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
apt-get update
apt-get install -y postgresql-17
sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
sudo -u postgres psql -c "GRANT CREATE ON SCHEMA public TO $DB_USER;"
echo "" >>~/pixelfed.creds
echo -e "Pixelfed Database Name: $DB_NAME" >>~/pixelfed.creds
echo -e "Pixelfed Database User: $DB_USER" >>~/pixelfed.creds
echo -e "Pixelfed Database Password: $DB_PASS" >>~/pixelfed.creds
#export $(cat /opt/pixelfed/.env |grep "^[^#]" | xargs)
msg_ok "Set up PostgreSQL Database successfully"
msg_info "Installing Pixelfed (Patience)"
RELEASE=$(curl -s https://api.github.com/repos/pixelfed/pixelfed/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/pixelfed/pixelfed/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv pixelfed-${RELEASE:1} /opt/pixelfed
rm -R ${RELEASE}.zip
cd /opt/pixelfed
chown -R www-data:www-data /opt/pixelfed/storage
chmod -R 775 /opt/pixelfed/storage
chown -R pixelfed:pixelfed /opt/pixelfed/storage
chmod -R 775 /opt/pixelfed/storage
chown -R www-data:www-data /opt/pixelfed
chmod -R 755 /opt/pixelfed
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --no-ansi --no-interaction --optimize-autoloader
msg_info "Setup envoirement & PHP Database Migration"
cp .env.example .env
sed -i "s/DB_CONNECTION=.*/DB_CONNECTION=pgsql/" .env
sed -i "s/DB_PORT=.*/DB_PORT=5432/" .env
sed -i "s/DB_DATABASE=.*/DB_DATABASE=$DB_NAME/" .env
sed -i "s/DB_USERNAME=.*/DB_USERNAME=$DB_USER/" .env
sed -i "s/DB_PASSWORD=.*/DB_PASSWORD=$DB_PASS/" .env
sed -i "s/REDIS_HOST=.*/REDIS_HOST=127.0.0.1/" .env
sed -i "s/REDIS_PASSWORD=.*/REDIS_PASSWORD=$REDIS_PASS/" .env
sed -i "s/APP_URL=.*/APP_URL=http:\/\/localhost/" .env # localhost URL
php artisan key:generate
php artisan storage:link
php artisan migrate --force
php artisan import:cities
php artisan instance:actor
php artisan passport:keys
php artisan route:cache
php artisan view:cache
sed -i 's/^post_max_size = .*/post_max_size = 100M/' /etc/php/8.3/fpm/php.ini
sed -i 's/^upload_max_filesize = .*/upload_max_filesize = 100M/' /etc/php/8.3/fpm/php.ini
sed -i 's/^max_execution_time = .*/max_execution_time = 600/' /etc/php/8.3/fpm/php.ini
systemctl restart php8.3-fpm
msg_ok "Pixelfed successfully set up"
msg_info "Creating Services"
cat <<EOF >/etc/nginx/sites-available/pixelfed.conf
server {
listen 80;
server_name localhost; # Nutzung von localhost
root /opt/pixelfed/public;
index index.php;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
client_max_body_size 20M;
}
EOF
ln -s /etc/nginx/sites-available/pixelfed.conf /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
cat <<EOF >/etc/systemd/system/pixelfed-horizon.service
[Unit]
Description=Pixelfed Horizon
After=network.target
Requires=php8.3-fpm
Requires=redis
[Service]
User=www-data
WorkingDirectory=/opt/pixelfed
ExecStart=/usr/bin/php /opt/pixelfed/artisan horizon
Restart=always
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/pixelfed-scheduler.service
[Unit]
Description=Pixelfed Scheduler
After=network.target
[Service]
User=www-data
ExecStart=/usr/bin/php /opt/pixelfed/artisan schedule:run
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now pixelfed-scheduler
systemctl enable --now pixelfed-horizon
msg_ok "Created Services"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,88 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck
# Co-Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
# Source: https://github.com/roundcube/roundcubemail
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 \
apache2 \
libapache2-mod-php \
composer \
php8.2-{mbstring,gd,imap,mysql,ldap,curl,intl,imagick,bz2,sqlite3,zip,xml}
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL"
DB_NAME=roundcube_db
DB_USER=roundcube_user
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH ENCODING 'UTF8';"
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME TO $DB_USER;"
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME OWNER TO $DB_USER;"
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
echo "" >>~/roundcubemail.creds
echo -e "Roundcubemail Database User: $DB_USER" >>~/roundcubemail.creds
echo -e "Roundcubemail Database Password: $DB_PASS" >>~/roundcubemail.creds
echo -e "Roundcubemail Database Name: $DB_NAME" >>~/roundcubemail.creds
msg_ok "Set up PostgreSQL"
msg_info "Installing Roundcubemail (Patience)"
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/roundcube/roundcubemail/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/roundcube/roundcubemail/releases/download/${RELEASE}/roundcubemail-${RELEASE}-complete.tar.gz"
tar -xf roundcubemail-${RELEASE}-complete.tar.gz
mv roundcubemail-${RELEASE} /opt/roundcubemail
cd /opt/roundcubemail
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev
cp /opt/roundcubemail/config/config.inc.php.sample /opt/roundcubemail/config/config.inc.php
sed -i "s|^\\\$config\\['db_dsnw'\\] = 'mysql://.*';|\\\$config\\['db_dsnw'\\] = 'pgsql://$DB_USER:$DB_PASS@localhost/$DB_NAME';|" /opt/roundcubemail/config/config.inc.php
chown -R www-data:www-data temp/ logs/
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
cat <<EOF >/etc/apache2/sites-available/roundcubemail.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /opt/roundcubemail/public_html
<Directory /opt/roundcubemail/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog \${APACHE_LOG_DIR}/wallos_error.log
CustomLog \${APACHE_LOG_DIR}/wallos_access.log combined
</VirtualHost>
EOF
$STD sudo a2enmod deflate
$STD sudo a2enmod expires
$STD sudo a2enmod headers
$STD a2ensite roundcubemail.conf
$STD a2dissite 000-default.conf
$STD systemctl reload apache2
msg_ok "Installed Wallos"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/roundcubemail-${RELEASE}-complete.tar.gz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,163 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# 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
# Generate a random string
generate_random_string() {
local LENGTH=$1
tr -dc A-Za-z0-9 </dev/urandom | head -c ${LENGTH} 2>/dev/null || true
}
msg_info "Installing Dependencies"
$STD apk add git
$STD apk add nodejs
$STD apk add npm
$STD apk add ansible
$STD apk add nmap
$STD apk add sudo
$STD apk add openssh
$STD apk add sshpass
$STD apk add py3-pip
$STD apk add expect
$STD apk add libcurl
$STD apk add gcompat
$STD apk add curl
$STD apk add newt
$STD git --version
$STD node --version
$STD npm --version
msg_ok "Installed Dependencies"
msg_info "Installing Redis"
$STD apk add redis
msg_ok "Installed Redis"
msg_info "Installing Nginx"
$STD apk add nginx
rm -rf /etc/nginx/http.d/default.conf
cat <<'EOF'> /etc/nginx/http.d/default.conf
server {
listen 80;
server_name localhost;
access_log off;
error_log off;
location /api/socket.io/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:3000/socket.io/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /api/ {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://127.0.0.1:8000/;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
error_page 501 502 503 404 /custom.html;
location = /custom.html {
root /usr/share/nginx/html;
}
}
}
EOF
msg_ok "Installed Nginx"
msg_info "Installing MongoDB Database"
DB_NAME=ssm
DB_PORT=27017
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/main' >> /etc/apk/repositories
echo 'http://dl-cdn.alpinelinux.org/alpine/v3.9/community' >> /etc/apk/repositories
$STD apk update
$STD apk add mongodb mongodb-tools
msg_ok "Installed MongoDB Database"
msg_info "Starting Services"
$STD rc-service redis start
$STD rc-update add redis default
$STD rc-service mongodb start
$STD rc-update add mongodb default
msg_ok "Started Services"
msg_info "Setting Up Squirrel Servers Manager"
$STD git clone https://github.com/SquirrelCorporation/SquirrelServersManager.git /opt/squirrelserversmanager
SECRET=$(generate_random_string 32)
SALT=$(generate_random_string 16)
VAULT_PWD=$(generate_random_string 32)
cat <<EOF > /opt/squirrelserversmanager/.env
# SECRETS
SECRET=$SECRET
SALT=$SALT
VAULT_PWD=$VAULT_PWD
# MONGO
DB_HOST=127.0.0.1
DB_NAME=ssm
DB_PORT=27017
# REDIS
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
EOF
export NODE_ENV=production
export $(grep -v '^#' /opt/squirrelserversmanager/.env | xargs)
$STD npm install -g npm@latest
$STD npm install -g @umijs/max
$STD npm install -g typescript
$STD npm install pm2 -g
msg_ok "Squirrel Servers Manager Has Been Setup"
msg_info "Building Squirrel Servers Manager Lib"
cd /opt/squirrelserversmanager/shared-lib
$STD npm ci
$STD npm run build
msg_ok "Squirrel Servers Manager Lib built"
msg_info "Building & Running Squirrel Servers Manager Client"
cd /opt/squirrelserversmanager/client
$STD npm ci
$STD npm run build
$STD pm2 start --name="squirrelserversmanager-frontend" npm -- run serve
msg_ok "Squirrel Servers Manager Client Built & Ran"
msg_info "Building & Running Squirrel Servers Manager Server"
cd /opt/squirrelserversmanager/server
$STD npm ci
$STD npm run build
$STD pm2 start --name="squirrelserversmanager-backend" node -- ./dist/src/index.js
msg_ok "Squirrel Servers Manager Server Built & Ran"
msg_info "Starting Squirrel Servers Manager"
$STD pm2 startup
$STD pm2 save
mkdir -p /usr/share/nginx/html/
cp /opt/squirrelserversmanager/proxy/www/index.html /usr/share/nginx/html/custom.html
$STD rc-service nginx start
$STD rc-update add nginx default
msg_ok "Squirrel Servers Manager Started"
motd_ssh
customize

View File

@@ -0,0 +1,163 @@
#!/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 \
mc \
gnupg \
apt-transport-https \
lsb-release
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL Repository"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
msg_ok "Setup PostgreSQL Repository"
msg_info "Installing PostgreSQL"
$STD apt-get update
$STD apt-get install -y postgresql postgresql-common
cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
# PostgreSQL Client Authentication Configuration File
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
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
# IPv6 local connections:
host all all ::1/128 scram-sha-256
host all all 0.0.0.0/0 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 scram-sha-256
host replication all ::1/128 scram-sha-256
EOF
cat <<EOF >/etc/postgresql/17/main/postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------
data_directory = '/var/lib/postgresql/17/main'
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/17-main.pid'
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*'
port = 5432
max_connections = 100
unix_socket_directories = '/var/run/postgresql'
# - SSL -
ssl = on
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
shared_buffers = 128MB
dynamic_shared_memory_type = posix
#------------------------------------------------------------------------------
# WRITE-AHEAD LOG
#------------------------------------------------------------------------------
max_wal_size = 1GB
min_wal_size = 80MB
#------------------------------------------------------------------------------
# REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - What to Log -
log_line_prefix = '%m [%p] %q%u@%d '
log_timezone = 'Etc/UTC'
#------------------------------------------------------------------------------
# PROCESS TITLE
#------------------------------------------------------------------------------
cluster_name = '17/main'
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
# - Locale and Formatting -
datestyle = 'iso, mdy'
timezone = 'Etc/UTC'
lc_messages = 'C'
lc_monetary = 'C'
lc_numeric = 'C'
lc_time = 'C'
default_text_search_config = 'pg_catalog.english'
#------------------------------------------------------------------------------
# CONFIG FILE INCLUDES
#------------------------------------------------------------------------------
include_dir = 'conf.d'
EOF
systemctl restart postgresql
msg_ok "Installed PostgreSQL"
msg_info "Setup TimescaleDB"
echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg
$STD apt-get update
$STD apt-get install timescaledb-2-postgresql-17 postgresql-client-17
$STD timescaledb-tune --quiet --yes
$STD systemctl restart postgresql
msg_ok "Setup TimescaleDB"
read -r -p "Would you like to add Adminer? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Adminer"
$STD apt install -y adminer
$STD a2enconf adminer
systemctl reload apache2
msg_ok "Installed Adminer"
fi
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,9 +1,8 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2024 tteck
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
# License: MIT |
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
@@ -13,27 +12,26 @@ setting_up_container
network_check
update_os
msg_info "Setup Functions"
setup_local_ip_helper
import_local_ip
msg_ok "Setup Functions"
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
unzip \
htop \
gnupg2 \
ca-certificates \
default-jdk \
apt-transport-https \
ghostscript \
tesseract-ocr \
tesseract-ocr-deu \
tesseract-ocr-eng \
unpaper \
unoconv \
wkhtmltopdf \
ocrmypdf \
zip \
curl \
sudo \
make \
mc
htop \
gnupg2 \
ca-certificates \
default-jdk \
apt-transport-https \
ghostscript \
tesseract-ocr \
tesseract-ocr-deu \
tesseract-ocr-eng \
unpaper \
unoconv \
wkhtmltopdf \
ocrmypdf
msg_ok "Installed Dependencies"
msg_info "Setting up PostgreSQL Repository"
@@ -53,10 +51,10 @@ $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 "Docspell-Credentials"
echo "Docspell Database Name: $DB_NAME"
echo "Docspell Database User: $DB_USER"
echo "Docspell Database Password: $DB_PASS"
echo "Docspell-Credentials"
echo "Docspell Database Name: $DB_NAME"
echo "Docspell Database User: $DB_USER"
echo "Docspell Database Password: $DB_PASS"
} >>~/docspell.creds
msg_ok "Set up PostgreSQL Database"
@@ -65,46 +63,66 @@ mkdir -p /opt/docspell
Docspell=$(curl -fsSL https://github.com/eikek/docspell/releases/latest -o - | grep "title>Release" | cut -d " " -f 5)
DocspellDSC=$(curl -fsSL https://github.com/docspell/dsc/releases/latest -o - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//')
cd /opt
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-joex_${Docspell}_all.deb -o docspell-joex_${Docspell}_all.deb
curl -fsSL https://github.com/eikek/docspell/releases/download/v${Docspell}/docspell-restserver_${Docspell}_all.deb -o docspell-restserver_${Docspell}_all.deb
$STD dpkg -i docspell-*.deb
curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC}
curl -fsSL https://github.com/docspell/dsc/releases/download/v${DocspellDSC}/dsc_amd64-musl-${DocspellDSC} -o dsc_amd64-musl-${DocspellDSC}
mv dsc_amd* dsc
chmod +x dsc
mv dsc /usr/bin
ln -s /etc/docspell-joex /opt/docspell/docspell-joex && ln -s /etc/docspell-restserver /opt/docspell/docspell-restserver && ln -s /usr/bin/dsc /opt/docspell/dsc
curl -fsSL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq
chmod +x /usr/bin/yq
JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf"
SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf"
sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF"
sed -i -E '/backend\s*\{/,/\}/ {
/jdbc\s*\{/,/\}/ {
s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
}
}' "$SERVER_CONF"
sed -i -E '/postgresql\s*\{/,/\}/ {
/jdbc\s*\{/,/\}/ {
s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
}
}' "$SERVER_CONF"
sed -i -E '/jdbc\s*\{/,/\}/ {
s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
}' "$JOEX_CONF"
#JOEX_CONF="/usr/share/docspell-joex/conf/docspell-joex.conf"
#SERVER_CONF="/usr/share/docspell-restserver/conf/docspell-server.conf"
sed -i \
-e '11s|localhost|'"$LOCAL_IP"'|' \
-e '17s|localhost|'"$LOCAL_IP"'|' \
-e '49s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
-e '52s|user = .*|user = "'"$DB_USER"'"|' \
-e '55s|password = .*|password = "'"$DB_PASS"'"|' \
-e '827s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
-e '828s|user = .*|user = "'"$DB_USER"'"|' \
-e '829s|password = .*|password = "'"$DB_PASS"'"|' \
/usr/share/docspell-joex/conf/docspell-joex.conf
sed -i \
-e '16s|http://localhost:7880|http://'"$LOCAL_IP"':7880|' \
-e '22s|http://localhost:7880|http://'"$LOCAL_IP"':7880|' \
-e '356s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
-e '357s|user = .*|user = "'"$DB_USER"'"|' \
-e '358s|password = .*|password = "'"$DB_PASS"'"|' \
-e '401s|url = .*|url = "jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|' \
/usr/share/docspell-restserver/conf/docspell-server.conf
# sed -i 's|address = "localhost"|address = "0.0.0.0"|' "$JOEX_CONF" "$SERVER_CONF"
# sed -i -E '/backend\s*\{/,/\}/ {
# /jdbc\s*\{/,/\}/ {
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
# }
# }' "$SERVER_CONF"
# sed -i -E '/postgresql\s*\{/,/\}/ {
# /jdbc\s*\{/,/\}/ {
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
# }
# }' "$SERVER_CONF"
# sed -i -E '/jdbc\s*\{/,/\}/ {
# s|(url\s*=\s*).*|\1"jdbc:postgresql://localhost:5432/'"$DB_NAME"'"|;
# s|(user\s*=\s*).*|\1"'"$DB_USER"'"|;
# s|(password\s*=\s*).*|\1"'"$DB_PASS"'"|;
# }' "$JOEX_CONF"
msg_ok "Setup Docspell"
msg_info "Setup Apache Solr"
cd /opt/docspell
SOLR_DOWNLOAD_URL="https://downloads.apache.org/lucene/solr/"
latest_version=$(curl -s "$SOLR_DOWNLOAD_URL" | grep -oP '(?<=<a href=")[^"]+(?=/">[0-9])' | head -n 1)
latest_version=$(curl -fsSL "$SOLR_DOWNLOAD_URL" | grep -oP '(?<=<a href=")[^"]+(?=/">[0-9])' | head -n 1)
download_url="${SOLR_DOWNLOAD_URL}${latest_version}/solr-${latest_version}.tgz"
curl -fsSL "$download_url"
curl -fsSL "$download_url" -o "solr-$latest_version.tgz"
tar xzf "solr-$latest_version.tgz"
$STD bash "/opt/docspell/solr-$latest_version/bin/install_solr_service.sh" "solr-$latest_version.tgz"
mv /opt/solr /opt/docspell/solr

View File

@@ -1,80 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: kkroboth
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://fileflows.com/
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 \
ffmpeg
msg_ok "Installed Dependencies"
read -r -p "Do you need the intel-media-va-driver-non-free driver for HW encoding (Debian 12 only)? <y/N> " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing Intel Hardware Acceleration (non-free)"
cat <<EOF >/etc/apt/sources.list.d/non-free.list
deb http://deb.debian.org/debian bookworm non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware
deb-src http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates non-free non-free-firmware
EOF
$STD apt-get update
$STD apt-get install -y \
intel-media-va-driver-non-free \
ocl-icd-libopencl1 \
intel-opencl-icd \
vainfo,intel-gpu-tools
else
msg_info "Installing Intel Hardware Acceleration"
$STD apt-get install -y \
va-driver-all \
ocl-icd-libopencl1 \
intel-opencl-icd \
vainfo \
intel-gpu-tools
fi
msg_ok "Installed and Set Up Intel Hardware Acceleration"
msg_info "Installing ASP.NET Core Runtime"
curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -o packages-microsoft-prod.deb
$STD dpkg -i packages-microsoft-prod.deb
rm -rf packages-microsoft-prod.deb
$STD apt-get update
$STD apt-get install -y aspnetcore-runtime-8.0
msg_ok "Installed ASP.NET Core Runtime"
msg_info "Setup ${APPLICATION}"
$STD ln -svf /usr/bin/ffmpeg /usr/local/bin/ffmpeg
$STD ln -svf /usr/bin/ffprobe /usr/local/bin/ffprobe
temp_file=$(mktemp)
curl -fsSL https://fileflows.com/downloads/zip -o $temp_file
unzip -q -d /opt/fileflows $temp_file
(cd /opt/fileflows/Server && dotnet FileFlows.Server.dll --systemd install --root true)
systemctl enable -q --now fileflows.service
msg_ok "Setup ${APPLICATION}"
motd_ssh
customize
msg_info "Cleaning up"
rm -f $temp_file
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -5,7 +5,7 @@
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.freepbx.org/
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@@ -13,164 +13,16 @@ setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
build-essential \
git \
libnewt-dev \
libssl-dev \
libncurses5-dev \
subversion \
libsqlite3-dev \
libjansson-dev \
libxml2-dev \
uuid-dev \
default-libmysqlclient-dev \
htop \
sngrep \
lame \
ffmpeg \
mpg123 \
vim \
expect \
openssh-server \
apache2 \
mariadb-server \
mariadb-client \
bison \
flex \
php8.2 \
php8.2-{curl,cli,common,mysql,gd,mbstring,intl,xml} \
php-pear \
sox \
sqlite3 \
pkg-config \
automake \
libtool \
autoconf \
unixodbc-dev \
uuid \
libasound2-dev \
libogg-dev \
libvorbis-dev \
libicu-dev \
libcurl4-openssl-dev \
odbc-mariadb \
libical-dev \
libneon27-dev \
libsrtp2-dev \
libspandsp-dev \
subversion \
libtool-bin \
python-dev-is-python3 \
unixodbc \
software-properties-common \
nodejs \
npm \
ipset \
iptables \
fail2ban \
php-soap
msg_ok "Installed Dependencies"
msg_info "Installing Asterisk (Patience)"
cd /usr/src
curl -fsSL http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-21-current.tar.gz
tar xf asterisk-21-current.tar.gz
cd asterisk-21.*
$STD contrib/scripts/get_mp3_source.sh
$STD contrib/scripts/install_prereq install
$STD ./configure --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
$STD make
$STD make install
$STD make samples
$STD make config
ldconfig
msg_ok "Installed Asterisk"
msg_info "Setup Asterisk"
groupadd asterisk
useradd -r -d /var/lib/asterisk -g asterisk asterisk
usermod -aG audio,dialout asterisk
chown -R asterisk:asterisk /etc/asterisk
chown -R asterisk:asterisk /var/{lib,log,spool}/asterisk
chown -R asterisk:asterisk /usr/lib64/asterisk
sed -i 's|#AST_USER|AST_USER|' /etc/default/asterisk
sed -i 's|#AST_GROUP|AST_GROUP|' /etc/default/asterisk
sed -i 's|;runuser|runuser|' /etc/asterisk/asterisk.conf
sed -i 's|;rungroup|rungroup|' /etc/asterisk/asterisk.conf
echo "/usr/lib64" >> /etc/ld.so.conf.d/x86_64-linux-gnu.conf
ldconfig
msg_ok "Done Setup Asterisk"
msg_info "Setup Apache"
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/8.2/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/8.2/apache2/php.ini
sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
$STD a2enmod rewrite
systemctl restart apache2
rm /var/www/html/index.html
msg_ok "Done Setup Apache"
# Configure ODBC
cat <<EOF > /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF
cat <<EOF > /etc/odbc.ini
[MySQL-asteriskcdrdb]
Description = MySQL connection to 'asteriskcdrdb' database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF
msg_info "Installing FreePBX"
cd /usr/local/src
curl -fsSL http://mirror.freepbx.org/modules/packages/freepbx/freepbx-17.0-latest-EDGE.tgz
tar zxf freepbx-17.0-latest-EDGE.tgz
cd /usr/local/src/freepbx/
$STD ./start_asterisk start
# Even though the php code completes successfully, it is returning non-zero exit code, so in the next line we return true, needed for successful installation
# For some reason the next line is outputting even when verbosity not enabled?
$STD ./install -n || true
$STD fwconsole ma installall
$STD fwconsole reload
$STD fwconsole restart
msg_info "Installing FreePBX (Patience)"
curl -fsSL https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh -o /opt/sng_freepbx_debian_install.sh
$STD bash /opt/sng_freepbx_debian_install.sh
msg_ok "Installed FreePBX"
msg_info "Setup FreePBX Service"
cat <<EOF > /etc/systemd/system/freepbx.service
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable -q --now freepbx
msg_ok "Done Setup FreePBX Service"
motd_ssh
customize
# Cleanup
msg_info "Cleaning up"
rm /opt/sng_freepbx_debian_install.sh
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

121
install/homarr-install.sh Normal file
View File

@@ -0,0 +1,121 @@
#!/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: https://github.com/homarr-labs/homarr
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 \
redis-server \
ca-certificates \
gpg \
make \
g++ \
build-essential \
nginx \
gettext \
jq \
openssl
msg_ok "Installed Dependencies"
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')"
install_node_and_modules
fetch_and_deploy_gh_release "homarr-labs/homarr"
msg_info "Installing Homarr"
cd /opt
mkdir -p /opt/homarr_db
touch /opt/homarr_db/db.sqlite
SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)"
cd /opt/homarr
cat <<EOF >/opt/homarr/.env
DB_DRIVER='better-sqlite3'
DB_DIALECT='sqlite'
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
DB_URL='/opt/homarr_db/db.sqlite'
TURBO_TELEMETRY_DISABLED=1
AUTH_PROVIDERS='credentials'
NODE_ENV='production'
EOF
$STD pnpm install
$STD pnpm build
msg_ok "Installed Homarr"
msg_info "Copying build and config files"
cp /opt/homarr/apps/nextjs/next.config.ts .
cp /opt/homarr/apps/nextjs/package.json .
cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations
cp -r /opt/homarr/apps/nextjs/.next/standalone/* /opt/homarr
mkdir -p /appdata/redis
cp /opt/homarr/packages/redis/redis.conf /opt/homarr/redis.conf
mkdir -p /etc/nginx/templates
rm /etc/nginx/nginx.conf
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
mkdir -p /opt/homarr/apps/cli
cp /opt/homarr/packages/cli/cli.cjs /opt/homarr/apps/cli/cli.cjs
echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr
chmod +x /usr/bin/homarr
mkdir /opt/homarr/build
cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
msg_ok "Finished copying"
msg_info "Creating Services"
cat <<'EOF' >/opt/run_homarr.sh
#!/bin/bash
set -a
source /opt/homarr/.env
set +a
export DB_DIALECT='sqlite'
export AUTH_SECRET=$(openssl rand -base64 32)
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do
dirname=$(basename "$dir")
mkdir -p "/opt/homarr_db/migrations/$dirname"
cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true
done
export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
nginx -g 'daemon off;' &
redis-server /opt/homarr/packages/redis/redis.conf &
node apps/tasks/tasks.cjs &
node apps/websocket/wssServer.cjs &
node apps/nextjs/server.js & PID=$!
wait $PID
EOF
chmod +x /opt/run_homarr.sh
cat <<EOF >/etc/systemd/system/homarr.service
[Unit]
Description=Homarr Service
After=network.target
[Service]
Type=exec
WorkingDirectory=/opt/homarr
EnvironmentFile=-/opt/homarr/.env
ExecStart=/opt/run_homarr.sh
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now homarr
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/v${RELEASE}.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

469
install/immich-install.sh Normal file
View File

@@ -0,0 +1,469 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://immich.app
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Configuring apt and installing dependencies"
echo "deb http://deb.debian.org/debian testing main contrib" >/etc/apt/sources.list.d/immich.list
cat <<EOF >/etc/apt/preferences.d/immich
Package: *
Pin: release a=testing
Pin-Priority: -10
EOF
$STD apt-get update
$STD apt-get install --no-install-recommends -y \
git \
redis \
gnupg \
autoconf \
build-essential \
python3-venv \
python3-dev \
cmake \
jq \
libbrotli-dev \
libde265-dev \
libexif-dev \
libexpat1-dev \
libglib2.0-dev \
libgsf-1-dev \
libjpeg62-turbo-dev \
liblcms2-2 \
librsvg2-dev \
libspng-dev \
meson \
ninja-build \
pkg-config \
cpanminus \
libde265-0 \
libexif12 \
libexpat1 \
libgcc-s1 \
libglib2.0-0 \
libgomp1 \
libgsf-1-114 \
liblcms2-2 \
liblqr-1-0 \
libltdl7 \
libmimalloc2.0 \
libopenexr-3-1-30 \
libopenjp2-7 \
librsvg2-2 \
libspng0 \
mesa-utils \
mesa-va-drivers \
mesa-vulkan-drivers \
tini \
zlib1g
$STD apt-get install -y \
libgdk-pixbuf-2.0-dev librsvg2-dev libtool
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg
DPKG_ARCHITECTURE="$(dpkg --print-architecture)"
export DPKG_ARCHITECTURE
cat <<EOF >/etc/apt/sources.list.d/jellyfin.sources
Types: deb
URIs: https://repo.jellyfin.org/debian
Suites: bookworm
Components: main
Architectures: ${DPKG_ARCHITECTURE}
Signed-By: /etc/apt/keyrings/jellyfin.gpg
EOF
$STD apt-get update
$STD apt-get install -y jellyfin-ffmpeg7
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe
msg_ok "Dependencies Installed"
read -r -p "Install OpenVINO dependencies for Intel HW-accelerated machine-learning? " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
msg_info "Installing OpenVINO dependencies"
touch ~/.openvino
$STD apt-get -y install --no-install-recommends ocl-icd-libopencl1
tmp_dir=$(mktemp -d)
$STD pushd "$tmp_dir"
curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-core_1.0.17384.11_amd64.deb -O
curl -fsSL https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17384.11/intel-igc-opencl_1.0.17384.11_amd64.deb -O
curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/intel-opencl-icd_24.31.30508.7_amd64.deb -O
curl -fsSL https://github.com/intel/compute-runtime/releases/download/24.31.30508.7/libigdgmm12_22.4.1_amd64.deb -O
$STD dpkg -i ./*.deb
$STD popd
rm -rf "$tmp_dir"
dpkg -l | grep "intel-opencl-icd" | awk '{print $3}' >~/.intel_version
if [[ "$CTTYPE" == "0" ]]; then
chgrp video /dev/dri
chmod 755 /dev/dri
chmod 660 /dev/dri/*
$STD adduser "$(id -u -n)" video
$STD adduser "$(id -u -n)" render
fi
msg_ok "Installed OpenVINO dependencies"
fi
msg_info "Setting up Postgresql Database"
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
$STD apt-get update
$STD apt-get install -y postgresql-16
curl -fsSLO https://github.com/tensorchord/pgvecto.rs/releases/download/v0.3.0/vectors-pg16_0.3.0_amd64.deb
$STD dpkg -i vectors-pg16_0.3.0_amd64.deb
rm vectors-pg16_0.3.0_amd64.deb
DB_NAME="immich"
DB_USER="immich"
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c18)
sed -i -e "/^#shared_preload/s/^#//;/^shared_preload/s/''/'vectors.so'/" \
-e "/^#search_path/s/^#//;/^search_path/s/public'/public, vectors'/" /etc/postgresql/16/main/postgresql.conf
systemctl restart postgresql.service
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH ENCRYPTED PASSWORD '$DB_PASS';"
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
$STD sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE $DB_NAME to $DB_USER;"
$STD sudo -u postgres psql -c "ALTER USER $DB_USER WITH SUPERUSER;"
$STD sudo -u postgres psql -c "DROP EXTENSION IF EXISTS vectors;"
$STD sudo -u postgres psql -c "CREATE EXTENSION vectors;"
{
echo "${APPLICATION} DB Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >>~/"$APPLICATION".creds
msg_ok "Set up Postgresql Database"
msg_info "Installing NodeJS"
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_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
$STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed NodeJS"
msg_info "Installing Packages from Testing Repo"
export APT_LISTCHANGES_FRONTEND=none
export DEBIAN_FRONTEND=noninteractive
$STD apt-get install -t testing --no-install-recommends -y \
libio-compress-brotli-perl \
libwebp7 \
libwebpdemux2 \
libwebpmux3 \
libhwy1t64 \
libdav1d-dev \
libhwy-dev \
libwebp-dev
if [[ -f ~/.openvino ]]; then
$STD apt-get install -t testing -y patchelf
fi
msg_ok "Packages from Testing Repo Installed"
# Fix default DB collation issue after libc update
$STD sudo -u postgres psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION;"
$STD sudo -u postgres psql -c "ALTER DATABASE $DB_NAME REFRESH COLLATION VERSION;"
msg_info "Compiling Custom Photo-processing Library (extreme patience)"
LD_LIBRARY_PATH=/usr/local/lib
export LD_RUN_PATH=/usr/local/lib
STAGING_DIR=/opt/staging
BASE_REPO="https://github.com/immich-app/base-images"
BASE_DIR=${STAGING_DIR}/base-images
SOURCE_DIR=${STAGING_DIR}/image-source
$STD git clone -b main "$BASE_REPO" "$BASE_DIR"
mkdir -p "$SOURCE_DIR"
cd "$STAGING_DIR"
SOURCE=${SOURCE_DIR}/libjxl
JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"
: "${LIBJXL_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libjxl.json)}"
$STD git clone https://github.com/libjxl/libjxl.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$LIBJXL_REVISION"
$STD git submodule update --init --recursive --depth 1 --recommend-shallow
$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-empty-dht-marker.patch
$STD git apply "$BASE_DIR"/server/sources/libjxl-patches/jpegli-icc-warning.patch
mkdir build
cd build
$STD cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
-DJPEGXL_ENABLE_DOXYGEN=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_ENABLE_PLUGIN_GIMP210=OFF \
-DJPEGXL_ENABLE_BENCHMARK=OFF \
-DJPEGXL_ENABLE_EXAMPLES=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_FORCE_SYSTEM_HWY=ON \
-DJPEGXL_ENABLE_JPEGLI=ON \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=ON \
-DJPEGXL_INSTALL_JPEGLI_LIBJPEG=ON \
-DJPEGXL_ENABLE_PLUGINS=ON \
-DJPEGLI_LIBJPEG_LIBRARY_SOVERSION="$JPEGLI_LIBJPEG_LIBRARY_SOVERSION" \
-DJPEGLI_LIBJPEG_LIBRARY_VERSION="$JPEGLI_LIBJPEG_LIBRARY_VERSION" \
-DLIBJPEG_TURBO_VERSION_NUMBER=2001005 \
..
$STD cmake --build . -- -j"$(nproc)"
$STD cmake --install .
ldconfig /usr/local/lib
$STD make clean
cd "$STAGING_DIR"
rm -rf "$SOURCE"/{build,third_party}
SOURCE=${SOURCE_DIR}/libheif
: "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
$STD git clone https://github.com/strukturag/libheif.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$LIBHEIF_REVISION"
mkdir build
cd build
$STD cmake --preset=release-noplugins \
-DWITH_DAV1D=ON \
-DENABLE_PARALLEL_TILE_DECODING=ON \
-DWITH_LIBSHARPYUV=ON \
-DWITH_LIBDE265=ON \
-DWITH_AOM_DECODER=OFF \
-DWITH_AOM_ENCODER=OFF \
-DWITH_X265=OFF \
-DWITH_EXAMPLES=OFF \
..
$STD make install -j "$(nproc)"
ldconfig /usr/local/lib
$STD make clean
cd "$STAGING_DIR"
rm -rf "$SOURCE"/build
SOURCE=${SOURCE_DIR}/libraw
: "${LIBRAW_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libraw.json)}"
$STD git clone https://github.com/libraw/libraw.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$LIBRAW_REVISION"
$STD autoreconf --install
$STD ./configure
$STD make -j"$(nproc)"
$STD make install
ldconfig /usr/local/lib
$STD make clean
cd "$STAGING_DIR"
SOURCE=$SOURCE_DIR/imagemagick
: "${IMAGEMAGICK_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/imagemagick.json)}"
$STD git clone https://github.com/ImageMagick/ImageMagick.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$IMAGEMAGICK_REVISION"
$STD ./configure --with-modules
$STD make -j"$(nproc)"
$STD make install
ldconfig /usr/local/lib
$STD make clean
cd "$STAGING_DIR"
SOURCE=$SOURCE_DIR/libvips
: "${LIBVIPS_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libvips.json)}"
$STD git clone https://github.com/libvips/libvips.git "$SOURCE"
cd "$SOURCE"
$STD git reset --hard "$LIBVIPS_REVISION"
$STD meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled
cd build
$STD ninja install
ldconfig /usr/local/lib
cd "$STAGING_DIR"
rm -rf "$SOURCE"/build
{
echo "imagemagick: $IMAGEMAGICK_REVISION"
echo "libheif: $LIBHEIF_REVISION"
echo "libjxl: $LIBJXL_REVISION"
echo "libraw: $LIBRAW_REVISION"
echo "libvips: $LIBVIPS_REVISION"
} >~/.immich_library_revisions
msg_ok "Custom Photo-processing Library Compiled"
msg_info "Installing ${APPLICATION} (more patience please)"
tmp_file=$(mktemp)
RELEASE=$(curl -s https://api.github.com/repos/immich-app/immich/releases?per_page=1 | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/immich-app/immich/archive/refs/tags/v${RELEASE}.zip" -o "$tmp_file"
unzip -q "$tmp_file"
INSTALL_DIR="/opt/${APPLICATION}"
UPLOAD_DIR="${INSTALL_DIR}/upload"
SRC_DIR="${INSTALL_DIR}/source"
APP_DIR="${INSTALL_DIR}/app"
ML_DIR="${APP_DIR}/machine-learning"
GEO_DIR="${INSTALL_DIR}/geodata"
mkdir -p "$INSTALL_DIR"
mv "$APPLICATION-$RELEASE"/ "$SRC_DIR"
mkdir -p {"${APP_DIR}","${UPLOAD_DIR}","${GEO_DIR}","${ML_DIR}","${INSTALL_DIR}"/cache}
cd "$SRC_DIR"/server
$STD npm install -g node-gyp node-pre-gyp
$STD npm ci
$STD npm run build
$STD npm prune --omit=dev --omit=optional
cd "$SRC_DIR"/open-api/typescript-sdk
$STD npm ci
$STD npm run build
cd "$SRC_DIR"/web
$STD npm ci
$STD npm run build
cd "$SRC_DIR"
cp -a server/{node_modules,dist,bin,resources,package.json,package-lock.json,start*.sh} "$APP_DIR"/
cp -a web/build "$APP_DIR"/www
cp LICENSE "$APP_DIR"
# cp "$BASE_DIR"/server/bin/build-lock.json "$APP_DIR"
msg_ok "Installed Immich Web Components"
cd "$SRC_DIR"/machine-learning
$STD python3 -m venv "$ML_DIR/ml-venv"
if [[ -f ~/.openvino ]]; then
msg_info "Installing HW-accelerated machine-learning"
(
source "$ML_DIR"/ml-venv/bin/activate
$STD pip3 install uv
uv -q sync --extra openvino --no-cache --active
)
patchelf --clear-execstack "$ML_DIR"/ml-venv/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-311-x86_64-linux-gnu.so
msg_ok "Installed HW-accelerated machine-learning"
else
msg_info "Installing machine-learning"
(
source "$ML_DIR"/ml-venv/bin/activate
$STD pip3 install uv
uv -q sync --extra cpu --no-cache --active
)
msg_ok "Installed machine-learning"
fi
cd "$SRC_DIR"
cp -a machine-learning/{ann,immich_ml} "$ML_DIR"
if [[ -f ~/.openvino ]]; then
sed -i "/intra_op/s/int = 0/int = os.cpu_count() or 0/" "$ML_DIR"/immich_ml/config.py
fi
ln -sf "$APP_DIR"/resources "$INSTALL_DIR"
cd "$APP_DIR"
grep -Rl /usr/src | xargs -n1 sed -i "s|\/usr/src|$INSTALL_DIR|g"
grep -RlE "'/build'" | xargs -n1 sed -i "s|'/build'|'$APP_DIR'|g"
sed -i "s@\"/cache\"@\"$INSTALL_DIR/cache\"@g" "$ML_DIR"/immich_ml/config.py
ln -s "$UPLOAD_DIR" "$APP_DIR"/upload
ln -s "$UPLOAD_DIR" "$ML_DIR"/upload
msg_info "Installing Immich CLI"
$STD npm install --build-from-source sharp
rm -rf "$APP_DIR"/node_modules/@img/sharp-{libvips*,linuxmusl-x64}
$STD npm i -g @immich/cli
msg_ok "Installed Immich CLI"
msg_info "Installing GeoNames data"
cd "$GEO_DIR"
URL_LIST=(
https://download.geonames.org/export/dump/admin1CodesASCII.txt
https://download.geonames.org/export/dump/admin2Codes.txt
https://download.geonames.org/export/dump/cities500.zip
https://raw.githubusercontent.com/nvkelso/natural-earth-vector/v5.1.2/geojson/ne_10m_admin_0_countries.geojson
)
echo "${URL_LIST[@]}" | xargs -n1 -P 8 wget -q
unzip -q cities500.zip
date --iso-8601=seconds | tr -d "\n" >geodata-date.txt
rm cities500.zip
cd "$INSTALL_DIR"
ln -s "$GEO_DIR" "$APP_DIR"
msg_ok "Installed GeoNames data"
mkdir -p /var/log/immich
touch /var/log/immich/{web.log,ml.log}
echo "$RELEASE" >/opt/"${APPLICATION}"_version.txt
msg_ok "Installed ${APPLICATION}"
msg_info "Creating user, env file, scripts & services"
$STD useradd -U -s /usr/sbin/nologin -r -M -d "$INSTALL_DIR" immich
if [[ -f ~/.openvino ]]; then
usermod -aG video,render immich
fi
cat <<EOF >"${INSTALL_DIR}"/.env
TZ=$(cat /etc/timezone)
IMMICH_VERSION=release
NODE_ENV=production
DB_HOSTNAME=127.0.0.1
DB_USERNAME=${DB_USER}
DB_PASSWORD=${DB_PASS}
DB_DATABASE_NAME=${DB_NAME}
DB_VECTOR_EXTENSION=pgvecto.rs
REDIS_HOSTNAME=127.0.0.1
IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003
MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache
EOF
cat <<EOF >"${ML_DIR}"/ml_start.sh
#!/usr/bin/env bash
cd ${ML_DIR}
. ml-venv/bin/activate
set -a
. ${INSTALL_DIR}/.env
set +a
python -m immich_ml
EOF
chmod +x "$ML_DIR"/ml_start.sh
cat <<EOF >/etc/systemd/system/"${APPLICATION}"-web.service
[Unit]
Description=${APPLICATION} Web Service
After=network.target
Requires=redis-server.service
Requires=postgresql.service
Requires=immich-ml.service
[Service]
Type=simple
User=immich
Group=immich
UMask=0077
WorkingDirectory=${APP_DIR}
EnvironmentFile=${INSTALL_DIR}/.env
ExecStart=/usr/bin/node ${APP_DIR}/dist/main
Restart=on-failure
SyslogIdentifier=immich-web
StandardOutput=append:/var/log/immich/web.log
StandardError=append:/var/log/immich/web.log
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/"${APPLICATION}"-ml.service
[Unit]
Description=${APPLICATION} Machine-Learning
After=network.target
[Service]
Type=simple
UMask=0077
User=immich
Group=immich
WorkingDirectory=${APP_DIR}
EnvironmentFile=${INSTALL_DIR}/.env
ExecStart=${ML_DIR}/ml_start.sh
Restart=on-failure
SyslogIdentifier=immich-machine-learning
StandardOutput=append:/var/log/immich/ml.log
StandardError=append:/var/log/immich/ml.log
[Install]
WantedBy=multi-user.target
EOF
chown -R immich:immich "$INSTALL_DIR" /var/log/immich
systemctl enable -q --now "$APPLICATION"-ml.service "$APPLICATION"-web.service
msg_ok "Created user, env file, scripts and services"
sed -i "$ a VERSION_ID=12" /etc/os-release # otherwise the motd_ssh function will fail
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$tmp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/jitsi/jitsi-meet
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 \
lsb-release \
debconf-utils
msg_ok "Installed Dependencies"
msg_info "Setting up repositories"
curl -fsSL https://prosody.im/files/prosody-debian-packages.key -o /etc/apt/keyrings/prosody-debian-packages.key
echo "deb [signed-by=/etc/apt/keyrings/prosody-debian-packages.key] http://packages.prosody.im/debian $(lsb_release -sc) main" >/etc/apt/sources.list.d/prosody-debian-packages.list
curl -fsSL https://download.jitsi.org/jitsi-key.gpg.key | gpg --dearmor -o /usr/share/keyrings/jitsi-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/" >/etc/apt/sources.list.d/jitsi-stable.list
$STD apt-get update
msg_ok "Done setting up repositories"
msg_info "Installing jitsi-meet"
IP=$(hostname -I | awk '{print $1}')
PASS="$(openssl rand -base64 18 | cut -c1-13)"
SECRET="$(openssl rand -base64 18 | cut -c1-13)"
JVBSECRET="$(openssl rand -base64 18 | cut -c1-13)"
echo "jicofo jicofo/jicofo-authpassword password $PASS" | debconf-set-selections
echo "jitsi-meet-prosody jicofo/jicofo-authpassword password $PASS" | debconf-set-selections
echo "jitsi-meet-prosody jitsi-meet-prosody/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-prosody jitsi-meet-prosody/turn-secret string $SECRET" | debconf-set-selections
echo "jitsi-meet-turnserver jitsi-meet-turnserver/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/cert-choice select Generate a new self-signed certificate" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/cert-path-crt string '/var/lib/prosody/auth.$IP.crt'" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/cert-path-key string '/var/lib/prosody/$IP.key'" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/email string ''" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/jaas-choice boolean false" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-meet/jvb-hostname string $IP" | debconf-set-selections
echo "jicofo jitsi-videobridge/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-prosody jitsi-videobridge/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-turnserver jitsi-videobridge/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-web-config jitsi-videobridge/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-videobridge2 jitsi-videobridge/jvb-hostname string $IP" | debconf-set-selections
echo "jitsi-meet-prosody jitsi-videobridge/jvbsecret password $JVBSECRET" | debconf-set-selections
echo "jitsi-videobridge2 jitsi-videobridge/jvbsecret password $JVBSECRET" | debconf-set-selections
$STD apt-get install -y \
lua5.2 \
jitsi-meet
msg_ok "Installed jitsi-meet"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Nícolas Pastorello (opastorello)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/jumpserver/jumpserver
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 \
tar \
iptables
msg_ok "Installed Dependencies"
msg_info "Installing JumpServer"
cd /opt
RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz
mkdir -p /opt/jumpserver
$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1
cd /opt/jumpserver
$STD ./jmsctl.sh install <<EOF
n
n
n
redis
n
n
EOF
$STD ./jmsctl.sh start
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Installed JumpServer"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -15,91 +15,77 @@ update_os
msg_info "Installing Dependencies"
$STD apt-get install -y \
sudo \
curl \
mc \
lsb-release \
ca-certificates \
wget \
acl \
fping \
graphviz \
imagemagick \
mariadb-client \
mariadb-server \
mtr-tiny \
nginx-full \
nmap \
php8.2-{cli,fpm,gd,gmp,mbstring,mysql,snmp,xml,zip,curl} \
python3-{dotenv,pymysql,redis,setuptools,systemd,pip} \
rrdtool \
snmp \
snmpd \
unzip \
git \
whois
lsb-release \
ca-certificates \
acl \
fping \
graphviz \
imagemagick \
mtr-tiny \
nginx \
nmap \
rrdtool \
snmp \
snmpd
msg_ok "Installed Dependencies"
msg_info "Add User"
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
msg_ok "Add User"
PHP_VERSION=8.2 PHP_FPM=YES PHP_APACHE=NO PHP_MODULE="gmp,mysql,snmp" install_php
install_mariadb
install_composer
setup_uv
msg_info "Setup Librenms"
tmp_file=$(mktemp)
RELEASE=$(curl -s https://api.github.com/repos/librenms/librenms/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q https://github.com/librenms/librenms/archive/refs/tags/${RELEASE}.tar.gz -O $tmp_file
tar -xzf $tmp_file -C /opt
mv /opt/librenms-${RELEASE} /opt/librenms
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
msg_ok "Setup Librenms"
msg_info "Setup Composer"
cd /opt
wget https://getcomposer.org/composer-stable.phar
mv composer-stable.phar /usr/bin/composer
chmod +x /usr/bin/composer
cd /opt/librenms
composer install --no-dev -o --no-interaction
chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms
setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
msg_ok "Setup Composer"
msg_info "Setup PHP"
sed -i 's/;date.timezone =/date.timezone = UTC/' /etc/php/8.2/cli/php.ini
sed -i 's/;date.timezone =/date.timezone = UTC/' /etc/php/8.2/fpm/php.ini
msg_ok "Setup PHP"
msg_info "Setup MariaDB"
sed -i '/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0' /etc/mysql/mariadb.conf.d/50-server.cnf
systemctl enable -q --now mariadb
msg_ok "Setup MariaDB"
msg_info "Installing Python"
$STD apt-get install -y \
python3-{dotenv,pymysql,redis,setuptools,systemd,pip}
msg_ok "Installed Python"
msg_info "Configuring Database"
DB_NAME=librenms
DB_USER=librenms
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "LibreNMS-Credentials"
echo "LibreNMS Database User: $DB_USER"
echo "LibreNMS Database Password: $DB_PASS"
echo "LibreNMS Database Name: $DB_NAME"
echo "LibreNMS-Credentials"
echo "LibreNMS Database User: $DB_USER"
echo "LibreNMS Database Password: $DB_PASS"
echo "LibreNMS Database Name: $DB_NAME"
} >>~/librenms.creds
msg_ok "Configured Database"
msg_info "Setup Librenms"
$STD useradd librenms -d /opt/librenms -M -r -s "$(which bash)"
fetch_and_deploy_gh_release "librenms/librenms"
setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
setfacl -R -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
cd /opt/librenms
$STD uv venv .venv
$STD source .venv/bin/activate
$STD uv pip install -r requirements.txt
cat <<EOF >/opt/librenms/.env
DB_DATABASE=${DB_NAME}
DB_USERNAME=${DB_USER}
DB_PASSWORD=${DB_PASS}
EOF
chown -R librenms:librenms /opt/librenms
chmod 771 /opt/librenms
setfacl -d -m g::rwx /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
chmod -R ug=rwX /opt/librenms/bootstrap/cache /opt/librenms/storage /opt/librenms/logs /opt/librenms/rrd
msg_ok "Setup LibreNMS"
msg_info "Configure MariaDB"
sed -i "/\[mysqld\]/a innodb_file_per_table=1\nlower_case_table_names=0" /etc/mysql/mariadb.conf.d/50-server.cnf
systemctl enable -q --now mariadb
msg_ok "Configured MariaDB"
msg_info "Configure PHP-FPM"
cp /etc/php/8.2/fpm/pool.d/www.conf /etc/php/8.2/fpm/pool.d/librenms.conf
sed -i "s/\[www\]/\[librenms\]/g" /etc/php/8.2/fpm/pool.d/librenms.conf
sed -i "s/user = www-data/user = librenms/g" /etc/php/8.2/fpm/pool.d/librenms.conf
sed -i "s/group = www-data/group = librenms/g" /etc/php/8.2/fpm/pool.d/librenms.conf
sed -i "s/listen = \/run\/php\/php8.2-fpm.sock/listen = \/run\/php-fpm-librenms.sock/g" /etc/php/8.2/fpm/pool.d/librenms.conf
msg_ok "Configured PHP-FPM"
msg_info "Configure Nginx"
@@ -128,18 +114,23 @@ server {
}
EOF
rm /etc/nginx/sites-enabled/default
systemctl reload nginx
$STD systemctl reload nginx
systemctl restart php8.2-fpm
msg_ok "Configured Nginx"
msg_info "Configure Services"
COMPOSER_ALLOW_SUPERUSER=1
$STD composer install --no-dev
$STD php8.2 artisan migrate --force
$STD php8.2 artisan key:generate --force
$STD su librenms -s /bin/bash -c "lnms db:seed --force"
$STD su librenms -s /bin/bash -c "lnms user:add -p admin -r admin admin"
ln -s /opt/librenms/lnms /usr/bin/lnms
mkdir -p /etc/bash_completion.d/
cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf
RANDOM_STRING=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
RANDOM_STRING=$(openssl rand -base64 16 | tr -dc 'a-zA-Z0-9')
sed -i "s/RANDOMSTRINGHERE/$RANDOM_STRING/g" /etc/snmp/snmpd.conf
echo "SNMP Community String: $RANDOM_STRING" >>~/librenms.creds
curl -qo /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
@@ -149,8 +140,7 @@ systemctl enable -q --now snmpd
cp /opt/librenms/dist/librenms.cron /etc/cron.d/librenms
cp /opt/librenms/dist/librenms-scheduler.service /opt/librenms/dist/librenms-scheduler.timer /etc/systemd/system/
systemctl enable librenms-scheduler.timer
systemctl start librenms-scheduler.timer
systemctl enable -q --now librenms-scheduler.timer
cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
msg_ok "Configured Services"
@@ -158,7 +148,7 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -f $tmp_file
$STD apt-get -y autoremove
rm -f /temp_file
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: elvito
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/librespeed/speedtest
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 update
$STD apt-get install -y \
caddy \
php-fpm
msg_ok "Installed Dependencies"
msg_info "Installing librespeed"
temp_file=$(mktemp)
RELEASE=$(curl -fsSL https://api.github.com/repos/librespeed/speedtest/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
curl -fsSL "https://github.com/librespeed/speedtest/archive/refs/tags/${RELEASE}.zip" -o "$temp_file"
mkdir -p /opt/librespeed
mkdir -p /temp
unzip -q "$temp_file" -d /temp
cd /temp/speedtest-"${RELEASE}"
cp -u favicon.ico index.html speedtest.js speedtest_worker.js /opt/librespeed/
cp -ru backend results /opt/librespeed/
cat <<EOF >/etc/caddy/Caddyfile
:80 {
root * /opt/librespeed
file_server
php_fastcgi unix//run/php/php-fpm.sock
}
EOF
systemctl restart caddy
echo "${RELEASE}" >/opt/"${APP}_version.txt"
msg_ok "Installation completed"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /temp
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -4,7 +4,7 @@
# Author: bvdberg01
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@@ -17,8 +17,7 @@ $STD apt-get install -y \
curl \
sudo \
mc \
gnupg2\
postgresql \
gnupg2 postgresql \
lsb-release \
rbenv \
libpq-dev \
@@ -38,81 +37,85 @@ 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 "Manyfold Credentials"
echo "Manyfold Database User: $DB_USER"
echo "Manyfold Database Password: $DB_PASS"
echo "Manyfold Database Name: $DB_NAME"
} >> ~/manyfold.creds
echo "Manyfold Credentials"
echo "Manyfold Database User: $DB_USER"
echo "Manyfold Database Password: $DB_PASS"
echo "Manyfold Database Name: $DB_NAME"
} >>~/manyfold.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_22.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 "Downloading Manyfold"
RELEASE=$(curl -fsSL https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt
curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip
unzip -q manyfold.zip
mv /opt/manyfold-${RELEASE}/ /opt/manyfold
RUBY_INSTALL_VERSION=$(cat /opt/manyfold/.ruby-version)
YARN_VERSION=$(grep '"packageManager":' /opt/manyfold/package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/')
msg_info "Add ruby-build"
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -s "https://github.com/rbenv/ruby-build/archive/refs/tags/${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip
unzip ruby-build.zip
echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt
msg_ok "Added ruby-build"
msg_ok "Downloaded Manyfold"
NODE_VERSION="22" NODE_MODULE="npm@latest,${YARN_VERSION}" install_node_and_modules
RUBY_VERSION=${RUBY_INSTALL_VERSION} RUBY_INSTALL_RAILS="true" setup_rbenv_stack
# msg_info "Add ruby-build"
# mkdir -p ~/.rbenv/plugins
# cd ~/.rbenv/plugins
# RUBY_BUILD_RELEASE=$(curl -s https://api.github.com/repos/rbenv/ruby-build/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
# curl -fsSL "https://github.com/rbenv/ruby-build/archive/refs/tags/v${RUBY_BUILD_RELEASE}.zip" -o ruby-build.zip
# unzip -q ruby-build.zip
# mv ruby-build-* ~/.rbenv/plugins/ruby-build
# echo "${RUBY_BUILD_RELEASE}" >~/.rbenv/plugins/RUBY_BUILD_version.txt
# msg_ok "Added ruby-build"
# msg_info "Installing ruby ${RUBY_VERSION}"
# $STD rbenv install $RUBY_VERSION
# echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >>~/.bashrc
# echo 'eval "$(rbenv init -)"' >>~/.bashrc
# source ~/.bashrc
# msg_ok "Installed ruby ${RUBY_VERSION}"
msg_info "Adding manyfold user"
useradd -m -s /usr/bin/bash manyfold
msg_ok "Added manyfold user"
msg_info "Setting .env file"
cat <<EOF >/opt/.env
export APP_VERSION=${RELEASE}
export GUID=1002
export PUID=1001
export PUBLIC_HOSTNAME=subdomain.somehost.org
export PUBLIC_PORT=5000
export REDIS_URL=redis://127.0.0.1:6379/1
export DATABASE_ADAPTER=postgresql
export DATABASE_HOST=127.0.0.1
export DATABASE_USER=${DB_USER}
export DATABASE_PASSWORD=${DB_PASS}
export DATABASE_NAME=${DB_NAME}
export DATABASE_CONNECTION_POOL=16
export MULTIUSER=enabled
export HTTPS_ONLY=false
export RAILS_ENV=production
EOF
msg_ok ".env file setup"
msg_info "Installing Manyfold"
RELEASE=$(curl -s https://api.github.com/repos/manyfold3d/manyfold/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cd /opt
curl -fsSL "https://github.com/manyfold3d/manyfold/archive/refs/tags/v${RELEASE}.zip" -o manyfold.zip
unzip -q manyfold.zip
mv /opt/manyfold-${RELEASE}/ /opt/manyfold
source /opt/.env
cd /opt/manyfold
chown -R manyfold:manyfold /opt/manyfold
RUBY_VERSION=$(cat .ruby-version)
YARN_VERSION=$(grep '"packageManager":' package.json | sed -E 's/.*"(yarn@[0-9\.]+)".*/\1/')
$STD gem install bundler
$STD rbenv install $RUBY_VERSION
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
$STD rbenv global $RUBY_VERSION
$STD rbenv global $RUBY_INSTALL_VERSION
$STD bundle install
$STD gem install sidekiq
$STD npm install --global corepack
corepack enable
$STD corepack prepare $YARN_VERSION --activate
$STD corepack use $YARN_VERSION
$STD yarn install
cat <<EOF >/opt/.env
APP_VERSION=${RELEASE}
GUID=1002
PUID=1001
PUBLIC_HOSTNAME=subdomain.somehost.org
PUBLIC_PORT=5000
SECRET_KEY_BASE=$(bundle exec rails secret)
REDIS_URL=redis://127.0.0.1:6379/1
DATABASE_ADAPTER=postgresql
DATABASE_HOST=127.0.0.1
DATABASE_USER=${DB_USER}
DATABASE_PASSWORD=${DB_PASS}
DATABASE_NAME=${DB_NAME}
DATABASE_CONNECTION_POOL=16
MULTIUSER=enabled
HTTPS_ONLY=false
RAILS_ENV=production
EOF
chown manyfold:manyfold /opt/.env
$STD source /opt/.env && bin/rails credentials:edit
$STD source /opt/.env && bin/rails db:migrate
$STD source /opt/.env && bin/rails assets:precompile
rm /opt/manyfold/config/credentials.yml.enc
$STD bin/rails credentials:edit
$STD bin/rails db:migrate
$STD bin/rails assets:precompile
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Installed manyfold"
@@ -127,8 +130,7 @@ Type=simple
User=root
Group=root
WorkingDirectory=/opt/manyfold
EnvironmentFile=/opt/.env
ExecStart=/usr/bin/bash -lc '/opt/manyfold/bin/rails server -b 127.0.0.1 --port 5000 --environment production'
ExecStart=/usr/bin/bash -lc 'source /opt/.env && /opt/manyfold/bin/rails server -b 127.0.0.1 --port 5000 --environment production'
TimeoutSec=30
RestartSec=15s
Restart=always

View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
# Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Luligu/matterbridge/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Install Matterbridge"
mkdir -p /root/Matterbridge
NODE_VERSION="22"
NODE_MODULE="matterbridge"
install_node_and_modules
msg_ok "Installed Matterbridge"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/matterbridge.service
[Unit]
Description=matterbridge
After=network-online.target
[Service]
Type=simple
ExecStart=matterbridge -bridge -service
WorkingDirectory=/root/Matterbridge
StandardOutput=inherit
StandardError=inherit
Restart=always
RestartSec=10s
TimeoutStopSec=30s
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now matterbridge
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,125 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.meilisearch.com/
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 \
gnupg \
mc
msg_ok "Installed Dependencies"
msg_info "Setup ${APPLICATION}"
tmp_file=$(mktemp)
RELEASE=$(curl -s https://api.github.com/repos/meilisearch/meilisearch/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch.deb -o $tmp_file
$STD dpkg -i $tmp_file
curl -fsSL https://raw.githubusercontent.com/meilisearch/meilisearch/latest/config.toml -o /etc/meilisearch.toml
MASTER_KEY=$(openssl rand -base64 12)
LOCAL_IP="$(hostname -I | awk '{print $1}')"
sed -i \
-e 's|^env =.*|env = "production"|' \
-e "s|^# master_key =.*|master_key = \"$MASTER_KEY\"|" \
-e 's|^db_path =.*|db_path = "/var/lib/meilisearch/data"|' \
-e 's|^dump_dir =.*|dump_dir = "/var/lib/meilisearch/dumps"|' \
-e 's|^snapshot_dir =.*|snapshot_dir = "/var/lib/meilisearch/snapshots"|' \
-e 's|^# no_analytics = true|no_analytics = true|' \
-e 's|^http_addr =.*|http_addr = "0.0.0.0:7700"|' \
/etc/meilisearch.toml
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup ${APPLICATION}"
read -r -p "Do you want add meilisearch-ui? [y/n]: " prompt
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
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_22.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 -g pnpm
msg_ok "Installed Node.js"
msg_info "Setup ${APPLICATION}-ui"
tmp_file=$(mktemp)
tmp_dir=$(mktemp -d)
mkdir -p /opt/meilisearch-ui
RELEASE_UI=$(curl -s https://api.github.com/repos/riccox/meilisearch-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/riccox/meilisearch-ui/archive/refs/tags/${RELEASE_UI}.zip" -o $tmp_file
unzip -q "$tmp_file" -d "$tmp_dir"
mv "$tmp_dir"/*/* /opt/meilisearch-ui/
cd /opt/meilisearch-ui
sed -i 's|const hash = execSync("git rev-parse HEAD").toString().trim();|const hash = "unknown";|' /opt/meilisearch-ui/vite.config.ts
$STD pnpm install
cat <<EOF > /opt/meilisearch-ui/.env.local
VITE_SINGLETON_MODE=true
VITE_SINGLETON_HOST=http://${LOCAL_IP}:7700
VITE_SINGLETON_API_KEY=${MASTER_KEY}
EOF
echo "${RELEASE_UI}" >/opt/${APPLICATION}-ui_version.txt
msg_ok "Setup ${APPLICATION}-ui"
fi
msg_info "Setting up Services"
cat <<EOF >/etc/systemd/system/meilisearch.service
[Unit]
Description=Meilisearch
After=network.target
[Service]
ExecStart=/usr/bin/meilisearch --config-file-path /etc/meilisearch.toml
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now meilisearch
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
cat <<EOF > /etc/systemd/system/meilisearch-ui.service
[Unit]
Description=Meilisearch UI Service
After=network.target meilisearch.service
Requires=meilisearch.service
[Service]
User=root
WorkingDirectory=/opt/meilisearch-ui
ExecStart=/usr/bin/pnpm start
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=meilisearch-ui
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now meilisearch-ui
fi
msg_ok "Set up Services"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,187 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://nginxproxymanager.com/
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 update
$STD apt-get -y install \
sudo \
mc \
curl \
gnupg \
make \
gcc \
g++ \
ca-certificates \
apache2-utils \
logrotate \
build-essential \
git
msg_ok "Installed Dependencies"
msg_info "Installing Python3"
$STD apt-get install -y \
python3 \
python3-dev \
python3-pip \
python3-venv \
python3-cffi \
python3-certbot \
python3-certbot-dns-cloudflare
$STD pip3 install certbot-dns-multi
$STD python3 -m venv /opt/certbot/
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Installed Python3"
msg_info "Installing Openresty"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
wget -qO - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/openresty.gpg
echo -e "deb http://openresty.org/package/debian $VERSION openresty" >/etc/apt/sources.list.d/openresty.list
$STD apt-get update
$STD apt-get -y install openresty
msg_ok "Installed Openresty"
msg_info "Installing Node.js"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh)
source ~/.bashrc
$STD nvm install 16.20.2
ln -sf /root/.nvm/versions/node/v16.20.2/bin/node /usr/bin/node
msg_ok "Installed Node.js"
msg_info "Installing pnpm"
$STD npm install -g pnpm@8.15
msg_ok "Installed pnpm"
msg_info "Setup Nginx Proxy Manager"
RELEASE=$(curl -s https://api.github.com/repos/NginxProxyManager/nginx-proxy-manager/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q https://codeload.github.com/NginxProxyManager/nginx-proxy-manager/tar.gz/v${RELEASE} -O - | tar -xz
cd ./nginx-proxy-manager-${RELEASE}
ln -sf /usr/bin/python3 /usr/bin/python
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
ln -sf /usr/local/openresty/nginx/ /etc/nginx
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
for NGINX_CONF in $NGINX_CONFS; do
sed -i 's+include conf.d+include /etc/nginx/conf.d+g' "$NGINX_CONF"
done
mkdir -p /var/www/html /etc/nginx/logs
cp -r docker/rootfs/var/www/html/* /var/www/html/
cp -r docker/rootfs/etc/nginx/* /etc/nginx/
cp docker/rootfs/etc/letsencrypt.ini /etc/letsencrypt.ini
cp docker/rootfs/etc/logrotate.d/nginx-proxy-manager /etc/logrotate.d/nginx-proxy-manager
ln -sf /etc/nginx/nginx.conf /etc/nginx/conf/nginx.conf
rm -f /etc/nginx/conf.d/dev.conf
mkdir -p /tmp/nginx/body \
/run/nginx \
/data/nginx \
/data/custom_ssl \
/data/logs \
/data/access \
/data/nginx/default_host \
/data/nginx/default_www \
/data/nginx/proxy_host \
/data/nginx/redirection_host \
/data/nginx/stream \
/data/nginx/dead_host \
/data/nginx/temp \
/var/lib/nginx/cache/public \
/var/lib/nginx/cache/private \
/var/cache/nginx/proxy_temp
chmod -R 777 /var/cache/nginx
chown root /tmp/nginx
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" {print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf);" >/etc/nginx/conf.d/include/resolvers.conf
if [ ! -f /data/nginx/dummycert.pem ] || [ ! -f /data/nginx/dummykey.pem ]; then
openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj "/O=Nginx Proxy Manager/OU=Dummy Certificate/CN=localhost" -keyout /data/nginx/dummykey.pem -out /data/nginx/dummycert.pem &>/dev/null
fi
mkdir -p /app/global /app/frontend/images
cp -r backend/* /app
cp -r global/* /app/global
msg_ok "Setup Nginx Proxy Manager"
msg_info "Building Frontend"
cd ./frontend
$STD pnpm install
$STD pnpm upgrade
$STD pnpm run build
cp -r dist/* /app/frontend
cp -r app-images/* /app/frontend/images
msg_ok "Built Frontend"
msg_info "Initializing Backend"
rm -rf /app/config/default.json
if [ ! -f /app/config/production.json ]; then
cat <<'EOF' >/app/config/production.json
{
"database": {
"engine": "knex-native",
"knex": {
"client": "sqlite3",
"connection": {
"filename": "/data/database.sqlite"
}
}
}
}
EOF
fi
cd /app
$STD pnpm install
msg_ok "Initialized Backend"
msg_info "Creating Service"
cat <<'EOF' >/lib/systemd/system/npm.service
[Unit]
Description=Nginx Proxy Manager
After=network.target
Wants=openresty.service
[Service]
Type=simple
Environment=NODE_ENV=production
ExecStartPre=-mkdir -p /tmp/nginx/body /data/letsencrypt-acme-challenge
ExecStart=/usr/bin/node index.js --abort_on_uncaught_exception --max_old_space_size=250
WorkingDirectory=/app
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
msg_ok "Created Service"
motd_ssh
customize
msg_info "Starting Services"
sed -i 's/user npm/user root/g; s/^pid/#pid/g' /usr/local/openresty/nginx/conf/nginx.conf
sed -r -i 's/^([[:space:]]*)su npm npm/\1#su npm npm/g;' /etc/logrotate.d/nginx-proxy-manager
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/g' /opt/certbot/pyvenv.cfg
systemctl enable -q --now openresty
systemctl enable -q --now npm
msg_ok "Started Services"
msg_info "Cleaning up"
rm -rf ../nginx-proxy-manager-*
systemctl restart openresty
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,98 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: michelroegl-brunner
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/opf/openproject
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 \
ca-certificates \
gpg
msg_ok "Installed Dependencies"
msg_info "Setup OpenProject Repository"
wget -qO- https://dl.packager.io/srv/opf/openproject/key | gpg --dearmor >/etc/apt/trusted.gpg.d/packager-io.gpg
wget -qO /etc/apt/sources.list.d/openproject.list https://dl.packager.io/srv/opf/openproject/stable/15/installer/debian/12.repo
msg_ok "Setup OpenProject Repository"
msg_info "Setup PostgreSQL Repository"
VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)"
echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list
curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg
msg_ok "Setup PostgreSQL Repository"
msg_info "Installing PostgreSQL"
$STD apt-get update
$STD apt-get install -y postgresql
msg_ok "Installed PostgreSQL"
msg_info "Setting up PostgreSQL"
DB_NAME=openproject
DB_USER=openproject
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
API_KEY=$(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 "OpenProject-Credentials"
echo -e "OpenProject Database User: \e[32m$DB_USER\e[0m"
echo -e "OpenProject Database Password: \e[32m$DB_PASS\e[0m"
echo -e "OpenProject Database Name: \e[32m$DB_NAME\e[0m"
echo -e "OpenProject API Key: \e[32m$API_KEY\e[0m"
} >>~/openproject.creds
msg_ok "Set up PostgreSQL"
msg_info "Installing OpenProject"
$STD apt-get install -y openproject
msg_ok "Installed OpenProject"
msg_info "Configure OpenProject"
IP_ADDR=$(hostname -I | cut -d' ' -f1)
cat <<EOF >/etc/openproject/installer.dat
openproject/edition default
postgres/retry retry
postgres/autoinstall reuse
postgres/db_host 127.0.0.1
postgres/db_port 5432
postgres/db_username ${DB_USER}
postgres/db_password ${DB_PASS}
postgres/db_name ${DB_NAME}
server/autoinstall install
server/variant apache2
server/hostname ${IP_ADDR}
server/server_path_prefix /openproject
server/ssl no
server/variant apache2
server/server_path_prefix
repositories/api-key ${API_KEY}
repositories/svn-install skip
repositories/git-install install
repositories/git-path /var/db/openproject/git
repositories/git-http-backend /usr/lib/git-core/git-http-backend/
memcached/autoinstall install
openproject/admin_email admin@example.net
openproject/default_language en
EOF
$STD sudo openproject configure
msg_ok "Configured OpenProject"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,49 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: emoscardini
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/openziti/ziti
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
install_core_deps
msg_info "Installing Dependencies"
$STD apt-get install -y gpg
msg_ok "Installed Dependencies"
msg_info "Installing openziti"
mkdir -p --mode=0755 /usr/share/keyrings
curl -sSLf https://get.openziti.io/tun/package-repos.gpg | gpg --dearmor -o /usr/share/keyrings/openziti.gpg
echo "deb [signed-by=/usr/share/keyrings/openziti.gpg] https://packages.openziti.org/zitipax-openziti-deb-stable jammy main" > /etc/apt/sources.list.d/openziti.list
$STD apt-get update
$STD apt-get install -y ziti-edge-tunnel
sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service
systemctl daemon-reload
msg_ok "Installed openziti"
read -r -p "Please paste an identity enrollment token(JTW)" prompt
if [[ ${prompt} ]]; then
msg_info "Adding identity"
echo "${prompt}" > /opt/openziti/etc/identities/identity.jwt
chown ziti:ziti /opt/openziti/etc/identities/identity.jwt
systemctl enable -q --now ziti-edge-tunnel
msg_ok "Service Started"
else
systemctl enable -q ziti-edge-tunnel
msg_error "No identity provided; please place an identity file in /opt/openziti/etc/identities/ and restart the service"
fi
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -0,0 +1,69 @@
#!/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: https://github.com/agersant/polaris
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 \
make \
git \
build-essential \
binutils \
pkg-config \
libsqlite3-dev \
libssl-dev
msg_ok "Installed Dependencies"
msg_info "Installing Rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
echo 'export PATH=~/.cargo/bin:$PATH' >>~/.bashrc
export PATH=~/.cargo/bin:$PATH
msg_ok "Installed Rust"
msg_info "Downloading and Installing Polaris"
cd /opt
RELEASE=$(curl -s https://api.github.com/repos/agersant/polaris/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/agersant/polaris/archive/refs/tags/${RELEASE}.tar.gz"
tar -xzf ${RELEASE}.tar.gz
mv polaris-${RELEASE} /opt/polaris
cd /opt/polaris
$STD cargo build --release
msg_ok "Installed Polaris"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/polaris.service
[Unit]
Description=Polaris Music Server
After=network.target
[Service]
Type=simple
Environment=PATH=$PATH
WorkingDirectory=/opt/polaris
ExecStart=/opt/polaris/target/release/polaris
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now polaris
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.tar.gz
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,67 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: tteck (tteckster) | Co-Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.qbittorrent.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 \
sudo \
mc
msg_ok "Installed Dependencies"
msg_info "Setup qBittorrent-nox"
FULLRELEASE=$(curl -s https://api.github.com/repos/userdocs/qbittorrent-nox-static/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
RELEASE=$(echo $FULLRELEASE | cut -c 9-13)
mkdir -p /opt/qbittorrent
curl -fsSL "https://github.com/userdocs/qbittorrent-nox-static/releases/download/${FULLRELEASE}/x86_64-qbittorrent-nox" -o /opt/qbittorrent/qbittorrent-nox
chmod +x /opt/qbittorrent/qbittorrent-nox
mkdir -p $HOME/.config/qBittorrent/
cat <<EOF >$HOME/.config/qBittorrent/qBittorrent.conf
[LegalNotice]
Accepted=true
[Preferences]
WebUI\Password_PBKDF2="@ByteArray(amjeuVrF3xRbgzqWQmes5A==:XK3/Ra9jUmqUc4RwzCtrhrkQIcYczBl90DJw2rT8DFVTss4nxpoRhvyxhCf87ahVE3SzD8K9lyPdpyUCfmVsUg==)"
WebUI\Port=8090
WebUI\UseUPnP=false
WebUI\Username=admin
EOF
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup qBittorrent-nox"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/qbittorrent-nox.service
[Unit]
Description=qBittorrent client
After=network.target
[Service]
Type=simple
User=root
ExecStart=/opt/qbittorrent/qbittorrent-nox
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now qbittorrent-nox
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

65
install/rclone-install.sh Normal file
View File

@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/rclone/rclone
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 \
apache2-utils \
unzip
msg_ok "Installed Dependencies"
msg_info "Installing rclone"
temp_file=$(mktemp)
mkdir -p /opt/rclone
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file"
$STD unzip -j "$temp_file" '*/**' -d /opt/rclone
cd /opt/rclone
RCLONE_PASSWORD=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
$STD htpasswd -cb -B /opt/login.pwd admin "$RCLONE_PASSWORD"
{
echo "rclone-Credentials"
echo "rclone User Name: admin"
echo "rclone Password: $RCLONE_PASSWORD"
} >>~/rclone.creds
echo "${RELEASE}" >/opt/rclone_version.txt
msg_ok "Installed rclone"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/rclone-web.service
[Unit]
Description=Rclone Web GUI
After=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/rclone
ExecStart=/opt/rclone/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/login.pwd
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now rclone-web
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
rm -f "$temp_file"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -1,124 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/slskd/slskd/, https://soularr.net
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 \
unzip \
python3-pip
msg_ok "Installed Dependencies"
msg_info "Setup ${APPLICATION}"
tmp_file=$(mktemp)
RELEASE=$(curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
curl -fsSL "https://github.com/slskd/slskd/releases/download/${RELEASE}/slskd-${RELEASE}-linux-x64.zip" -o $tmp_file
unzip -q $tmp_file -d /opt/${APPLICATION}
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
JWT_KEY=$(openssl rand -base64 44)
SLSKD_API_KEY=$(openssl rand -base64 44)
cp /opt/${APPLICATION}/config/slskd.example.yml /opt/${APPLICATION}/config/slskd.yml
sed -i \
-e "\|web:|,\|cidr|s|^#||" \
-e "\|https:|,\|5031|s|false|true|" \
-e "\|api_keys|,\|cidr|s|<some.*$|$SLSKD_API_KEY|; \
s|role: readonly|role: readwrite|; \
s|0.0.0.0/0,::/0|& # Replace this with your subnet|" \
-e "\|soulseek|,\|write_queue|s|^#||" \
-e "\|jwt:|,\|ttl|s|key: ~|key: $JWT_KEY|" \
/opt/${APPLICATION}/config/slskd.yml
msg_ok "Setup ${APPLICATION}"
msg_info "Installing Soularr"
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
cd /tmp
curl -fsSL https://github.com/mrusse/soularr/archive/refs/heads/main.zip
unzip -q main.zip
mv soularr-main /opt/soularr
cd /opt/soularr
$STD pip install -r requirements.txt
sed -i \
-e "\|[Slskd]|,\|host_url|s|yourslskdapikeygoeshere|$SLSKD_API_KEY|" \
-e "/host_url/s/slskd/localhost/" \
/opt/soularr/config.ini
sed -i \
-e "/#This\|#Default\|INTERVAL/{N;d;}" \
-e "/while\|#Pass/d" \
-e "\|python|s|app|opt/soularr|; s|python|python3|" \
-e "/dt/,+2d" \
/opt/soularr/run.sh
sed -i -E "/(soularr.py)/s/.{5}$//; /if/,/fi/s/.{4}//" /opt/soularr/run.sh
chmod +x /opt/soularr/run.sh
msg_ok "Installed Soularr"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/${APPLICATION}.service
[Unit]
Description=${APPLICATION} Service
After=network.target
Wants=network.target
[Service]
WorkingDirectory=/opt/${APPLICATION}
ExecStart=/opt/${APPLICATION}/slskd --config /opt/${APPLICATION}/config/slskd.yml
Restart=always
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/soularr.timer
[Unit]
Description=Soularr service timer
RefuseManualStart=no
RefuseManualStop=no
[Timer]
Persistent=true
# run every 5 minutes
OnCalendar=*-*-* *:0/5:00
Unit=soularr.service
[Install]
WantedBy=timers.target
EOF
cat <<EOF >/etc/systemd/system/soularr.service
[Unit]
Description=Soularr service
After=network.target slskd.service
[Service]
Type=simple
WorkingDirectory=/opt/soularr
ExecStart=/bin/bash -c /opt/soularr/run.sh
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now ${APPLICATION}.service
systemctl enable -q soularr.timer
msg_ok "Created Services"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf $tmp_file
rm -rf /tmp/main.zip
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@@ -5,7 +5,7 @@
# License: MIT
# https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@@ -14,11 +14,110 @@ 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 jq
msg_ok "Installed Dependencies"
msg_info "Check GH Releases"
fetch_and_deploy_gh_release 0xERR0R/blocky
# echo "Getting aceberg/WatchYourLAN..."
# fetch_and_deploy_gh_release aceberg/WatchYourLAN
# echo "Got Version: $RELEASE"
# echo "Getting actualbudget/actual..."
# RELEASE=$(get_gh_release actualbudget/actual)
# echo "Got Version: $RELEASE"
# echo "Getting agl/jbig2enc..."
# RELEASE=$(get_gh_release agl/jbig2enc)
# echo "Got Version: $RELEASE"
# echo "Getting alexta69/metube..."
# RELEASE=$(get_gh_release alexta69/metube)
# echo "Got Version: $RELEASE"
# echo "Getting AlexxIT/go2rtc..."
# RELEASE=$(get_gh_release AlexxIT/go2rtc)
# echo "Got Version: $RELEASE"
# echo "Getting apache/tika..."
# RELEASE=$(get_gh_release apache/tika)
# echo "Got Version: $RELEASE"
# echo "Getting ArtifexSoftware/ghostpdl-downloads..."
# RELEASE=$(get_gh_release ArtifexSoftware/ghostpdl-downloads)
# echo "Got Version: $RELEASE"
# echo "Getting Athou/commafeed..."
# RELEASE=$(get_gh_release Athou/commafeed)
# echo "Got Version: $RELEASE"
# echo "Getting authelia/authelia..."
# RELEASE=$(get_gh_release authelia/authelia)
# echo "Got Version: $RELEASE"
# echo "Getting azukaar/Cosmos-Server..."
# RELEASE=$(get_gh_release azukaar/Cosmos-Server)
# echo "Got Version: $RELEASE"
# echo "Getting bastienwirtz/homer..."
# RELEASE=$(get_gh_release bastienwirtz/homer)
# echo "Got Version: $RELEASE"
# echo "Getting benjaminjonard/koillection..."
# RELEASE=$(get_gh_release benjaminjonard/koillection)
# echo "Got Version: $RELEASE"
# echo "Getting benzino77/tasmocompiler..."
# RELEASE=$(get_gh_release benzino77/tasmocompiler)
# echo "Got Version: $RELEASE"
# echo "Getting blakeblackshear/frigate..."
# RELEASE=$(get_gh_release blakeblackshear/frigate)
# echo "Got Version: $RELEASE"
# echo "Getting bluenviron/mediamtx..."
# RELEASE=$(get_gh_release bluenviron/mediamtx)
# echo "Got Version: $RELEASE"
# echo "Getting BookStackApp/BookStack..."
# RELEASE=$(get_gh_release BookStackApp/BookStack)
# echo "Got Version: $RELEASE"
# echo "Getting browserless/chrome..."
# RELEASE=$(get_gh_release browserless/chrome)
# echo "Got Version: $RELEASE"
# echo "Getting Bubka/2FAuth..."
# RELEASE=$(get_gh_release Bubka/2FAuth)
# echo "Got Version: $RELEASE"
# echo "Getting caddyserver/xcaddy..."
# RELEASE=$(get_gh_release caddyserver/xcaddy)
# echo "Got Version: $RELEASE"
# echo "Getting clusterzx/paperless-ai..."
# RELEASE=$(get_gh_release clusterzx/paperless-ai)
# echo "Got Version: $RELEASE"
# echo "Getting cockpit-project/cockpit..."
# RELEASE=$(get_gh_release cockpit-project/cockpit)
# echo "Got Version: $RELEASE"
# echo "Getting community-scripts/ProxmoxVE..."
# RELEASE=$(get_gh_release community-scripts/ProxmoxVE)
# echo "Got Version: $RELEASE"
# echo "Getting CorentinTh/it-tools..."
# RELEASE=$(get_gh_release CorentinTh/it-tools)
# echo "Got Version: $RELEASE"
# echo "Getting dani-garcia/bw_web_builds..."
# RELEASE=$(get_gh_release dani-garcia/bw_web_builds)
# echo "Got Version: $RELEASE"
msg_ok "Done"
motd_ssh
customize

133
install/wallabag-install.sh Normal file
View File

@@ -0,0 +1,133 @@
#!/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 <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies (Patience)"
$STD apt-get install -y \
curl \
git \
unzip \
sudo \
make \
php8.2 \
php8.2-{cli,common,bcmath,intl,fpm,tidy,xml,mysql,mbstring,zip,gd,curl} \
composer \
apache2 \
libapache2-mod-php \
redis \
mariadb-server
msg_ok "Installed Dependencies"
msg_info "Setting up Database"
DB_NAME=wallabag_db
DB_USER=wallabag
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
{
echo "Wallabag Credentials"
echo "Database User: $DB_USER"
echo "Database Password: $DB_PASS"
echo "Database Name: $DB_NAME"
} >> ~/wallabag.creds
msg_ok "Set up Database"
msg_info "Installing Wallabag (Patience)"
RELEASE=$(curl -s https://api.github.com/repos/wallabag/wallabag/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/wallabag/wallabag/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv wallabag-${RELEASE} /opt/wallabag
cd /opt/wallabag
useradd -d /opt/wallabag -s /bin/bash -M wallabag
chown -R wallabag:wallabag /opt/wallabag
mv /opt/wallabag/app/config/parameters.yml.dist /opt/wallabag/app/config/parameters.yml
sed -i \
-e 's|database_name: wallabag|database_name: wallabag_db|' \
-e 's|database_port: ~|database_port: 3306|' \
-e 's|database_user: root|database_user: wallabag|' \
-e 's|database_password: ~|database_password: '"$DB_PASS"'|' \
-e 's|secret: .*|secret: '"$SECRET_KEY"'|' \
/opt/wallabag/app/config/parameters.yml
export COMPOSER_ALLOW_SUPERUSER=1
sudo -u wallabag make install --no-interaction
export COMPOSER_ALLOW_SUPERUSER=1
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction
msg_ok "Installed Wallabag"
msg_info "Setting up Virtual Host"
cat <<EOF >/etc/nginx/conf.d/wallabag.conf
server {
root /opt/wallabag/web;
server_name $IPADDRESS;
location / {
# try to serve file directly, fallback to app.php
try_files $uri /app.php$is_args$args;
}
location ~ ^/app\.php(/|$) {
# if, for some reason, you are still using PHP 5,
# then replace /run/php/php7.0 by /var/run/php5
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
# When you are using symlinks to link the document root to the
# current version of your application, you should pass the real
# application path instead of the path to the symlink to PHP
# FPM.
# Otherwise, PHP's OPcache may not properly detect changes to
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/app.php/some-path
# Remove the internal directive to allow URIs like this
internal;
}
# return 404 for all other php files not matching the front controller
# this prevents access to other php files you don't want to be accessible.
location ~ \.php$ {
return 404;
}
error_log /var/log/nginx/wallabag_error.log;
access_log /var/log/nginx/wallabag_access.log;
}
EOF
$STD a2enmod rewrite
$STD a2ensite wallabag.conf
$STD a2dissite 000-default.conf
systemctl reload apache2
msg_ok "Configured Virtual Host"
msg_info "Setting Permissions"
chown -R www-data:www-data /opt/wallabag/{bin,app/config,vendor,data,var,web}
msg_ok "Set Permissions"
msg_info "Running Wallabag Installation"
php bin/console wallabag:install --env=prod
msg_ok "Wallabag Installed"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"