Compare commits

...

26 Commits

Author SHA1 Message Date
MickLesk
be029ef0c4 LocalAI: pin the CPU backends when the container has no GPU runtime
LocalAI resolves meta backends from the GPU vendor it reads out of sysfs,
which is the host's card even with no driver installed in the container,
so llama-cpp became cuda12-llama-cpp and never started (#17908). Force
the default capability unless a CUDA, ROCm or Level Zero runtime is
present; update adds the pin to existing installs.
2026-10-13 16:33:22 +02:00
community-scripts-pr-app[bot]
82a6154ea9 Update CHANGELOG.md (#17906)
Some checks are pending
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Set state to is_deleted in pocketbase / delete-pocketbase-entry (push) Waiting to run
Sync ct/install to Incus / dispatch (push) Waiting to run
Update script timestamp on .sh changes / update-script-timestamp (push) Waiting to run
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-13 08:53:21 +00:00
community-scripts-pr-app[bot]
af6118c1d1 Update CHANGELOG.md (#17904)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-13 07:39:30 +00:00
durzo
eb79e9bcba zammad: Debian 13, new apt repo, Elasticsearch 8 (#17836)
- Default to Debian 13
- Switch Zammad repo from dl.packager.io (frozen at 7.0.x) to go.packager.io
- Install Elasticsearch 8.x instead of EOL 7.x; drop ingest-attachment plugin (built in)
- Update migrates old containers: Zammad repo, ES 7 -> 8, search index rebuild
2026-10-13 09:39:06 +02:00
community-scripts-pr-app[bot]
65aa185016 Update CHANGELOG.md (#17903)
Some checks failed
Create Changelog Pull Request / update-changelog-pull-request (push) Has been cancelled
Set state to is_deleted in pocketbase / delete-pocketbase-entry (push) Has been cancelled
Sync ct/install to Incus / dispatch (push) Has been cancelled
Update script timestamp on .sh changes / update-script-timestamp (push) Has been cancelled
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-13 05:48:24 +00:00
CerberusStyle
9751f8c1a9 [Gluetun] Update GitHub repository source install and update. (#17899)
* Update Gluetun GitHub repository source

* Update GitHub repository reference for gluetun
2026-10-13 07:47:55 +02:00
community-scripts-pr-app[bot]
cb077df86f Update CHANGELOG.md (#17902)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-13 05:43:26 +00:00
CanbiZ (MickLesk)
e5013d1fb6 Immich: Bump to 3.3.1 and restore (failed) geodata/countryInfo.txt on update (#17894)
* Immich: restore geodata/countryInfo.txt on update and pin 3.3.1

Updates run between the 3.3.0 pin and #17823 wrote countryInfo.txt into
app/ instead of geodata/, so metadata extraction failed and new uploads
never got thumbnails. The download sat inside the release block, so a
plain update could not repair it until the next pin. 3.3.1 only bumps
version fields in the manifests.

* Immich: follow base-images for libheif like the other libraries

The hard pin from #16996 sat at 1.23.2 while upstream moved to 1.23.5.
2026-10-13 07:42:59 +02:00
community-scripts-pr-app[bot]
f9b023bc3f Update CHANGELOG.md (#17901)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-13 05:42:40 +00:00
CanbiZ (MickLesk)
5842691dad WikiJS: use v2 Repo until v3 is stable (#17895)
* WikiJS: use v2 Repo until v3 is stable

* Update wikijs.sh for version 2 support
2026-10-13 07:42:08 +02:00
community-scripts-pr-app[bot]
1a14f2f9af Update CHANGELOG.md (#17893)
Some checks failed
Create Changelog Pull Request / update-changelog-pull-request (push) Has been cancelled
Set state to is_deleted in pocketbase / delete-pocketbase-entry (push) Has been cancelled
Sync ct/install to Incus / dispatch (push) Has been cancelled
Update script timestamp on .sh changes / update-script-timestamp (push) Has been cancelled
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 18:12:33 +00:00
community-scripts-pr-app[bot]
9d7356f2b1 Update CHANGELOG.md (#17892)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 18:11:31 +00:00
community-scripts-pr-app[bot]
ff78087273 Update CHANGELOG.md (#17891)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 16:05:54 +00:00
community-scripts-pr-app[bot]
43f3fac7da Update CHANGELOG.md (#17890)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 16:05:22 +00:00
github-actions[bot]
12b02e156e chore(ct): sync wazuh defaults from PocketBase (#17889)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-12 18:04:51 +02:00
community-scripts-pr-app[bot]
2cc029fc6a Update CHANGELOG.md (#17885)
Some checks failed
Create Changelog Pull Request / update-changelog-pull-request (push) Has been cancelled
Set state to is_deleted in pocketbase / delete-pocketbase-entry (push) Has been cancelled
Sync ct/install to Incus / dispatch (push) Has been cancelled
Update script timestamp on .sh changes / update-script-timestamp (push) Has been cancelled
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 12:14:16 +00:00
community-scripts-pr-app[bot]
093d4edd4b Update CHANGELOG.md (#17883)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 12:03:18 +00:00
push-app-to-main[bot]
9bf6586611 WatchState (#17881)
* Add watchstate (ct)

* Clean up comments in watchstate.sh

Removed comments about version sorting and Redis cache namespacing.

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
2026-10-12 14:02:50 +02:00
community-scripts-pr-app[bot]
e5148e07e0 Update CHANGELOG.md (#17878)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 08:00:57 +00:00
community-scripts-pr-app[bot]
718a3e4f52 Update CHANGELOG.md (#17877)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 08:00:41 +00:00
CanbiZ (MickLesk)
c91c0e6597 Immich Public Proxy: optional visitor upload service (#17875)
IPP 4.0 lets visitors upload through a second, optional app in the same
repository. The addon now builds the whole workspace, so upload-app is
always ready, and can run it as immich-proxy-upload on port 3001: asked
on install (var_ipp_uploads), offered in the menu of an existing
install, rebuilt and restarted on update with its config.json kept, and
removed on uninstall. It stays off unless chosen.
2026-10-12 10:00:25 +02:00
CanbiZ (MickLesk)
eb6382a399 Wanderer: bring back the wanderer-pb wrapper (#17874)
The path refactor in #16487 deleted the wrapper instead of pointing it
at the new layout, while the documented way to create the first
superuser is still wanderer-pb superuser upsert. Calling pocketbase
directly without --dir would quietly start an empty database. Install
the wrapper again, and write it on every update so containers set up
since then get it too.
2026-10-12 10:00:24 +02:00
CanbiZ (MickLesk)
e980d01cd6 Tracearr: install only the server's production dependencies (#17873)
pnpm 12.10 refuses a frozen install when the lockfile names apps/web but
that directory has no package.json, which is how the runtime tree is
built, so the update to 2.8.0 failed. Filter to @tracearr/server... the
way the upstream Dockerfile does, and copy assets/logo.png, which the
e-mail and newsletter code reads.
2026-10-12 10:00:21 +02:00
CanbiZ (MickLesk)
08a924a87a Paperless-ngx: convert glob ignore patterns, restart crashed services (#17812)
v3 compiles PAPERLESS_CONSUMER_IGNORE_PATTERNS as regex, so a v2 glob
like "*.tmp" kills the consumer on start and "._*" ignores every file.
The update now rewrites such globs to anchored regex instead of only
warning.

The four units had no Restart=, so an OOM kill during a large mail
import left the webserver and task queue down. Install sets
Restart=on-failure and the update adds it to existing units.
2026-10-12 10:00:14 +02:00
community-scripts-pr-app[bot]
169f8178d0 Update CHANGELOG.md (#17876)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-12 07:31:34 +00:00
Robert Castley
6f740aeccb Splunk Enterprise: start the service as the splunk user (#17816)
* Splunk Enterprise: start the service as the splunk user

Splunk Enterprise 10.2 rejects a root start, and the init boot script still launched splunkd as root.

* Ask for the Splunk terms on the Proxmox host

The installer runs under lxc-attach, which has no terminal, so read failed before the terms could be accepted.

* Restore the Splunk terms prompt to the install script

The prompt already runs where the keyboard is attached. The failed read came from launching the test through a pipe.

* Drop Splunk install comments and always start Splunkd
2026-10-12 09:31:04 +02:00
22 changed files with 515 additions and 65 deletions

View File

@@ -562,6 +562,52 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-10-13
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- [Gluetun] Update GitHub repository source install and update. [@CerberusStyle](https://github.com/CerberusStyle) ([#17899](https://github.com/community-scripts/ProxmoxVE/pull/17899))
- Immich: Bump to 3.3.1 and restore (failed) geodata/countryInfo.txt on update [@MickLesk](https://github.com/MickLesk) ([#17894](https://github.com/community-scripts/ProxmoxVE/pull/17894))
- WikiJS: use v2 Repo until v3 is stable [@MickLesk](https://github.com/MickLesk) ([#17895](https://github.com/community-scripts/ProxmoxVE/pull/17895))
- #### 💥 Breaking Changes
- zammad: Debian 13, new apt repo, Elasticsearch 8 [@durzo](https://github.com/durzo) ([#17836](https://github.com/community-scripts/ProxmoxVE/pull/17836))
### 💾 Core
- Keep the version key parseable by jq 1.6 [@MickLesk](https://github.com/MickLesk) ([core#134](https://github.com/community-scripts/core/pull/134))
## 2026-10-12
### 🆕 New Scripts
- WatchState ([#17881](https://github.com/community-scripts/ProxmoxVE/pull/17881))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- chore(ct): sync wazuh defaults with PocketBase [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17889](https://github.com/community-scripts/ProxmoxVE/pull/17889))
- Wanderer: bring back the wanderer-pb wrapper [@MickLesk](https://github.com/MickLesk) ([#17874](https://github.com/community-scripts/ProxmoxVE/pull/17874))
- Tracearr: install only the server's production dependencies [@MickLesk](https://github.com/MickLesk) ([#17873](https://github.com/community-scripts/ProxmoxVE/pull/17873))
- Paperless-ngx: QoL restart crashed services | patch regex [@MickLesk](https://github.com/MickLesk) ([#17812](https://github.com/community-scripts/ProxmoxVE/pull/17812))
- Splunk Enterprise: start the service as the splunk user [@rcastley](https://github.com/rcastley) ([#17816](https://github.com/community-scripts/ProxmoxVE/pull/17816))
### 💾 Core
- Draw a Community Scripts banner while a script has no header of its own [@MickLesk](https://github.com/MickLesk) ([core#133](https://github.com/community-scripts/core/pull/133))
- Order pre-release labels when comparing versions [@MickLesk](https://github.com/MickLesk) ([core#132](https://github.com/community-scripts/core/pull/132))
- gh: curl_download: wait between attempts [@MickLesk](https://github.com/MickLesk) ([core#131](https://github.com/community-scripts/core/pull/131))
### 🧰 Tools
- #### ✨ New Features
- Immich Public Proxy: optional visitor upload service (v4 Release) [@MickLesk](https://github.com/MickLesk) ([#17875](https://github.com/community-scripts/ProxmoxVE/pull/17875))
## 2026-10-11
### 🆕 New Scripts

View File

@@ -32,7 +32,7 @@ function update_script() {
exit
fi
if check_for_gh_release "gluetun" "qdm12/gluetun"; then
if check_for_gh_release "gluetun" "passteque/gluetun"; then
msg_info "Stopping Service"
systemctl stop gluetun
msg_ok "Stopped Service"

View File

@@ -77,7 +77,7 @@ EOF
BASE_DIR=${STAGING_DIR}/base-images
SOURCE_DIR=${STAGING_DIR}/image-source
cd /tmp
RELEASE="v3.3.0"
RELEASE="v3.3.1"
if [[ -f ~/.intel_version ]]; then
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 ||
@@ -114,6 +114,19 @@ EOF
msg_ok "Image-processing libraries up to date"
fi
# 3.3.0 reads geodata/countryInfo.txt; the update before #17823 saved it into app/ instead.
if [[ -d /opt/immich/geodata && ! -s /opt/immich/geodata/countryInfo.txt ]]; then
msg_info "Restoring geodata/countryInfo.txt"
if [[ -s /opt/immich/app/countryInfo.txt ]]; then
mv /opt/immich/app/countryInfo.txt /opt/immich/geodata/countryInfo.txt
else
curl_with_retry "https://download.geonames.org/export/dump/countryInfo.txt" /opt/immich/geodata/countryInfo.txt
fi
chown immich:immich /opt/immich/geodata/countryInfo.txt
systemctl restart immich-web
msg_ok "Restored geodata/countryInfo.txt"
fi
if check_for_gh_release "Immich" "immich-app/immich" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
msg_warn "The update takes 5-15 minutes, do not interrupt it"
PREV_IMMICH="$(cat ~/.immich)"
@@ -489,8 +502,7 @@ function compile_jpegli() {
function compile_libheif() {
SOURCE=${SOURCE_DIR}/libheif
ensure_dependencies libaom-dev
LIBHEIF_REVISION="ac1cb05c39008f01525c991ff8b88f84ddf70fd2"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)}"
LIBHEIF_REVISION="$(jq -cr '.revision' "$BASE_DIR"/server/sources/libheif.json)"
if [[ "${update:-}" ]] || [[ "$LIBHEIF_REVISION" != "$(grep 'libheif' ~/.immich_library_revisions | awk '{print $2}')" ]]; then
msg_info "Recompiling libheif"
[[ -d "$SOURCE" ]] && rm -rf "$SOURCE"

View File

@@ -37,6 +37,15 @@ function update_script() {
exit
fi
# Older installs have no CPU pin; on a host with a GPU but no driver in the
# container every model then ends in "backend not found".
if ! grep -q '^LOCALAI_FORCE_META_BACKEND_CAPABILITY=' /opt/localai.env 2>/dev/null &&
! ldconfig -p 2>/dev/null | grep -qE 'libcuda[.]so|libamdhip64[.]so|libze_intel_gpu[.]so|libze_loader[.]so'; then
echo "LOCALAI_FORCE_META_BACKEND_CAPABILITY=default" >>/opt/localai.env
systemctl restart localai
msg_ok "Pinned LocalAI to the CPU backends (no GPU runtime in the container)"
fi
if check_for_gh_release "localai" "mudler/LocalAI"; then
msg_info "Stopping Service"
systemctl stop localai

View File

@@ -157,8 +157,6 @@ function update_script() {
sed -i '$a\PAPERLESS_ARCHIVE_FILE_GENERATION=never' "$PAPERLESS_CONF"
fi
fi
[[ -n "$(sed -n '/^PAPERLESS_CONSUMER_IGNORE_PATTERNS=/p' "$PAPERLESS_CONF")" ]] &&
msg_warn "PAPERLESS_CONSUMER_IGNORE_PATTERNS now uses regex patterns; please verify custom values."
[[ -n "$(sed -n '/^PAPERLESS_PRE_CONSUME_SCRIPT=/p;/^PAPERLESS_POST_CONSUME_SCRIPT=/p' "$PAPERLESS_CONF")" ]] &&
msg_warn "Pre/post consume scripts no longer receive positional arguments in v3; please verify custom scripts."
msg_ok "Migrated Paperless-ngx configuration"
@@ -172,7 +170,9 @@ function update_script() {
fi
for svc in consumer scheduler task-queue webserver; do
unit="/etc/systemd/system/paperless-${svc}.service"
[[ -f "$unit" ]] && sed -i 's|uv run -- |uv run --no-sync -- |g' "$unit"
[[ -f "$unit" ]] || continue
sed -i 's|uv run -- |uv run --no-sync -- |g' "$unit"
grep -q '^Restart=' "$unit" || sed -i '/^\[Service\]/a Restart=on-failure\nRestartSec=5' "$unit"
done
$STD systemctl daemon-reload
cd /opt/paperless
@@ -181,6 +181,34 @@ function update_script() {
$STD uv run -- python manage.py migrate
msg_ok "Updated Paperless-ngx"
if ((BRIDGE_UPDATE == 0)); then
IGNORE_FIXED="$(
/opt/paperless/.venv/bin/python - /opt/paperless/paperless.conf <<'EOF'
import json, re, sys
key = "PAPERLESS_CONSUMER_IGNORE_PATTERNS="
lines = open(sys.argv[1]).read().splitlines(True)
def is_glob(p):
if p.startswith("^") or p.endswith("$"):
return False
try:
return bool(re.search(p, "scan.pdf"))
except re.error:
return True
for i, line in enumerate(lines):
if line.startswith(key):
patterns = json.loads(line[len(key):].strip().strip("'"))
fixed = ["^" + re.escape(p).replace(r"\*", ".*").replace(r"\?", ".") + "$" if is_glob(p) else p for p in patterns]
if fixed != patterns:
lines[i] = key + json.dumps(fixed) + "\n"
print(json.dumps(fixed))
open(sys.argv[1], "w").writelines(lines)
EOF
)" || IGNORE_FIXED=""
[[ -n "$IGNORE_FIXED" ]] && msg_warn "Converted glob PAPERLESS_CONSUMER_IGNORE_PATTERNS to regex (required since v3): ${IGNORE_FIXED}"
fi
if ((BRIDGE_UPDATE == 0)) && [[ "$PAPERLESS_INSTALLED_VERSION" == "2.20.15" ]]; then
$STD apt -y purge libzbar0t64 libzbar0 2>/dev/null || true
$STD apt -y autoremove 2>/dev/null || true

View File

@@ -125,7 +125,7 @@ EOF
$STD ./scripts/fetch-basemap.sh || msg_warn "Basemap download failed, keeping the existing map"
[[ -d /opt/tracearr/data ]] && mv /opt/tracearr/data /opt/tracearr.data
rm -rf /opt/tracearr
mkdir -p /opt/tracearr/{packages/shared,packages/emails,apps/server,apps/web,apps/server/src/db}
mkdir -p /opt/tracearr/{packages/shared,packages/emails,apps/server,apps/web,apps/server/src/db,assets}
cp -rf package.json /opt/tracearr/
cp -rf pnpm-workspace.yaml /opt/tracearr/
cp -rf pnpm-lock.yaml /opt/tracearr/
@@ -138,13 +138,14 @@ EOF
cp -rf packages/emails/package.json /opt/tracearr/packages/emails/
cp -rf packages/emails/dist /opt/tracearr/packages/emails/dist
cp -rf apps/server/src/db/migrations /opt/tracearr/apps/server/src/db/migrations
cp -f assets/logo.png /opt/tracearr/assets/
[[ -d /opt/tracearr.data ]] && mv /opt/tracearr.data /opt/tracearr/data
mkdir -p /opt/tracearr/data
cp -rf data/. /opt/tracearr/data/
mkdir -p /opt/tracearr/data/image-cache
rm -rf /opt/tracearr.build
cd /opt/tracearr
$STD pnpm install --prod --frozen-lockfile --ignore-scripts
$STD pnpm install --prod --frozen-lockfile --ignore-scripts --filter @tracearr/server...
$STD chown -R tracearr:tracearr /opt/tracearr
msg_ok "Built Tracearr"

View File

@@ -100,7 +100,6 @@ EOF
-e "s|^MEILI_DB_PATH=.*|MEILI_DB_PATH=/opt/wanderer_data/meili_data|" \
/opt/wanderer/.env
sed -i "s|^db_path =.*|db_path = \"/opt/wanderer_data/meili_data\"|" /etc/meilisearch.toml
rm -f /usr/local/bin/wanderer-pb
cat <<EOF >/etc/systemd/system/wanderer-pocketbase.service
[Unit]
@@ -155,6 +154,16 @@ EOF
msg_ok "Added POCKETBASE_PROXY_SECRET"
fi
cat <<'EOF' >/usr/local/bin/wanderer-pb
#!/usr/bin/env bash
set -a
source /opt/wanderer/.env
set +a
cd /opt/wanderer/db
exec ./pocketbase "$@" --dir="$PB_DB_LOCATION"
EOF
chmod +x /usr/local/bin/wanderer-pb
if [[ -f /opt/wanderer_data/plugins/plugin.json ]]; then
msg_info "Reinstalling wanderer plugins, one directory each"
find /opt/wanderer_data/plugins -maxdepth 1 -type f -delete

77
ct/watchstate.sh Normal file
View File

@@ -0,0 +1,77 @@
#!/usr/bin/env bash
_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")
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/arabcoders/watchstate
APP="WatchState"
var_tags="${var_tags:-media;plex;jellyfin;emby}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/watchstate ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "watchstate" "arabcoders/watchstate" "" "" "v"; then
msg_info "Stopping WatchState"
systemctl stop watchstate-worker php8.5-fpm
msg_ok "Stopped WatchState"
create_backup /opt/watchstate/.env
setup_composer
NODE_VERSION="24" NODE_MODULE="bun" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "watchstate" "arabcoders/watchstate" "tarball" "latest" "/opt/watchstate" "" "v"
restore_backup
msg_info "Building WatchState"
cd /opt/watchstate
sed -i "s/'version' => 'dev-master'/'version' => 'v$(cat ~/.watchstate)'/" config/config.php
$STD composer install --no-dev --optimize-autoloader --no-interaction
cd /opt/watchstate/frontend
$STD bun install --frozen-lockfile --production
NODE_ENV=production $STD bun run generate
mv /opt/watchstate/frontend/exported /opt/watchstate/public/exported
rm -rf /opt/watchstate/frontend/node_modules /opt/watchstate/frontend/.nuxt
msg_ok "Built WatchState"
msg_info "Migrating WatchState Database"
$STD php /opt/watchstate/bin/console db:migrate --execute
$STD php /opt/watchstate/bin/console db:index
chown -R www-data:www-data /opt/watchstate_data
msg_ok "Migrated WatchState Database"
msg_info "Starting WatchState"
systemctl start php8.5-fpm watchstate-worker
msg_ok "Started WatchState"
msg_ok "Updated successfully!"
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:8080${CL}"

View File

@@ -10,7 +10,7 @@ APP="Wazuh"
var_tags="${var_tags:-security;monitoring}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-25}"
var_disk="${var_disk:-35}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"

View File

@@ -32,14 +32,14 @@ function update_script() {
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
if check_for_gh_release "wikijs" "requarks/wiki"; then
msg_info "Verifying whether ${APP}' new release is v3.x+ and current install uses SQLite."
SQLITE_INSTALL=$([ -f /opt/wikijs/db.sqlite ] && echo "true" || echo "false")
if [[ "${SQLITE_INSTALL}" == "true" && "${CHECK_UPDATE_RELEASE}" =~ ^3.* ]]; then
echo "SQLite is not supported in v3.x+, currently there is no update path availble."
exit
fi
msg_ok "There is an update path available for ${APP}"
if check_for_gh_release "wikijs" "requarks/wiki-v2"; then
#msg_info "Verifying whether ${APP}' new release is v3.x+ and current install uses SQLite."
#SQLITE_INSTALL=$([ -f /opt/wikijs/db.sqlite ] && echo "true" || echo "false")
#if [[ "${SQLITE_INSTALL}" == "true" && "${CHECK_UPDATE_RELEASE}" =~ ^3.* ]]; then
# echo "SQLite is not supported in v3.x+, currently there is no update path availble."
# exit
#fi
#msg_ok "There is an update path available for ${APP}"
msg_info "Stopping Service"
systemctl stop wikijs
@@ -47,15 +47,17 @@ function update_script() {
msg_info "Backing up Data"
mkdir /opt/wikijs-backup
$SQLITE_INSTALL && cp /opt/wikijs/db.sqlite /opt/wikijs-backup
#$SQLITE_INSTALL &&
cp /opt/wikijs/db.sqlite /opt/wikijs-backup
cp -R /opt/wikijs/{config.yml,/data} /opt/wikijs-backup
msg_ok "Backed up Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "wikijs" "requarks/wiki-v2" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
msg_info "Restoring Data"
cp -R /opt/wikijs-backup/* /opt/wikijs
$SQLITE_INSTALL && $STD npm rebuild sqlite3
#$SQLITE_INSTALL &&
$STD npm rebuild sqlite3
rm -rf /opt/wikijs-backup
msg_ok "Restored Data"

View File

@@ -12,7 +12,7 @@ var_disk="${var_disk:-8}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-no}"
var_unprivileged="${var_unprivileged:-1}"
@@ -34,6 +34,64 @@ function update_script() {
systemctl stop zammad
msg_ok "Stopped Service"
if grep -qs "dl.packager.io" /etc/apt/sources.list.d/zammad*; then
msg_info "Migrating Zammad Repository"
rm -f /etc/apt/keyrings/pkgr-zammad.gpg
setup_deb822_repo \
"zammad" \
"https://go.packager.io/srv/deb/zammad/zammad/gpg-key.asc" \
"https://go.packager.io/srv/deb/zammad/zammad/stable/debian" \
"$(get_os_info version_id)" \
"main"
msg_ok "Migrated Zammad Repository"
fi
REBUILD_INDEX=false
if [[ "$(dpkg-query -W -f='${Version}' elasticsearch 2>/dev/null)" == 7.* ]]; then
msg_info "Upgrading Elasticsearch to 8.x"
systemctl stop elasticsearch
if /usr/share/elasticsearch/bin/elasticsearch-plugin list 2>/dev/null | grep -q "ingest-attachment"; then
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin remove ingest-attachment
fi
rm -f /etc/apt/sources.list.d/elastic-7.x.list /usr/share/keyrings/elasticsearch-keyring.gpg
setup_deb822_repo \
"elasticsearch" \
"https://artifacts.elastic.co/GPG-KEY-elasticsearch" \
"https://artifacts.elastic.co/packages/8.x/apt" \
"stable" \
"main"
ES_JAVA_OPTS="-Xms1g -Xmx1g" $STD apt install -y elasticsearch
if [[ -f /etc/elasticsearch/jvm.options.dpkg-dist ]]; then
mv /etc/elasticsearch/jvm.options.dpkg-dist /etc/elasticsearch/jvm.options
fi
rm -f /etc/elasticsearch/elasticsearch.yml.dpkg-dist
rm -rf /var/lib/elasticsearch/*
cat <<EOF >/etc/elasticsearch/jvm.options.d/heap.options
-Xms2g
-Xmx2g
EOF
cat <<EOF >/etc/elasticsearch/elasticsearch.yml
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.type: single-node
network.host: 127.0.0.1
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
xpack.security.http.ssl.enabled: false
bootstrap.memory_lock: false
EOF
systemctl daemon-reload
systemctl restart -q elasticsearch
for i in $(seq 1 30); do
if curl -s http://127.0.0.1:9200 >/dev/null 2>&1; then
break
fi
sleep 2
done
REBUILD_INDEX=true
msg_ok "Upgraded Elasticsearch to 8.x"
fi
msg_info "Updating Zammad"
apt_update_safe
$STD apt-mark hold zammad
@@ -42,6 +100,12 @@ function update_script() {
$STD apt upgrade -y
msg_ok "Updated Zammad"
if [[ "$REBUILD_INDEX" == true ]]; then
msg_info "Rebuilding Search Index"
$STD zammad run rake zammad:searchindex:rebuild
msg_ok "Rebuilt Search Index"
fi
msg_info "Starting Service"
systemctl start zammad
msg_ok "Started Service"

View File

@@ -27,7 +27,7 @@ ln -sf /usr/sbin/openvpn /usr/sbin/openvpn2.6
msg_ok "Configured iptables"
fetch_and_deploy_gh_release "gluetun" "qdm12/gluetun" "tarball"
fetch_and_deploy_gh_release "gluetun" "passteque/gluetun" "tarball"
GO_VERSION="$(grep -m1 '^go ' /opt/gluetun/go.mod | awk '{print $2}')" setup_go
msg_info "Building Gluetun"

View File

@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
RELEASE="v3.3.0"
RELEASE="v3.3.1"
if lscpu | grep -q 'GenuineIntel'; then
echo ""
echo ""
@@ -268,8 +268,7 @@ msg_ok "(2/6) Compiled jpegli"
msg_info "(3/6) Compiling libheif"
SOURCE=${SOURCE_DIR}/libheif
LIBHEIF_REVISION="ac1cb05c39008f01525c991ff8b88f84ddf70fd2"
# : "${LIBHEIF_REVISION:=$(jq -cr '.revision' $BASE_DIR/server/sources/libheif.json)}"
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"

View File

@@ -39,6 +39,12 @@ LOCALAI_MODELS_PATH=/opt/localai_data/models
LOCALAI_BACKENDS_PATH=/opt/localai_data/backends
LOCALAI_LOG_LEVEL=info
EOF
# LocalAI picks the backend variant from the GPU it sees in sysfs, which is the
# host's card even when no driver was installed in here, and a CUDA/ROCm/SYCL
# backend then never starts. Pin the CPU variants unless a runtime is present.
if ! ldconfig -p 2>/dev/null | grep -qE 'libcuda[.]so|libamdhip64[.]so|libze_intel_gpu[.]so|libze_loader[.]so'; then
echo "LOCALAI_FORCE_META_BACKEND_CAPABILITY=default" >>/opt/localai.env
fi
# LocalAI refuses to start on a wildcard bind with nothing to identify callers,
# and binding the wildcard is what makes the container reachable at all.
if [[ "$var_auth" == "yes" ]]; then

View File

@@ -109,6 +109,8 @@ Requires=redis.service
[Service]
WorkingDirectory=/opt/paperless/src
ExecStart=uv run --no-sync -- celery --app paperless beat --loglevel INFO
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
@@ -123,6 +125,8 @@ After=postgresql.service
[Service]
WorkingDirectory=/opt/paperless/src
ExecStart=uv run --no-sync -- celery --app paperless worker --loglevel INFO
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
@@ -137,6 +141,8 @@ Requires=redis.service
WorkingDirectory=/opt/paperless/src
ExecStartPre=/bin/sleep 2
ExecStart=uv run --no-sync -- python manage.py document_consumer
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
@@ -153,6 +159,8 @@ Requires=redis.service
WorkingDirectory=/opt/paperless/src
#ExecStartPre=uv run --no-sync -- python manage.py document_index reindex --if-needed --no-progress-bar
ExecStart=uv run --no-sync -- granian --interface asginl --ws --loop uvloop "paperless.asgi:application"
Restart=on-failure
RestartSec=5
Environment=GRANIAN_HOST=::
Environment=GRANIAN_PORT=8000
Environment=GRANIAN_WORKERS=1

View File

@@ -51,8 +51,8 @@ $STD curl -fsSL -o "splunk-enterprise.tgz" "$DOWNLOAD_URL" || {
}
$STD tar -xzf "splunk-enterprise.tgz" -C /opt
rm -f "splunk-enterprise.tgz"
addgroup --system splunk
adduser --system --home /opt/splunk --shell /bin/bash --ingroup splunk --no-create-home splunk
$STD addgroup --system splunk
$STD adduser --system --home /opt/splunk --shell /bin/bash --ingroup splunk --no-create-home splunk
chown -R splunk:splunk /opt/splunk
msg_ok "Setup Splunk Enterprise v${RELEASE}"
@@ -64,17 +64,35 @@ Splunk-Credentials
Username: $ADMIN_USER
Password: $ADMIN_PASS
EOF
chmod 600 ~/splunk.creds
cat <<EOF >"/opt/splunk/etc/system/local/user-seed.conf"
install -d -o splunk -g splunk -m 755 /opt/splunk/etc/system/local
cat <<EOF >/opt/splunk/etc/system/local/user-seed.conf
[user_info]
USERNAME = $ADMIN_USER
PASSWORD = $ADMIN_PASS
EOF
chown splunk:splunk /opt/splunk/etc/system/local/user-seed.conf
chmod 600 /opt/splunk/etc/system/local/user-seed.conf
if ! grep -q '^SPLUNK_OS_USER=' /opt/splunk/etc/splunk-launch.conf; then
echo 'SPLUNK_OS_USER=splunk' >>/opt/splunk/etc/splunk-launch.conf
fi
chown splunk:splunk /opt/splunk/etc/splunk-launch.conf
msg_ok "Created Splunk admin user"
msg_info "Starting Service"
$STD sudo -u splunk /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt
$STD /opt/splunk/bin/splunk enable boot-start -user splunk
$STD sudo -H -u splunk /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt
$STD sudo -H -u splunk /opt/splunk/bin/splunk stop --answer-yes --no-prompt
$STD /opt/splunk/bin/splunk enable boot-start \
-systemd-managed 1 \
-user splunk \
-group splunk \
--accept-license \
--answer-yes \
--no-prompt
chown -R splunk:splunk /opt/splunk
$STD systemctl daemon-reload
$STD systemctl enable --now Splunkd
msg_ok "Started Service"
motd_ssh

View File

@@ -68,7 +68,7 @@ $STD pnpm install --frozen-lockfile --force
$STD pnpm turbo telemetry disable
$STD pnpm turbo run build --no-daemon --filter=@tracearr/shared --filter=@tracearr/server --filter=@tracearr/web
$STD ./scripts/fetch-basemap.sh || msg_warn "Basemap download failed, the map will show without base tiles"
mkdir -p /opt/tracearr/{packages/shared,packages/emails,apps/server,apps/web,apps/server/src/db}
mkdir -p /opt/tracearr/{packages/shared,packages/emails,apps/server,apps/web,apps/server/src/db,assets}
cp -rf package.json /opt/tracearr/
cp -rf pnpm-workspace.yaml /opt/tracearr/
cp -rf pnpm-lock.yaml /opt/tracearr/
@@ -81,11 +81,12 @@ cp -rf packages/shared/dist /opt/tracearr/packages/shared/dist
cp -rf packages/emails/package.json /opt/tracearr/packages/emails/
cp -rf packages/emails/dist /opt/tracearr/packages/emails/dist
cp -rf apps/server/src/db/migrations /opt/tracearr/apps/server/src/db/migrations
cp -f assets/logo.png /opt/tracearr/assets/
cp -rf data /opt/tracearr/data
mkdir -p /opt/tracearr/data/image-cache
rm -rf /opt/tracearr.build
cd /opt/tracearr
$STD pnpm install --prod --frozen-lockfile --ignore-scripts
$STD pnpm install --prod --frozen-lockfile --ignore-scripts --filter @tracearr/server...
msg_ok "Built Tracearr"
msg_info "Configuring Tracearr"

View File

@@ -54,6 +54,16 @@ PB_DB_LOCATION=/opt/wanderer_data/pb_data
MEILI_DB_PATH=/opt/wanderer_data/meili_data
EOF
cat <<'EOF' >/usr/local/bin/wanderer-pb
#!/usr/bin/env bash
set -a
source /opt/wanderer/.env
set +a
cd /opt/wanderer/db
exec ./pocketbase "$@" --dir="$PB_DB_LOCATION"
EOF
chmod +x /usr/local/bin/wanderer-pb
cat <<EOF >/etc/systemd/system/wanderer-pocketbase.service
[Unit]
Description=wanderer PocketBase

View File

@@ -0,0 +1,99 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/arabcoders/watchstate
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt install -y \
nginx \
redis-server \
ripgrep \
sqlite3
msg_ok "Installed Dependencies"
PHP_VERSION="8.5" PHP_FPM="YES" setup_php
setup_composer
setup_ffmpeg
NODE_VERSION="24" NODE_MODULE="bun" setup_nodejs
fetch_and_deploy_gh_release "watchstate" "arabcoders/watchstate" "tarball" "latest" "/opt/watchstate" "" "v"
msg_info "Building WatchState"
cd /opt/watchstate
sed -i "s/'version' => 'dev-master'/'version' => 'v$(cat ~/.watchstate)'/" config/config.php
$STD composer install --no-dev --optimize-autoloader --no-interaction
cd /opt/watchstate/frontend
$STD bun install --frozen-lockfile --production
NODE_ENV=production $STD bun run generate
mv /opt/watchstate/frontend/exported /opt/watchstate/public/exported
rm -rf /opt/watchstate/frontend/node_modules /opt/watchstate/frontend/.nuxt
msg_ok "Built WatchState"
msg_info "Configuring WatchState"
# loaded first by CLI, worker and php-fpm alike; the default data dir is /opt/watchstate/var, which every update wipes
cat <<EOF >/opt/watchstate/.env
WS_DATA_PATH=/opt/watchstate_data
EOF
$STD php /opt/watchstate/bin/console db:migrate --execute
$STD php /opt/watchstate/bin/console system:apikey
chown -R www-data:www-data /opt/watchstate_data
msg_ok "Configured WatchState"
msg_info "Configuring Nginx"
PHP_SOCK=$(get_php_fpm_socket)
cat <<EOF >/etc/nginx/sites-available/watchstate
server {
listen 8080;
server_name _;
root /opt/watchstate/public;
index index.php;
client_max_body_size 100M;
location / {
try_files \$uri /index.php\$is_args\$args;
}
location ~ \.php\$ {
fastcgi_pass unix:${PHP_SOCK};
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 600;
}
}
EOF
nginx_enable_site "watchstate"
msg_ok "Configured Nginx"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/watchstate-worker.service
[Unit]
Description=WatchState Worker
After=network.target redis-server.service
[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/watchstate
ExecStart=/usr/bin/php /opt/watchstate/bin/console system:worker -v
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now watchstate-worker
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc

View File

@@ -20,7 +20,7 @@ msg_ok "Installed Dependencies"
NODE_VERSION="26" NODE_MODULE="yarn,node-gyp" setup_nodejs
PG_VERSION="17" setup_postgresql
PG_DB_NAME="wiki" PG_DB_USER="wikijs_user" PG_DB_EXTENSIONS="pg_trgm" setup_postgresql_db
fetch_and_deploy_gh_release "wikijs" "requarks/wiki" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
fetch_and_deploy_gh_release "wikijs" "requarks/wiki-v2" "prebuild" "latest" "/opt/wikijs" "wiki-js.tar.gz"
msg_info "Configuring Wiki.js"
mv /opt/wikijs/config.sample.yml /opt/wikijs/config.yml

View File

@@ -16,29 +16,31 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
git \
nginx \
apt-transport-https
nginx
msg_ok "Installed Dependencies"
msg_info "Setting up Elasticsearch"
setup_deb822_repo \
"elasticsearch" \
"https://artifacts.elastic.co/GPG-KEY-elasticsearch" \
"https://artifacts.elastic.co/packages/7.x/apt" \
"https://artifacts.elastic.co/packages/8.x/apt" \
"stable" \
"main"
$STD apt install -y elasticsearch
sed -i 's/^#\{0,2\} *-Xms[0-9]*g.*/-Xms2g/' /etc/elasticsearch/jvm.options
sed -i 's/^#\{0,2\} *-Xmx[0-9]*g.*/-Xmx2g/' /etc/elasticsearch/jvm.options
ES_JAVA_OPTS="-Xms1g -Xmx1g" $STD apt install -y elasticsearch
cat <<EOF >/etc/elasticsearch/jvm.options.d/heap.options
-Xms2g
-Xmx2g
EOF
cat <<EOF >/etc/elasticsearch/elasticsearch.yml
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.type: single-node
network.host: 127.0.0.1
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
xpack.security.http.ssl.enabled: false
bootstrap.memory_lock: false
EOF
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
systemctl daemon-reload
systemctl enable -q elasticsearch
systemctl restart -q elasticsearch
@@ -53,8 +55,8 @@ msg_ok "Setup Elasticsearch"
msg_info "Installing Zammad"
setup_deb822_repo \
"zammad" \
"https://dl.packager.io/srv/zammad/zammad/key" \
"https://dl.packager.io/srv/deb/zammad/zammad/stable/debian" \
"https://go.packager.io/srv/deb/zammad/zammad/gpg-key.asc" \
"https://go.packager.io/srv/deb/zammad/zammad/stable/debian" \
"$(get_os_info version_id)" \
"main"
$STD apt install -y zammad

View File

@@ -33,7 +33,9 @@ APP_TYPE="addon"
INSTALL_PATH="/opt/immich-proxy"
CONFIG_PATH="/opt/immich-proxy/app"
SERVICE_PATH="/etc/systemd/system/immich-proxy.service"
UPLOAD_SERVICE_PATH="/etc/systemd/system/immich-proxy-upload.service"
DEFAULT_PORT=3000
UPLOAD_PORT=3001
# Initialize all core functions (colors, formatting, icons, $STD mode)
load_functions
@@ -44,8 +46,8 @@ require_debian_like
# ==============================================================================
function uninstall() {
msg_info "Uninstalling ${APP}"
systemctl disable --now immich-proxy.service &>/dev/null || true
rm -f "$SERVICE_PATH"
systemctl disable --now immich-proxy.service immich-proxy-upload.service &>/dev/null || true
rm -f "$SERVICE_PATH" "$UPLOAD_SERVICE_PATH"
rm -rf "$INSTALL_PATH"
rm -f "/usr/local/bin/update_immich-public-proxy"
rm -f "$HOME/.immichpublicproxy"
@@ -58,32 +60,33 @@ function uninstall() {
function update() {
if check_for_gh_release "Immich Public Proxy" "alangrainger/immich-public-proxy"; then
msg_info "Stopping service"
systemctl stop immich-proxy.service &>/dev/null || true
systemctl stop immich-proxy.service immich-proxy-upload.service &>/dev/null || true
msg_ok "Stopped service"
BACKUP_DIR="/opt/immich-public-proxy_backup"
create_backup "$CONFIG_PATH"/.env "$CONFIG_PATH"/config.json
if [[ -f "$UPLOAD_SERVICE_PATH" ]]; then
create_backup "$INSTALL_PATH"/upload-app/config.json
fi
NODE_VERSION="24" setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "Immich Public Proxy" "alangrainger/immich-public-proxy" "tarball" "latest" "$INSTALL_PATH"
restore_backup
msg_info "Installing dependencies"
cd "$CONFIG_PATH"
$STD npm ci
msg_ok "Installed dependencies"
msg_info "Building ${APP}"
$STD npm run build
msg_ok "Built ${APP}"
build_app
msg_info "Updating service"
create_service
if [[ -f "$UPLOAD_SERVICE_PATH" ]]; then
create_upload_service
fi
msg_ok "Updated service"
msg_info "Starting service"
systemctl start immich-proxy
if [[ -f "$UPLOAD_SERVICE_PATH" ]]; then
systemctl start immich-proxy-upload
fi
msg_ok "Started service"
msg_ok "Updated successfully"
exit
@@ -111,6 +114,55 @@ EOF
systemctl daemon-reload
}
# The workspace root builds shared, app and upload-app together
function build_app() {
msg_info "Installing dependencies"
cd "$INSTALL_PATH"
$STD npm ci
msg_ok "Installed dependencies"
msg_info "Building ${APP}"
$STD npm run build
msg_ok "Built ${APP}"
}
# env sets the port after EnvironmentFile, so an IPP_PORT in .env cannot clash with IPP
function create_upload_service() {
cat <<EOF >"$UPLOAD_SERVICE_PATH"
[Unit]
Description=Immich Public Proxy visitor uploads
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=${INSTALL_PATH}/upload-app
EnvironmentFile=${CONFIG_PATH}/.env
ExecStart=/usr/bin/env IPP_PORT=${UPLOAD_PORT} /usr/bin/node ${INSTALL_PATH}/upload-app/dist/index.js
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
}
function enable_uploads() {
if [[ ! -d "$INSTALL_PATH"/upload-app ]]; then
msg_error "Visitor uploads need ${APP} 4.0 or newer. Update first."
exit 1
fi
if [[ ! -f "$INSTALL_PATH"/upload-app/dist/index.js ]]; then
build_app
fi
msg_info "Enabling visitor uploads"
create_upload_service
systemctl enable -q --now immich-proxy-upload
msg_ok "Enabled visitor uploads on port ${UPLOAD_PORT}"
msg_warn "Route /upload/* on your reverse proxy to http://${LOCAL_IP}:${UPLOAD_PORT} and turn on 'Allow public user to upload' for the share in Immich"
}
# ==============================================================================
# INSTALL
# ==============================================================================
@@ -120,15 +172,7 @@ function install() {
# Force fresh download by removing version cache
rm -f "$HOME/.immichpublicproxy"
fetch_and_deploy_gh_release "Immich Public Proxy" "alangrainger/immich-public-proxy" "tarball" "latest" "$INSTALL_PATH"
msg_info "Installing dependencies"
cd "$CONFIG_PATH"
$STD npm ci
msg_ok "Installed dependencies"
msg_info "Building ${APP}"
$STD npm run build
msg_ok "Built ${APP}"
build_app
MAX_ATTEMPTS=3
attempt=0
@@ -176,6 +220,12 @@ EOF
systemctl enable -q --now immich-proxy
msg_ok "Created and started service"
prompt="${var_ipp_uploads:-}"
[[ -n "$prompt" ]] || read -r -p "${TAB3}Enable visitor uploads (second service on port ${UPLOAD_PORT})? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes|true)$ ]]; then
enable_uploads
fi
# Create update script (simple wrapper that calls this addon with type=update)
msg_info "Creating update script"
cat <<'UPDATEEOF' >/usr/local/bin/update_immich-public-proxy
@@ -230,6 +280,15 @@ if [[ -d "$INSTALL_PATH" && -f "$SERVICE_PATH" ]]; then
exit 0
fi
if [[ ! -f "$UPLOAD_SERVICE_PATH" ]]; then
echo -n "${TAB}Enable visitor uploads (second service on port ${UPLOAD_PORT})? (y/N): "
read -r upload_prompt
if [[ "${upload_prompt,,}" =~ ^(y|yes)$ ]]; then
enable_uploads
exit 0
fi
fi
msg_warn "No action selected. Exiting."
exit 0
fi