92 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
8854585a1a Migrate the (remaining) Top 25 scripts to the new core engine (#16749)
* Move the top 25 scripts onto the core engine

The engine work of the last few days reaches 30 of 561 ct scripts, about 5% of
ProxmoxVE traffic: retry on engine downloads, exit 227 instead of a misfiled
dpkg error, the umask fix that stops a hardened host producing containers apt
cannot resolve in, the TMPDIR guard, the toolchain restore. All of it has been
sitting where almost nobody runs it.

All eighteen at once rather than in waves. A slow rollout does not exercise the
paths only some scripts take, and broad exposure is what surfaces bugs -- a
deliberate call about release risk.

Checked before touching anything, because "migrate" meant far more than a line
swap last time:

  - None of the eighteen has an alpine-* variant, so there is no merge to do.
  - No script references misc/ outside its bootstrap line.
  - Of the 61 functions that exist only in misc/, none is called by any of them.

So it is one line per script, and every head is now byte-identical to the ones
migrated earlier. With these, ProxmoxVE goes from 30 scripts on the core engine
to 48 -- and from roughly 5% of traffic to the majority, since these are the
ones people actually install.

Two to watch: immich sits at 44.7% success and vaultwarden at 42.1% before
this. If their numbers move, the engine is one of two changed variables rather
than the only one.

* Move update-apps onto the core engine

Entry 11 of the list and the only one that is not a ct script, so it was left
out of the previous commit. It is a host tool: it never used build.func at all,
it sources misc/core.func and misc/api.func directly.

The swap is therefore two lines rather than one, and worth checking rather than
assuming. It uses exactly five engine functions -- header_info,
init_tool_telemetry, msg_info, msg_ok, msg_error -- all present in the core, and
both files load standalone, which they had not had to do before: everywhere else
they arrive through build.func.

That completes the list. All 25 now run on the core engine.

Fixing this one matters beyond the migration: update-apps is what drives
unattended updates across every container on a host, and it is the path where
PHS_SILENT was being ignored (#16593). It now gets the engine that honours it.
2026-08-25 11:04:15 +02:00
Sam Heinz
b1523bc2e2 feat: update nginx proxy manager to trixie (#15457)
* Add host-migrate.sh Proxmox VE tool

Add tools/pve/host-migrate.sh — an interactive Proxmox VE host migration utility. The script (whiptail UI) can export host configuration, /etc tarball, SSH keys, APT state and LXC/QEMU guests (vzdump or config-only) into a timestamped bundle, with optional on-demand NFS mounting. It also supports importing bundles to restore guests and selective host components (storage, users, SSH, APT, hosts, network, hostname) with explicit warnings for dangerous operations (network/hostname). Implements preflight checks, manifest creation, storage mapping checks, cleanup trap for NFS, and integrates helper functions loaded from the project's core scripts.

* Improve storage prep & mounting in host-migrate

Add interactive storage preparation and safer mount handling for host-migrate.

- Track and clean up on-demand mounts via TEMP_MOUNTS and extend cleanup handler.
- Add helpers: _new_mountpoint, _offer_fstab, mount_existing_fs, format_and_mount, create_lv_and_mount to mount, format, or create LVs and optionally persist to /etc/fstab.
- Enhance browse_mounts to list unmounted block devices and LVM VGs, offer mount/format/LV creation, and return prepared mount via BROWSE_RESULT.
- Integrate prepared target into choose_location and do_export; show free-space warning before export.
- Improve vzdump output detection to pick the newest non-log file.
- Minor UX/message tweaks and quoting fixes for backup filenames when restoring storage.cfg and /etc/hosts.

These changes let users pick or prepare target storage (mount existing FS, format disks, create LVs) interactively and ensures temporary mounts are cleaned up.

* hardcode openresty version and build it from website release

* change libpcre3-dev to libpcre2-dev

* Delete tools/pve/host-migrate.sh

---------

Co-authored-by: MickLesk <mickey.leskowitz@gmail.com>
2026-06-29 22:44:21 +02:00
Sam Heinz
03963b5193 remove: promtail as EOL and other fixes (#15455)
* Add host-migrate.sh Proxmox VE tool

Add tools/pve/host-migrate.sh — an interactive Proxmox VE host migration utility. The script (whiptail UI) can export host configuration, /etc tarball, SSH keys, APT state and LXC/QEMU guests (vzdump or config-only) into a timestamped bundle, with optional on-demand NFS mounting. It also supports importing bundles to restore guests and selective host components (storage, users, SSH, APT, hosts, network, hostname) with explicit warnings for dangerous operations (network/hostname). Implements preflight checks, manifest creation, storage mapping checks, cleanup trap for NFS, and integrates helper functions loaded from the project's core scripts.

* Improve storage prep & mounting in host-migrate

Add interactive storage preparation and safer mount handling for host-migrate.

- Track and clean up on-demand mounts via TEMP_MOUNTS and extend cleanup handler.
- Add helpers: _new_mountpoint, _offer_fstab, mount_existing_fs, format_and_mount, create_lv_and_mount to mount, format, or create LVs and optionally persist to /etc/fstab.
- Enhance browse_mounts to list unmounted block devices and LVM VGs, offer mount/format/LV creation, and return prepared mount via BROWSE_RESULT.
- Integrate prepared target into choose_location and do_export; show free-space warning before export.
- Improve vzdump output detection to pick the newest non-log file.
- Minor UX/message tweaks and quoting fixes for backup filenames when restoring storage.cfg and /etc/hosts.

These changes let users pick or prepare target storage (mount existing FS, format disks, create LVs) interactively and ensures temporary mounts are cleaned up.

* fixes for npm, loki, omada, wishlist

Remove promtail from loki/alpine-loki
Replace node execstart in npm during update
add user agent to omada download
use pnpm 11 for wishlist

* remove Host migrate

---------

Co-authored-by: MickLesk <mickey.leskowitz@gmail.com>
Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
2026-06-28 23:02:08 +02:00
galz55
c1a6dc29ee Fix-15015: check correct path for certbot (#15034)
Co-authored-by: galz55 <damianbc-github@gmail.com>
2026-06-22 21:11:14 +02:00
Sam Heinz
df187136ef [arm64] Port scripts between mediamtx-nocodb to support arm64 (#15254) 2026-06-21 20:42:17 +02:00
CanbiZ (MickLesk)
7789f1c58c fix(nginxproxymanager): repair broken certbot pip before update (#15224)
Use ensurepip when the certbot venv pip module is missing, then upgrade via python -m pip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-20 13:23:25 +10:00
Slaviša Arežina
f1bc4f1922 [misc]: Fix aligment of status messages (#14900) 2026-06-03 11:03:13 +02:00
CanbiZ (MickLesk)
5b6f8e2674 NginxProxymanager: set Certbot version in npm.service environment variable (2.15.0) (#14843) 2026-06-01 10:22:10 +02:00
Sam Heinz
69aa93a83a workflows: update workflows, templates to support arm64. (#14653)
* set 'var_arm64' to no in all ct scripts

* update files in .github to support arm64
2026-05-23 07:46:44 +10:00
CanbiZ (MickLesk)
07abb105d0 Nginxproxymanager: restore NPM nginx.conf after OpenResty rebuid (#14421)
When OpenResty is rebuilt via 'make install', it overwrites
/usr/local/openresty/nginx/conf/nginx.conf with the stock OpenResty
default config, dropping all NPM-specific include directives. This
causes port 81 to stop listening and conf.d configs to be ignored.

After the build, restore the NPM nginx.conf from the deployed source,
re-apply daemon/include-path patches, then apply user/pid fixes.
2026-05-11 22:04:04 +02:00
Luca Comellini
7b7aecef02 Purge openresty (#14353) 2026-05-09 08:53:43 +02:00
CanbiZ (MickLesk)
70a9d99ecd Nginx Proxy Manager: ensure /tmp/nginx/body exists via openresty service ExecStartPre (#13528) 2026-04-05 21:28:34 +02:00
CanbiZ (MickLesk)
44ddf4cfa7 Nginx Proxy Manager: fix openresty restart by setting user root before reload (#13500) 2026-04-03 21:14:10 +02:00
CanbiZ (MickLesk)
c6bbba090d fix(nginxproxymanager): unmask openresty after migration from package (#13399) 2026-03-29 22:15:50 +02:00
CanbiZ (MickLesk)
2eb259bd99 rm 12 check 2026-03-27 16:32:20 +01:00
MickLesk
15b5542ad6 fix(nginxproxymanager): reset PWD before certbot update to avoid deleted cwd
After building OpenResty, the script does cd /opt/openresty followed by
rm -rf /opt/openresty, leaving $PWD pointing to a deleted directory.
When pip runs in the certbot block, the subprocess inherits the invalid
PWD and fails with OSError: No such file or directory.

Add cd /root before the certbot block to reset to a valid directory.

Closes #13240
2026-03-23 21:53:35 +01:00
CanbiZ (MickLesk)
5c795395ca Refactor: nginxproxymanager update and OpenResty flow (#13216) 2026-03-23 20:44:04 +01:00
CanbiZ (MickLesk)
f1f7bd17b0 add deb13 test 2026-03-23 11:39:53 +01:00
CanbiZ (MickLesk)
3b8550e314 NginxProxyManager: build OpenResty from source via GitHub releases (#13134)
* fix(nginxproxymanager): build OpenResty from source via GitHub releases

Replace the unreliable openresty.org apt repository with building
OpenResty from source. Uses fetch_and_deploy_gh_release to download
from github.com/openresty/openresty/releases, then compiles locally.

The apt mirror frequently has sync issues (mismatched file sizes/hashes)
causing 'apt update' to fail with exit code 100.

Changes:
- Use fetch_and_deploy_gh_release for OpenResty source download
- Compile with configure/make/make install
- Add build dependencies (libpcre3-dev, libssl-dev, zlib1g-dev)
- Create systemd service unit for source-built OpenResty
- Update script: remove old apt repo, migrate to source build

* Fix installation command syntax for dependencies

* bump from ved testing
2026-03-23 09:41:10 +01:00
CanbiZ (MickLesk)
dbdd891a99 several scripts: add additional github link in source (#12282)
* fix(error-handler): prevent silent() from re-enabling error handling during recovery

Root cause: silent() (core.func) unconditionally calls set -Eeuo pipefail
and trap 'error_handler' ERR after every command. When build_container()
intentionally disables error handling for its recovery section, any
intermediate call through silent()/ re-enables it. This causes the
grep/sed pipeline for missing_cmd extraction to trigger error_handler
(grep returns exit code 1 on no match + pipefail = fatal).

Fixes:
1. silent(): Save errexit state before disabling, only restore if it was
   active. Callers that intentionally disabled error handling (e.g.
   build_container recovery) are no longer silently re-enabled.

2. build.func: Add || true to missing_cmd grep pipeline as defense-in-depth
   against pipeline failure propagation.

3. build.func: Add explicit set +Eeuo pipefail / trap - ERR after
   post_update_to_api() call, before error classification grep/sed section.

4. build.func: Remove stale global combined_log variable from variables()
   that used a different path format (/tmp/install-SESSION-combined.log)
   than the actual local variable (/tmp/NSAPP-CTID-SESSION.log). The global
   was never written to and caused confusion when error_handler displayed it.

* Update build.func

* chore(install): add Github source links to all setup_nodejs scripts

52 install scripts had a project website in '# Source:' but no GitHub
link. Merged the GitHub repo URL into the Source header as:
  # Source: https://website.com/ | Github: https://github.com/OWNER/REPO

Repos sourced from fetch_and_deploy_gh_release calls, get_latest_github_release
calls, or known project repos for npm/pip installed apps.

Two scripts (fumadocs, pve-scripts-local) had no Source line at all —
added one. Shinobi skipped (GitLab-only, no GitHub repo).

* chore(install): add Github source links to all fetch_and_deploy scripts

77 additional install scripts had fetch_and_deploy_gh_release calls but
no GitHub link in the Source header. Merged the primary app repo into
the Source header as:
  # Source: https://website.com/ | Github: https://github.com/OWNER/REPO

Where multiple fetch_and_deploy calls existed (app + dependency), the
primary app repo was selected:
- ersatztv: ErsatzTV/ErsatzTV (not ffmpeg)
- firefly: firefly-iii/firefly-iii (not data-importer)
- komga: gotson/komga (not kepubify dep)
- sabnzbd: sabnzbd/sabnzbd (not par2cmdline-turbo dep)
- signoz: SigNoz/signoz (not otel-collector)
- tunarr: chrisbenincasa/tunarr (not ffmpeg dep)

Also fixed cosmos-install.sh double https:// in Source URL.

Skipped: autocaliweb (source already on codeberg, GitHub repos are deps only)

* revert: restore misc/build.func and misc/core.func to main state

These error-handler fixes belong to fix/error-handler-recovery, not to
this sources-only branch.

* chore(ct,tools): sync Source headers with install/ and add Github links to addon scripts
2026-02-24 15:11:53 +01:00
CanbiZ (MickLesk)
f07c221ca4 NginxProxymanager: use better-sqlite3 (#11708)
* fix(nginxproxymanager): update for better-sqlite3 and setup wizard

NPM switched to better-sqlite3 as the knex database client.
The old sqlite3 client causes 'Internal Error' on user creation.

- Update production.json in install/update to use better-sqlite3
- Add sed patch in update script to fix existing production.json
- Add useNullAsDefault: true to match upstream knex config
- Remove default credentials from JSON (NPM now uses setup wizard)
- Add note about setup wizard for first-time users

Ref: NginxProxyManager/nginx-proxy-manager@0b2fa82
Closes #11681

* Update nginxproxymanager.json

* Remove disabled script error messages

Removed error messages related to OpenResty APT repository issues.
2026-02-09 10:33:44 +01:00
CanbiZ (MickLesk)
48d743910a Downgrade: OpenProject | NginxProxyManager | Semaphore to Debian 12 due to persistent SHA1 issues (#11654)
* Downgrade OpenProject and NginxProxyManager to Debian 12 due to SHA1 signature issues

* Downgrade Semaphore to Debian 12 due to SHA1 signature issues in Ansible PPA
2026-02-07 19:41:37 +01:00
CanbiZ (MickLesk)
be42ee40fb Disable NPM install and update due to OpenResty SHA-1 signature issue (#11406) (#11471) 2026-02-02 13:11:34 +01:00
durzo
97bd4833fd nginxproxymanager: allow updates now the build is fixed (#10796)
* nginxproxymanager: allow updates now the build is fixed

* fix func

* Change release version to 'latest' for deployment

* Update release version fetching for nginxproxymanager

* Update fetch_and_deploy_gh_release to use latest version

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2026-01-14 10:00:32 +01:00
Tobias
08d67aa722 chore: fix update msg (#10593) 2026-01-06 22:57:40 +01:00
Tobias
0e8341cb86 fix: shellcheck changes (#10591) 2026-01-06 13:45:03 +01:00
Tobias
c1fe8b91b4 chore: bump copyright to 2026 - happy new year (#10585)
* chore: bump copyright to 2026 - happy new year

* fix

* meilisearch fix source url

* livebook: fix space

* fix source cmd

* fix source cmd
2026-01-06 13:28:12 +01:00
durzo
9582910787 Fix build for 2.13.5 (#10340) 2025-12-27 10:17:30 +01:00
Slaviša Arežina
e5db2c6eb9 Nginx Proxy Manager: Pin version to v2.13.4 (#9259)
* Update Nginx Proxy Manager release version

* Update nginxproxymanager.sh

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-11-19 09:36:20 +01:00
CanbiZ
ae8c3002ab add clean_install for npm 2025-11-18 14:23:03 +01:00
CanbiZ
150f0ee456 npm: add Debian version check to update script (#8901) 2025-11-06 11:47:25 +01:00
Tobias
4c374e50dc fix: npm: refactor for v2.13.x (#8870) 2025-11-05 14:41:52 +01:00
CanbiZ
d427619745 Remove BOM from shebang lines in ct scripts (#8833) 2025-11-03 08:49:54 +01:00
CanbiZ
be7d0704d7 Standardize update success messages in scripts (#8757) 2025-10-30 17:24:16 +01:00
CanbiZ
c92f9d5518 Check and remove Node.js if version is not 22
Remove existing Node.js installation if version is not 22.
2025-10-22 17:18:35 +02:00
CanbiZ
b34a449d9f Refactor Yarn installation into setup_nodejs
Removed Yarn installation check and integrated it into the setup_nodejs function.
2025-10-20 07:51:33 +02:00
CanbiZ
b36b4258cc Refactor: Nginx Proxy Manager (#8453) 2025-10-18 13:33:00 +02:00
CanbiZ
341f87045c Bump L to N-Scripts to Debian 13 (Trixie) (#8368)
* Bump L to N-Scripts to Debian 13 (Trixie)

* refactor

* Add apt clean command to cleanup process

* Add apt clean command to cleanup process

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-10-15 22:29:48 +02:00
Jehu Marcos Herrera Puentes
003fc3c080 fix(nginxproxymanager.sh): Set the version number before build. (#6139)
Signed-off-by: JMarcosHP <jehuherrerap@hotmail.com>
2025-07-22 10:37:54 +02:00
Kimmo Saari
c90f800a69 chore: reorganize nginxproxymanager update script (#5971) 2025-07-16 08:53:35 +02:00
tug-benson
561a2f2712 add --break-system-packages certbot-dns-cloudflare to the nginxproxymanager.sh script (#5957) 2025-07-14 16:40:41 +02:00
CanbiZ
30e8cbf5b4 [core] remove unneeded vars from shellcheck (#3899)
* remove unneeded wars

* Update alpine-wireguard-install.sh

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-04-15 15:20:46 +02:00
CanbiZ
2e4c51450f change var in ct files to new standard (#3804) 2025-04-10 11:56:52 +02:00
CanbiZ
13c82fe12b fix npm 2025-04-01 14:46:15 +02:00
CanbiZ
8c051b8186 Replace wget with curl -fsSL, normalize downloads, and prep for IPv6 (#3455)
* Initial Call, Switch from curl -s to curl -fsSL and wget to curl -fssL

* more switches

* switch vms

* more curls

* More curls

* more

* more

* more changes

* more

* prepare ipv6 calls

* change frontend to ipv6

* Formatting

* Fromatting

* Update gomft.sh

* Update gomft-install.sh

* Update ersatztv.sh

* Update build.func

---------

Co-authored-by: Slaviša Arežina <58952836+tremor021@users.noreply.github.com>
2025-04-01 10:25:46 +02:00
CanbiZ
ba00f1d302 Nginx: Fix $STD for tar (#2813) 2025-03-04 11:42:07 +01:00
CanbiZ
ece3ad2b13 Feature: Use Verbose Mode for all Scripts (removed &>/dev/null) (#2596)
* Feature: Use Verbose Mode for all Scripts (removed &>/dev/null)

* Update crafty-controller.sh
2025-02-24 12:49:16 +01:00
CanbiZ
af01193bc2 [core] cleanup (remove # App Default Values) (#2356) 2025-02-13 17:59:47 +01:00
CanbiZ
6f131933b7 [core] cleanup (remove base_settings & unneeded comments) (#2351) 2025-02-13 14:40:49 +01:00
CanbiZ
15f04d525d Happy new Year! Update Copyright to 2025 (#1150) 2025-01-01 13:37:29 +01:00