mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-23 19:55:05 +00:00
Compare commits
37
Commits
No files matched your search
@@ -565,6 +565,76 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
## 2026-10-23
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- error output: report a failure inside a subshell once [@MickLesk](https://github.com/MickLesk) ([core#162](https://github.com/community-scripts/core/pull/162))
|
||||||
|
- general: allow Composer as root in every script [@MickLesk](https://github.com/MickLesk) ([core#161](https://github.com/community-scripts/core/pull/161))
|
||||||
|
- lxc-updater: skip the resource check when the container cannot read its RAM [@MickLesk](https://github.com/MickLesk) ([core#160](https://github.com/community-scripts/core/pull/160))
|
||||||
|
- vm-core: let vm_timezone_default survive a host without /etc/timezone [@MickLesk](https://github.com/MickLesk) ([core#159](https://github.com/community-scripts/core/pull/159))
|
||||||
|
|
||||||
|
## 2026-10-22
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Zabbix: keep unattended updates on the installed series [@florianpunz](https://github.com/florianpunz) ([#18051](https://github.com/community-scripts/ProxmoxVE/pull/18051))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: Cryptpad [@MickLesk](https://github.com/MickLesk) ([#18065](https://github.com/community-scripts/ProxmoxVE/pull/18065))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- Incus: drive a remote Incus server from the client's default remote [@MickLesk](https://github.com/MickLesk) ([core#154](https://github.com/community-scripts/core/pull/154))
|
||||||
|
- Deploy the release again when an update is redone [@MickLesk](https://github.com/MickLesk) ([core#158](https://github.com/community-scripts/core/pull/158))
|
||||||
|
|
||||||
|
### ❔ Uncategorized
|
||||||
|
|
||||||
|
- chore(ct): sync sparkyfitness defaults with PocketBase [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18061](https://github.com/community-scripts/ProxmoxVE/pull/18061))
|
||||||
|
|
||||||
|
## 2026-10-21
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Immich: bump release version to v3.3.5 (CVE) [@CerberusStyle](https://github.com/CerberusStyle) ([#18057](https://github.com/community-scripts/ProxmoxVE/pull/18057))
|
||||||
|
- DroppedNeedle: pass release version to the app via COMMIT_TAG [@MickLesk](https://github.com/MickLesk) ([#18042](https://github.com/community-scripts/ProxmoxVE/pull/18042))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- Keep the version an update started from across a redo [@MickLesk](https://github.com/MickLesk) ([core#156](https://github.com/community-scripts/core/pull/156))
|
||||||
|
- Redo an update whose run did not finish after the deploy [@MickLesk](https://github.com/MickLesk) ([core#155](https://github.com/community-scripts/core/pull/155))
|
||||||
|
|
||||||
|
## 2026-10-20
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Plane: give Silo its own HOME [@MickLesk](https://github.com/MickLesk) ([#18028](https://github.com/community-scripts/ProxmoxVE/pull/18028))
|
||||||
|
- Immich: Pin version to 3.3.4 [@vhsdream](https://github.com/vhsdream) ([#18036](https://github.com/community-scripts/ProxmoxVE/pull/18036))
|
||||||
|
- InvenTree: run apt under systemd so postinst can finish [@MickLesk](https://github.com/MickLesk) ([#18029](https://github.com/community-scripts/ProxmoxVE/pull/18029))
|
||||||
|
- Profilarr: pass the deno pin as the version [@MickLesk](https://github.com/MickLesk) ([#18025](https://github.com/community-scripts/ProxmoxVE/pull/18025))
|
||||||
|
- Silo: keep the version file out of ~/.silo [@MickLesk](https://github.com/MickLesk) ([#18030](https://github.com/community-scripts/ProxmoxVE/pull/18030))
|
||||||
|
- InvenTree: move to go.packager.io [@MickLesk](https://github.com/MickLesk) ([#18015](https://github.com/community-scripts/ProxmoxVE/pull/18015))
|
||||||
|
- Zitadel: run init and setup in the foreground [@MickLesk](https://github.com/MickLesk) ([#18016](https://github.com/community-scripts/ProxmoxVE/pull/18016))
|
||||||
|
|
||||||
|
- #### ✨ New Features
|
||||||
|
|
||||||
|
- Zitadel: Support v1 and v2 Login [@MickLesk](https://github.com/MickLesk) ([#18031](https://github.com/community-scripts/ProxmoxVE/pull/18031))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: OpenWebUI (remove numba pin) [@MickLesk](https://github.com/MickLesk) ([#18026](https://github.com/community-scripts/ProxmoxVE/pull/18026))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- Only treat an NVIDIA GPU as present when its device nodes are [@MickLesk](https://github.com/MickLesk) ([core#153](https://github.com/community-scripts/core/pull/153))
|
||||||
|
|
||||||
## 2026-10-19
|
## 2026-10-19
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|||||||
+27
-3
@@ -30,12 +30,14 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
# Updates to 2026.10.0 finished without infra.js; run them again so it gets written
|
||||||
|
[[ -f /opt/cryptpad/config/infra.example.js && ! -f /opt/cryptpad/config/infra.js ]] && rm -f ~/.cryptpad
|
||||||
if check_for_gh_release "cryptpad" "cryptpad/cryptpad"; then
|
if check_for_gh_release "cryptpad" "cryptpad/cryptpad"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop cryptpad
|
systemctl stop cryptpad
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
create_backup /opt/cryptpad/config/config.js /opt/cryptpad/www/common/onlyoffice/dist
|
create_backup /opt/cryptpad/config/config.js /opt/cryptpad/config/infra.js /opt/cryptpad/www/common/onlyoffice/dist
|
||||||
|
|
||||||
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="blob block customize data datastore onlyoffice-conf" fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
|
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="blob block customize data datastore onlyoffice-conf" fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
|
||||||
|
|
||||||
@@ -45,8 +47,30 @@ function update_script() {
|
|||||||
cd /opt/cryptpad
|
cd /opt/cryptpad
|
||||||
$STD npm ci --allow-git=all
|
$STD npm ci --allow-git=all
|
||||||
$STD npm run install:components
|
$STD npm run install:components
|
||||||
if [ -f "/opt/cryptpad/install-onlyoffice.sh" ]; then
|
if [[ -d /opt/cryptpad/www/common/onlyoffice/dist ]]; then
|
||||||
$STD bash /opt/cryptpad/install-onlyoffice.sh --accept-license
|
$STD bash /opt/cryptpad/install-office.sh --accept-license
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/cryptpad/config/infra.js ]]; then
|
||||||
|
# 2026.10.0 reads the network settings from infra.js and no longer derives the sandbox origin
|
||||||
|
LOCAL_IP="$LOCAL_IP" node - <<'EOF'
|
||||||
|
const c = require("/opt/cryptpad/config/config.js");
|
||||||
|
const i = require("/opt/cryptpad/config/infra.example.js");
|
||||||
|
const port = c.httpPort || i.public.httpPort;
|
||||||
|
const safePort = c.httpSafePort || port + 1;
|
||||||
|
const origin = (c.httpUnsafeOrigin || `http://${process.env.LOCAL_IP}:${port}`).replace(/\/+$/, "");
|
||||||
|
const sandbox = new URL(origin);
|
||||||
|
sandbox.port = safePort;
|
||||||
|
Object.assign(i.public, {
|
||||||
|
origin,
|
||||||
|
sandboxOrigin: (c.httpSafeOrigin || sandbox.origin).replace(/\/+$/, ""),
|
||||||
|
httpHost: c.httpAddress || (c.httpUnsafeOrigin ? i.public.httpHost : "0.0.0.0"),
|
||||||
|
httpPort: port,
|
||||||
|
httpSafePort: safePort,
|
||||||
|
externalWebsocketURL: c.externalWebsocketURL,
|
||||||
|
fileHost: c.fileHost,
|
||||||
|
});
|
||||||
|
require("fs").writeFileSync("/opt/cryptpad/config/infra.js", "module.exports = " + JSON.stringify(i, null, 4) + ";\n");
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
msg_ok "Updated CryptaPad"
|
msg_ok "Updated CryptaPad"
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ User=root
|
|||||||
WorkingDirectory=/opt/droppedneedle/backend
|
WorkingDirectory=/opt/droppedneedle/backend
|
||||||
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
||||||
Environment=PORT=8688
|
Environment=PORT=8688
|
||||||
|
Environment=COMMIT_TAG=v$(<~/.droppedneedle)
|
||||||
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
||||||
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
@@ -106,6 +107,11 @@ EOF
|
|||||||
sed -i '\|=8688$|a# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>' /etc/systemd/system/droppedneedle.service
|
sed -i '\|=8688$|a# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>' /etc/systemd/system/droppedneedle.service
|
||||||
fi
|
fi
|
||||||
sed -i 's|^ExecStart=.*|ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target|' /etc/systemd/system/droppedneedle.service
|
sed -i 's|^ExecStart=.*|ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target|' /etc/systemd/system/droppedneedle.service
|
||||||
|
if grep -q '^Environment=COMMIT_TAG=' /etc/systemd/system/droppedneedle.service; then
|
||||||
|
sed -i "s|^Environment=COMMIT_TAG=.*|Environment=COMMIT_TAG=v$(<~/.droppedneedle)|" /etc/systemd/system/droppedneedle.service
|
||||||
|
else
|
||||||
|
sed -i "\|=8688$|a Environment=COMMIT_TAG=v$(<~/.droppedneedle)" /etc/systemd/system/droppedneedle.service
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ EOF
|
|||||||
BASE_DIR=${STAGING_DIR}/base-images
|
BASE_DIR=${STAGING_DIR}/base-images
|
||||||
SOURCE_DIR=${STAGING_DIR}/image-source
|
SOURCE_DIR=${STAGING_DIR}/image-source
|
||||||
cd /tmp
|
cd /tmp
|
||||||
RELEASE="v3.3.1"
|
RELEASE="v3.3.5"
|
||||||
if [[ -f ~/.intel_version ]]; then
|
if [[ -f ~/.intel_version ]]; then
|
||||||
INTEL_SRC="https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/machine-learning"
|
INTEL_SRC="https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/machine-learning"
|
||||||
curl -fsSL "${INTEL_SRC}/scripts/install-intel-runtime.sh" -o ./intel-runtime 2>/dev/null ||
|
curl -fsSL "${INTEL_SRC}/scripts/install-intel-runtime.sh" -o ./intel-runtime 2>/dev/null ||
|
||||||
|
|||||||
+25
-3
@@ -31,14 +31,36 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -qE "^ID=(ubuntu)$" /etc/os-release; then
|
if ! grep -qE "^ID=(ubuntu|debian)$" /etc/os-release; then
|
||||||
msg_error "Unsupported OS. InvenTree requires Ubuntu (20.04/22.04/24.04)."
|
msg_error "Unsupported OS. InvenTree requires Ubuntu or Debian."
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# dl.packager.io is frozen at 1.5.1 and its SHA1-bound key fails on Debian 13;
|
||||||
|
# go.packager.io only carries current builds for these releases
|
||||||
|
if grep -qs "dl.packager.io" /etc/apt/sources.list.d/inventree*; then
|
||||||
|
case "$(get_os_info id)/$(get_os_info version)" in
|
||||||
|
ubuntu/24.04 | ubuntu/26.04 | debian/13)
|
||||||
|
msg_info "Migrating InvenTree Repository"
|
||||||
|
setup_deb822_repo \
|
||||||
|
"inventree" \
|
||||||
|
"https://go.packager.io/srv/deb/inventree/InvenTree/gpg-key.asc" \
|
||||||
|
"https://go.packager.io/srv/deb/inventree/InvenTree/stable/$(get_os_info id)" \
|
||||||
|
"$(get_os_info version)" \
|
||||||
|
"main"
|
||||||
|
msg_ok "Migrated InvenTree Repository"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
msg_warn "InvenTree only publishes updates for Ubuntu 24.04/26.04 and Debian 13; staying on the frozen repository"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating InvenTree"
|
msg_info "Updating InvenTree"
|
||||||
apt_update_safe
|
apt_update_safe
|
||||||
$STD apt install --only-upgrade inventree -y
|
# postinst loops forever unless its parent chain reaches PID 1 (not the case under pct exec)
|
||||||
|
$STD systemd-run --wait --pipe --quiet --collect --setenv=DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install --only-upgrade -y inventree
|
||||||
msg_ok "Updated InvenTree"
|
msg_ok "Updated InvenTree"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
exit
|
exit
|
||||||
|
|||||||
+12
-6
@@ -49,10 +49,13 @@ function update_script() {
|
|||||||
|
|
||||||
msg_info "Installing uv-based Open-WebUI"
|
msg_info "Installing uv-based Open-WebUI"
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
PYTHON_VERSION="3.12" setup_uv
|
||||||
for attempt in $(seq 1 3); do
|
installed=0
|
||||||
$STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") open-webui[all] && break
|
for attempt in 1 2; do
|
||||||
[[ $attempt -lt 3 ]] && msg_warn "Open WebUI install attempt $attempt failed, retrying..." && sleep 10
|
$STD uv tool install --python 3.12 open-webui[all] && { installed=1; break; }
|
||||||
|
msg_warn "Open WebUI install attempt $attempt failed, retrying..."
|
||||||
|
sleep 10
|
||||||
done
|
done
|
||||||
|
((installed)) || $STD uv tool install --python 3.12 open-webui[all]
|
||||||
msg_ok "Installed uv-based Open-WebUI"
|
msg_ok "Installed uv-based Open-WebUI"
|
||||||
|
|
||||||
msg_info "Restoring data"
|
msg_info "Restoring data"
|
||||||
@@ -125,10 +128,13 @@ EOF
|
|||||||
OTEL_ARGS+=(--with "$pkg")
|
OTEL_ARGS+=(--with "$pkg")
|
||||||
done < <(uv pip list --python "$OWUI_PYTHON" --format freeze 2>/dev/null | grep -i '^opentelemetry-' | cut -d= -f1)
|
done < <(uv pip list --python "$OWUI_PYTHON" --format freeze 2>/dev/null | grep -i '^opentelemetry-' | cut -d= -f1)
|
||||||
fi
|
fi
|
||||||
for attempt in $(seq 1 3); do
|
updated=0
|
||||||
$STD uv tool install --force --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] && break
|
for attempt in 1 2; do
|
||||||
[[ $attempt -lt 3 ]] && msg_warn "Open WebUI update attempt $attempt failed, retrying..." && sleep 10
|
$STD uv tool install --force --python 3.12 "${OTEL_ARGS[@]}" open-webui[all] && { updated=1; break; }
|
||||||
|
msg_warn "Open WebUI update attempt $attempt failed, retrying..."
|
||||||
|
sleep 10
|
||||||
done
|
done
|
||||||
|
((updated)) || $STD uv tool install --force --python 3.12 "${OTEL_ARGS[@]}" open-webui[all]
|
||||||
systemctl restart open-webui
|
systemctl restart open-webui
|
||||||
msg_ok "Updated Open WebUI"
|
msg_ok "Updated Open WebUI"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ function update_script() {
|
|||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
|
|
||||||
if check_for_gh_release "deno" "denoland/deno" "v2.7.5" "Deno is pinned to 2.7.5 because the known WouldBlock: Resource temporarily unavailable (os error 11) Issue"; then
|
if check_for_gh_release "deno" "denoland/deno" "v2.7.5" "Deno is pinned to 2.7.5 because the known WouldBlock: Resource temporarily unavailable (os error 11) Issue"; then
|
||||||
fetch_and_deploy_gh_release "deno" "denoland/deno" "v2.7.5" "latest" "/usr/local/bin" "deno-${ARCH}-unknown-linux-gnu.zip"
|
fetch_and_deploy_gh_release "deno" "denoland/deno" "prebuild" "v2.7.5" "/usr/local/bin" "deno-${ARCH}-unknown-linux-gnu.zip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "profilarr" "Dictionarry-Hub/profilarr"; then
|
if check_for_gh_release "profilarr" "Dictionarry-Hub/profilarr"; then
|
||||||
|
|||||||
+3
-2
@@ -31,12 +31,13 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "silo" "pgsty/silo"; then
|
[[ -f ~/.silo ]] && mv ~/.silo ~/.silo_s3
|
||||||
|
if check_for_gh_release "silo_s3" "pgsty/silo"; then
|
||||||
msg_info "Stopping Silo"
|
msg_info "Stopping Silo"
|
||||||
systemctl stop silo
|
systemctl stop silo
|
||||||
msg_ok "Stopped Silo"
|
msg_ok "Stopped Silo"
|
||||||
|
|
||||||
DPKG_FORCE_CONFOLD=1 fetch_and_deploy_gh_release "silo" "pgsty/silo" "binary"
|
DPKG_FORCE_CONFOLD=1 fetch_and_deploy_gh_release "silo_s3" "pgsty/silo" "binary"
|
||||||
|
|
||||||
msg_info "Starting Silo"
|
msg_info "Starting Silo"
|
||||||
systemctl start silo
|
systemctl start silo
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_
|
|||||||
APP="SparkyFitness"
|
APP="SparkyFitness"
|
||||||
var_tags="${var_tags:-health;fitness}"
|
var_tags="${var_tags:-health;fitness}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-4096}"
|
||||||
var_disk="${var_disk:-7}"
|
var_disk="${var_disk:-7}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
|
|||||||
+25
-13
@@ -46,24 +46,36 @@ function update_script() {
|
|||||||
msg_warn "No Zabbix Agent service found, skipping agent actions"
|
msg_warn "No Zabbix Agent service found, skipping agent actions"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ZABBIX_SERIES="$(dpkg-query -W -f='${Version}' zabbix-release 2>/dev/null || true)"
|
||||||
|
ZABBIX_SERIES="${ZABBIX_SERIES#*:}"
|
||||||
|
ZABBIX_SERIES="${ZABBIX_SERIES%%[!0-9.]*}"
|
||||||
|
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||||
|
if [[ ! "$ZABBIX_SERIES" =~ ^[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
msg_warn "Could not detect the installed Zabbix series - skipping update, requires an interactive run"
|
||||||
|
exit 75
|
||||||
|
fi
|
||||||
|
ZABBIX_VERSION="$ZABBIX_SERIES"
|
||||||
|
msg_warn "Unattended update: staying on Zabbix ${ZABBIX_VERSION}"
|
||||||
|
else
|
||||||
|
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
|
||||||
|
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
|
||||||
|
case "$ZABBIX_CHOICE" in
|
||||||
|
1) ZABBIX_VERSION="7.0" ;;
|
||||||
|
2) ZABBIX_VERSION="7.4" ;;
|
||||||
|
3) ZABBIX_VERSION=$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
||||||
|
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1) ;;
|
||||||
|
*)
|
||||||
|
ZABBIX_VERSION="7.4"
|
||||||
|
echo "Invalid choice. Defaulting to 7.4."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop zabbix-server
|
systemctl stop zabbix-server
|
||||||
[[ -n "$AGENT_SERVICE" ]] && systemctl stop "$AGENT_SERVICE"
|
[[ -n "$AGENT_SERVICE" ]] && systemctl stop "$AGENT_SERVICE"
|
||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
|
|
||||||
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
|
|
||||||
case "$ZABBIX_CHOICE" in
|
|
||||||
1) ZABBIX_VERSION="7.0" ;;
|
|
||||||
2) ZABBIX_VERSION="7.4" ;;
|
|
||||||
3) ZABBIX_VERSION=$(curl -fsSL https://repo.zabbix.com/zabbix/ |
|
|
||||||
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1) ;;
|
|
||||||
*)
|
|
||||||
ZABBIX_VERSION="7.4"
|
|
||||||
echo "Invalid choice. Defaulting to 7.4."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
msg_info "Updating Zabbix to $ZABBIX_VERSION"
|
msg_info "Updating Zabbix to $ZABBIX_VERSION"
|
||||||
mkdir -p /opt/zabbix-backup/
|
mkdir -p /opt/zabbix-backup/
|
||||||
cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
|
cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
|
||||||
|
|||||||
+36
-10
@@ -2,7 +2,7 @@
|
|||||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: dave-yap (dave-yap)
|
# Author: dave-yap (dave-yap) | Co-Author: remz1337, MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://zitadel.com/ | Github: https://github.com/zitadel/zitadel
|
# Source: https://zitadel.com/ | Github: https://github.com/zitadel/zitadel
|
||||||
|
|
||||||
@@ -16,11 +16,23 @@ var_version="${var_version:-13}"
|
|||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-yes}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
|
if [[ -z "${var_zitadel_login:-}" ]] && command -v pveversion >/dev/null 2>&1; then
|
||||||
|
var_zitadel_login=$(msg_menu "Choose the Zitadel login UI" \
|
||||||
|
"v2" "Login V2, Zitadel's default (HTTPS, self-signed certificate)" \
|
||||||
|
"v1" "Login V1, the classic login built into the API (HTTP)")
|
||||||
|
fi
|
||||||
|
export var_zitadel_login="${var_zitadel_login:-v2}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
|
if [[ ! "${var_zitadel_login}" =~ ^v[12]$ ]]; then
|
||||||
|
msg_error "var_zitadel_login must be v1 or v2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
@@ -31,20 +43,29 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "zitadel" "zitadel/zitadel"; then
|
if check_for_gh_release "zitadel" "zitadel/zitadel"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Zitadel"
|
||||||
|
if [[ -f /etc/systemd/system/zitadel-login.service ]]; then
|
||||||
|
systemctl stop zitadel-login
|
||||||
|
fi
|
||||||
systemctl stop zitadel
|
systemctl stop zitadel
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Zitadel"
|
||||||
|
|
||||||
rm -f /usr/local/bin/zitadel
|
fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "${CHECK_UPDATE_RELEASE}" "/usr/local/bin" "zitadel-linux-$(arch_resolve).tar.gz"
|
||||||
fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "latest" "/usr/local/bin" "zitadel-linux-$(arch_resolve).tar.gz"
|
if [[ -f /etc/systemd/system/zitadel-login.service ]]; then
|
||||||
|
NODE_VERSION="24" setup_nodejs
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "zitadel-login" "zitadel/zitadel" "prebuild" "${CHECK_UPDATE_RELEASE}" "/opt/zitadel-login" "zitadel-login.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating Zitadel"
|
msg_info "Migrating Zitadel Database"
|
||||||
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
|
||||||
msg_ok "Updated Zitadel"
|
msg_ok "Migrated Zitadel Database"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Zitadel"
|
||||||
systemctl start zitadel
|
systemctl start zitadel
|
||||||
msg_ok "Started Service"
|
if [[ -f /etc/systemd/system/zitadel-login.service ]]; then
|
||||||
|
systemctl start zitadel-login
|
||||||
|
fi
|
||||||
|
msg_ok "Started Zitadel"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
@@ -57,4 +78,9 @@ description
|
|||||||
msg_ok "Completed successfully!\n"
|
msg_ok "Completed successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
||||||
echo -e "${GATEWAY}${BGN}http://${IP}:8080/ui/console${CL}"
|
if [[ "${var_zitadel_login}" == "v1" ]]; then
|
||||||
|
echo -e "${GATEWAY}${BGN}http://${IP}:8080/ui/console${CL}"
|
||||||
|
else
|
||||||
|
echo -e "${GATEWAY}${BGN}https://${IP}:8080/ui/console${CL}"
|
||||||
|
fi
|
||||||
|
echo -e "${INFO}${YW}Admin credentials: ~/zitadel.creds (inside the container)${CL}"
|
||||||
@@ -28,11 +28,15 @@ cd /opt/cryptpad
|
|||||||
$STD npm ci --allow-git=all
|
$STD npm ci --allow-git=all
|
||||||
$STD npm run install:components
|
$STD npm run install:components
|
||||||
if [[ "${onlyoffice,,}" =~ ^(y|yes)$ ]]; then
|
if [[ "${onlyoffice,,}" =~ ^(y|yes)$ ]]; then
|
||||||
$STD bash -c "./install-onlyoffice.sh --accept-license"
|
$STD bash -c "./install-office.sh --accept-license"
|
||||||
fi
|
fi
|
||||||
cp config/config.example.js config/config.js
|
cp config/config.example.js config/config.js
|
||||||
sed -i "51s/localhost/${LOCAL_IP}/g" /opt/cryptpad/config/config.js
|
cp config/infra.example.js config/infra.js
|
||||||
sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js
|
sed -i \
|
||||||
|
-e "s|origin: \"http://localhost:3000\"|origin: \"http://${LOCAL_IP}:3000\"|" \
|
||||||
|
-e "s|sandboxOrigin: \"http://localhost:3001\"|sandboxOrigin: \"http://${LOCAL_IP}:3001\"|" \
|
||||||
|
-e "s|httpHost: \"localhost\"|httpHost: \"0.0.0.0\"|" \
|
||||||
|
config/infra.js
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
msg_ok "Setup CryptPad"
|
msg_ok "Setup CryptPad"
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ User=root
|
|||||||
WorkingDirectory=/opt/droppedneedle/backend
|
WorkingDirectory=/opt/droppedneedle/backend
|
||||||
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
Environment=ROOT_APP_DIR=/opt/droppedneedle/backend
|
||||||
Environment=PORT=8688
|
Environment=PORT=8688
|
||||||
|
Environment=COMMIT_TAG=v$(<~/.droppedneedle)
|
||||||
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
# Environment=SLSKD_DOWNLOADS_PATH=<path-to-slskd-downloads>
|
||||||
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
ExecStart=/opt/droppedneedle/venv/bin/python -m maintenance.automatic_upgrade --start-target
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
RELEASE="v3.3.1"
|
RELEASE="v3.3.5"
|
||||||
if lscpu | grep -q 'GenuineIntel'; then
|
if lscpu | grep -q 'GenuineIntel'; then
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -16,15 +16,17 @@ update_os
|
|||||||
msg_info "Setting up InvenTree Repository"
|
msg_info "Setting up InvenTree Repository"
|
||||||
setup_deb822_repo \
|
setup_deb822_repo \
|
||||||
"inventree" \
|
"inventree" \
|
||||||
"https://dl.packager.io/srv/inventree/InvenTree/key" \
|
"https://go.packager.io/srv/deb/inventree/InvenTree/gpg-key.asc" \
|
||||||
"https://dl.packager.io/srv/deb/inventree/InvenTree/stable/$(get_os_info id)" \
|
"https://go.packager.io/srv/deb/inventree/InvenTree/stable/$(get_os_info id)" \
|
||||||
"$(get_os_info version)" \
|
"$(get_os_info version)" \
|
||||||
"main"
|
"main"
|
||||||
msg_ok "Set up InvenTree Repository"
|
msg_ok "Set up InvenTree Repository"
|
||||||
|
|
||||||
msg_info "Installing InvenTree (Patience)"
|
msg_info "Installing InvenTree (Patience)"
|
||||||
export SETUP_NO_CALLS=true
|
# The package's postinst walks parent PIDs until it reaches PID 1; under pct exec the chain ends at 0
|
||||||
$STD apt install -y inventree
|
# and since 1.6.0 that loops forever, so apt runs as a child of systemd
|
||||||
|
$STD systemd-run --wait --pipe --quiet --collect --setenv=SETUP_NO_CALLS=true --setenv=DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install -y inventree
|
||||||
msg_ok "Installed InvenTree"
|
msg_ok "Installed InvenTree"
|
||||||
|
|
||||||
msg_info "Configuring InvenTree"
|
msg_info "Configuring InvenTree"
|
||||||
|
|||||||
@@ -47,10 +47,13 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Installing Open WebUI"
|
msg_info "Installing Open WebUI"
|
||||||
for attempt in $(seq 1 3); do
|
installed=0
|
||||||
$STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] && break
|
for attempt in 1 2; do
|
||||||
[[ $attempt -lt 3 ]] && msg_warn "Open WebUI install attempt $attempt failed, retrying..." && sleep 10
|
$STD uv tool install --python 3.12 "${OTEL_ARGS[@]}" open-webui[all] && { installed=1; break; }
|
||||||
|
msg_warn "Open WebUI install attempt $attempt failed, retrying..."
|
||||||
|
sleep 10
|
||||||
done
|
done
|
||||||
|
((installed)) || $STD uv tool install --python 3.12 "${OTEL_ARGS[@]}" open-webui[all]
|
||||||
msg_ok "Installed Open WebUI"
|
msg_ok "Installed Open WebUI"
|
||||||
|
|
||||||
prompt="${var_openwebui_ollama:-}"
|
prompt="${var_openwebui_ollama:-}"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ $STD rabbitmqctl add_user plane "${RABBITMQ_PASS}"
|
|||||||
$STD rabbitmqctl set_permissions -p plane plane ".*" ".*" ".*"
|
$STD rabbitmqctl set_permissions -p plane plane ".*" ".*" ".*"
|
||||||
msg_ok "Configured RabbitMQ"
|
msg_ok "Configured RabbitMQ"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "silo" "pgsty/silo" "prebuild" "latest" "/opt/silo" "silo_*_linux_$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "silo_s3" "pgsty/silo" "prebuild" "latest" "/opt/silo" "silo_*_linux_$(arch_resolve).tar.gz"
|
||||||
fetch_and_deploy_gh_release "silo_mcli" "pgsty/mc" "prebuild" "latest" "/opt/mcli" "mcli_*_linux_$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "silo_mcli" "pgsty/mc" "prebuild" "latest" "/opt/mcli" "mcli_*_linux_$(arch_resolve).tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring Silo"
|
msg_info "Configuring Silo"
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_deb_based() {
|
setup_deb_based() {
|
||||||
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18): " ver
|
ver="${var_postgresql_version:-}"
|
||||||
|
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (15/16/17/18) [17]: " ver || true
|
||||||
|
ver="${ver:-17}"
|
||||||
[[ $ver =~ ^(15|16|17|18)$ ]] || {
|
[[ $ver =~ ^(15|16|17|18)$ ]] || {
|
||||||
echo "Invalid version"
|
msg_error "Invalid PostgreSQL version: ${ver} (expected 15, 16, 17 or 18)"
|
||||||
exit 64
|
exit 64
|
||||||
}
|
}
|
||||||
PG_VERSION=$ver setup_postgresql
|
PG_VERSION=$ver setup_postgresql
|
||||||
@@ -136,8 +138,13 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_alpine() {
|
setup_alpine() {
|
||||||
read -r -p "${TAB3}Enter PostgreSQL version (15/16/17): " ver
|
ver="${var_postgresql_version:-}"
|
||||||
[[ $ver =~ ^(15|16|17)$ ]] || { echo "Invalid version"; exit 64; }
|
[[ -n "$ver" ]] || read -r -p "${TAB3}Enter PostgreSQL version (16/17/18) [17]: " ver || true
|
||||||
|
ver="${ver:-17}"
|
||||||
|
[[ $ver =~ ^(16|17|18)$ ]] || {
|
||||||
|
msg_error "Invalid PostgreSQL version: ${ver} (expected 16, 17 or 18)"
|
||||||
|
exit 64
|
||||||
|
}
|
||||||
|
|
||||||
msg_info "Installing PostgreSQL ${ver}"
|
msg_info "Installing PostgreSQL ${ver}"
|
||||||
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo
|
$STD apk add --no-cache postgresql${ver} postgresql${ver}-contrib postgresql${ver}-openrc sudo
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "silo" "pgsty/silo" "binary"
|
fetch_and_deploy_gh_release "silo_s3" "pgsty/silo" "binary"
|
||||||
|
|
||||||
msg_info "Configuring Silo"
|
msg_info "Configuring Silo"
|
||||||
mkdir -p /opt/silo_data
|
mkdir -p /opt/silo_data
|
||||||
|
|||||||
+130
-88
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
# Copyright (c) 2021-2026 community-scripts ORG
|
||||||
# Author: dave-yap
|
# Author: dave-yap (dave-yap) | Co-Author: remz1337, MickLesk (CanbiZ)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://zitadel.com/ | Github: https://github.com/zitadel/zitadel
|
# Source: https://zitadel.com/ | Github: https://github.com/zitadel/zitadel
|
||||||
|
|
||||||
@@ -13,132 +13,174 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
var_zitadel_login="${var_zitadel_login:-v2}"
|
||||||
$STD apt install -y ca-certificates lsof
|
|
||||||
msg_ok "Installed Dependecies"
|
|
||||||
|
|
||||||
PG_VERSION="17" setup_postgresql
|
PG_VERSION="17" setup_postgresql
|
||||||
|
PG_DB_NAME="zitadel" PG_DB_USER="zitadel" setup_postgresql_db
|
||||||
msg_info "Installing Postgresql"
|
|
||||||
DB_NAME="zitadel"
|
|
||||||
DB_USER="zitadel"
|
|
||||||
DB_PASS=$(random_password 13)
|
|
||||||
DB_ADMIN_USER="root"
|
|
||||||
DB_ADMIN_PASS=$(random_password 13)
|
|
||||||
systemctl start postgresql
|
|
||||||
$STD sudo -u postgres psql -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE USER $DB_ADMIN_USER WITH PASSWORD '$DB_ADMIN_PASS' SUPERUSER;"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_ADMIN_USER;"
|
|
||||||
cat <<EOF >~/zitadel.creds
|
|
||||||
Application Credentials
|
|
||||||
DB_NAME: $DB_NAME
|
|
||||||
DB_USER: $DB_USER
|
|
||||||
DB_PASS: $DB_PASS
|
|
||||||
DB_ADMIN_USER: $DB_ADMIN_USER
|
|
||||||
DB_ADMIN_PASS: $DB_ADMIN_PASS
|
|
||||||
EOF
|
|
||||||
msg_ok "Installed PostgreSQL"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "latest" "/usr/local/bin" "zitadel-linux-$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "latest" "/usr/local/bin" "zitadel-linux-$(arch_resolve).tar.gz"
|
||||||
|
|
||||||
msg_info "Setting up Zitadel Environments"
|
msg_info "Configuring Zitadel"
|
||||||
mkdir -p /opt/zitadel
|
mkdir -p /opt/zitadel
|
||||||
echo "/opt/zitadel/config.yaml" >"/opt/zitadel/.config"
|
random_password 32 >/opt/zitadel/.masterkey
|
||||||
random_password 32 >"/opt/zitadel/.masterkey"
|
ADMIN_PASS="$(random_password 20)Aa1!"
|
||||||
cat <<EOF >~/zitadel.creds
|
|
||||||
Config location: $(cat "/opt/zitadel/.config")
|
|
||||||
Masterkey: $(cat "/opt/zitadel/.masterkey")
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/opt/zitadel/config.yaml
|
cat <<EOF >/opt/zitadel/config.yaml
|
||||||
Port: 8080
|
ExternalDomain: ${LOCAL_IP}
|
||||||
ExternalPort: 8080
|
ExternalPort: 8080
|
||||||
ExternalDomain: localhost
|
|
||||||
ExternalSecure: false
|
|
||||||
TLS:
|
TLS:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
KeyPath: ""
|
|
||||||
Key: ""
|
|
||||||
CertPath: ""
|
|
||||||
Cert: ""
|
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
postgres:
|
postgres:
|
||||||
Host: localhost
|
Host: localhost
|
||||||
Port: 5432
|
Port: 5432
|
||||||
Database: ${DB_NAME}
|
Database: zitadel
|
||||||
User:
|
User:
|
||||||
Username: ${DB_USER}
|
Username: zitadel
|
||||||
Password: ${DB_PASS}
|
Password: ${PG_DB_PASS}
|
||||||
SSL:
|
SSL:
|
||||||
Mode: disable
|
Mode: disable
|
||||||
RootCert: ""
|
EOF
|
||||||
Cert: ""
|
if [[ "$var_zitadel_login" == "v1" ]]; then
|
||||||
Key: ""
|
cat <<EOF >>/opt/zitadel/config.yaml
|
||||||
Admin:
|
Port: 8080
|
||||||
Username: ${DB_ADMIN_USER}
|
ExternalSecure: false
|
||||||
Password: ${DB_ADMIN_PASS}
|
|
||||||
SSL:
|
|
||||||
Mode: disable
|
|
||||||
RootCert: ""
|
|
||||||
Cert: ""
|
|
||||||
Key: ""
|
|
||||||
DefaultInstance:
|
DefaultInstance:
|
||||||
Features:
|
Features:
|
||||||
LoginV2:
|
LoginV2:
|
||||||
Required: false
|
Required: false
|
||||||
|
FirstInstance:
|
||||||
|
Org:
|
||||||
|
Human:
|
||||||
|
UserName: zitadel-admin@zitadel.localhost
|
||||||
|
Password: ${ADMIN_PASS}
|
||||||
|
PasswordChangeRequired: true
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Installed Zitadel Enviroments"
|
else
|
||||||
|
cat <<EOF >>/opt/zitadel/config.yaml
|
||||||
|
Port: 8081
|
||||||
|
ExternalSecure: true
|
||||||
|
DefaultInstance:
|
||||||
|
Features:
|
||||||
|
LoginV2:
|
||||||
|
Required: true
|
||||||
|
FirstInstance:
|
||||||
|
LoginClientPatPath: /opt/zitadel/login-client.pat
|
||||||
|
Org:
|
||||||
|
Human:
|
||||||
|
UserName: zitadel-admin@zitadel.localhost
|
||||||
|
Password: ${ADMIN_PASS}
|
||||||
|
PasswordChangeRequired: true
|
||||||
|
LoginClient:
|
||||||
|
Machine:
|
||||||
|
Username: login-client
|
||||||
|
Name: Automatically Initialized IAM_LOGIN_CLIENT
|
||||||
|
Pat:
|
||||||
|
ExpirationDate: 2099-01-01T00:00:00Z
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
chmod 600 /opt/zitadel/.masterkey /opt/zitadel/config.yaml
|
||||||
|
msg_ok "Configured Zitadel"
|
||||||
|
|
||||||
msg_info "Creating Services"
|
msg_info "Initializing Zitadel"
|
||||||
|
$STD zitadel init zitadel --config /opt/zitadel/config.yaml
|
||||||
|
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --steps /opt/zitadel/config.yaml
|
||||||
|
cat <<EOF >>~/zitadel.creds
|
||||||
|
|
||||||
|
Zitadel Admin
|
||||||
|
Username: zitadel-admin@zitadel.localhost
|
||||||
|
Initial Password: ${ADMIN_PASS}
|
||||||
|
EOF
|
||||||
|
chmod 600 ~/zitadel.creds
|
||||||
|
msg_ok "Initialized Zitadel"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/zitadel.service
|
cat <<EOF >/etc/systemd/system/zitadel.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=ZITADEL Identiy Server
|
Description=Zitadel
|
||||||
After=network.target postgresql.service
|
After=network.target postgresql.service
|
||||||
Wants=postgresql.service
|
Wants=postgresql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=zitadel
|
ExecStart=/usr/local/bin/zitadel start --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
|
||||||
Group=zitadel
|
|
||||||
ExecStart=/usr/local/bin/zitadel start --masterkeyFile "/opt/zitadel/.masterkey" --config "/opt/zitadel/config.yaml"
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
TimeoutStartSec=0
|
|
||||||
|
|
||||||
# Security Hardening options
|
|
||||||
ProtectSystem=full
|
|
||||||
ProtectHome=true
|
|
||||||
PrivateTmp=true
|
|
||||||
NoNewPrivileges=true
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now zitadel
|
systemctl enable -q --now zitadel
|
||||||
msg_ok "Created Services"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
msg_info "Zitadel initial setup"
|
if [[ "$var_zitadel_login" != "v1" ]]; then
|
||||||
zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null &
|
NODE_VERSION="24" setup_nodejs
|
||||||
sleep 60
|
fetch_and_deploy_gh_release "zitadel-login" "zitadel/zitadel" "prebuild" "latest" "/opt/zitadel-login" "zitadel-login.tar.gz"
|
||||||
kill $(lsof -i | awk '/zitadel/ {print $2}' | head -n1)
|
|
||||||
useradd zitadel
|
|
||||||
msg_ok "Zitadel initialized"
|
|
||||||
|
|
||||||
msg_info "Set ExternalDomain to current IP and restart Zitadel"
|
msg_info "Setting up Zitadel Login"
|
||||||
IP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
$STD apt install -y nginx
|
||||||
sed -i "0,/localhost/s/localhost/${IP}/" /opt/zitadel/config.yaml
|
create_self_signed_cert "zitadel"
|
||||||
systemctl stop -q zitadel
|
cat <<EOF >/opt/zitadel/login.env
|
||||||
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
|
ZITADEL_API_URL=http://127.0.0.1:8081
|
||||||
systemctl restart -q zitadel
|
ZITADEL_API_AWAITINITIALCONN=5m
|
||||||
msg_ok "Zitadel restarted with ExternalDomain set to current IP"
|
ZITADEL_SERVICE_USER_TOKEN_FILE=/opt/zitadel/login-client.pat
|
||||||
|
ZITADEL_SESSION_COOKIE_SECRET=$(random_password 48)
|
||||||
msg_info "Create zitadel-rerun.sh"
|
NEXT_PUBLIC_BASE_PATH=/ui/v2/login
|
||||||
cat <<EOF >~/zitadel-rerun.sh
|
HOSTNAME=127.0.0.1
|
||||||
systemctl stop zitadel
|
PORT=3000
|
||||||
timeout --kill-after=5s 15s zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
|
|
||||||
systemctl restart zitadel
|
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Bash script for rerunning Zitadel after changing Zitadel config.yaml"
|
chmod 600 /opt/zitadel/login.env /opt/zitadel/login-client.pat
|
||||||
|
cat <<EOF >/etc/systemd/system/zitadel-login.service
|
||||||
|
[Unit]
|
||||||
|
Description=Zitadel Login
|
||||||
|
After=network.target zitadel.service
|
||||||
|
Wants=zitadel.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/zitadel-login
|
||||||
|
EnvironmentFile=/opt/zitadel/login.env
|
||||||
|
ExecStart=/opt/zitadel-login/entrypoint.sh node apps/login/server.js
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now zitadel-login
|
||||||
|
cat <<'EOF' >/etc/nginx/sites-available/zitadel
|
||||||
|
server {
|
||||||
|
listen 8080 ssl;
|
||||||
|
http2 on;
|
||||||
|
server_name _;
|
||||||
|
ssl_certificate /etc/ssl/zitadel/zitadel.crt;
|
||||||
|
ssl_certificate_key /etc/ssl/zitadel/zitadel.key;
|
||||||
|
error_page 497 =301 https://$http_host$request_uri;
|
||||||
|
|
||||||
|
location = / {
|
||||||
|
return 302 /ui/v2/login/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /ui/v2/login {
|
||||||
|
proxy_pass http://127.0.0.1:3000;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/ {
|
||||||
|
rewrite ^/api(/.*)$ $1 break;
|
||||||
|
grpc_pass grpc://127.0.0.1:8081;
|
||||||
|
grpc_set_header Host $http_host;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
grpc_pass grpc://127.0.0.1:8081;
|
||||||
|
grpc_set_header Host $http_host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
nginx_enable_site "zitadel"
|
||||||
|
msg_ok "Set up Zitadel Login"
|
||||||
|
fi
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Reference in new issue
Block a user