The update was failing with 'mv: cannot stat /opt/2fauth-backup/.env:
No such file or directory' on a system where a previous run had left
/opt/2fauth-backup behind. mv would then nest /opt/2fauth inside the
existing backup directory (as /opt/2fauth-backup/2fauth/), so the
restore step looked at the wrong path.
After fixing that, the app returned a 500 ('Key path
file:///opt/2fauth/storage/oauth-public.key does not exist or is not
readable') because chown/chmod ran before composer install and
php artisan 2fauth:install, leaving vendor/, bootstrap/cache/* and
the regenerated oauth keys owned by root and unreadable by www-data.
- Remove any stale /opt/2fauth-backup before creating the backup, and
remove it again at the end so the next run starts clean
- Use cp instead of mv when restoring .env/storage so the backup is
preserved until the update completes
- Move chown/chmod to AFTER composer + artisan, matching the order in
install/2fauth-install.sh
- Restart php8.4-fpm in addition to nginx so opcache picks up the new
cached config
- Drop redundant quotes around literal paths to match the rest of the
codebase
Stop vmagent and vmalert services (if present) before deploying the
vmutils tarball during updates, and restart them afterward. Running
vmutils daemons (vmagent-prod, vmalert-prod) cause cp to fail with
ETXTBSY when their binaries are overwritten in /opt/victoriametrics.
Fixes#14014
* feat(nodejs): auto-size NODE_OPTIONS heap and apply in Termix updates
- setup_nodejs now sets NODE_OPTIONS only when not already set
- Heap size is auto-derived from NODE_MAX_OLD_SPACE_SIZE, var_ram, or MemTotal
- Auto heap is clamped to 1024..4096 MB to avoid too-small or too-large defaults
- Termix update path now calls setup_nodejs before frontend/backend builds so
Node heap defaults are applied consistently during updates
* feat(error-handler): add actionable Node.js heap OOM guidance
Detect probable Node.js heap out-of-memory failures from log patterns and
common build exit codes, then print targeted remediation hints instead of
only a generic SIGABRT/SIGKILL message.
- Detect OOM patterns in last log lines (Reached heap limit, JS heap OOM)
- Treat node build contexts with exit 134/137/243 as likely heap issues
- Suggest computed --max-old-space-size based on NODE_OPTIONS, var_ram,
or MemTotal (clamped to 1024..4096 MB)
- Recommend calling setup_nodejs before build steps so defaults apply
* refactor(node-heap): raise auto cap to 12GB and simplify OOM hint
- Increase setup_nodejs auto heap clamp from 4GB to 12GB for heavy frontend builds
- Keep lower bound at 1GB and preserve user override precedence
- Simplify error_handler Node OOM output to a single concise hint
- Align error_handler heap suggestion clamp to 12GB
* fix(lxc-stack): use dist-upgrade and improve recovery prompt
When the host LXC stack is too old for a template, upgrading only
pve-container/lxc-pve can leave the Proxmox stack in an inconsistent state.
Use a full dist-upgrade instead.
Also refine the recovery prompt:
- [1] Upgrade LXC stack now
- [2] Older template fallback only when actually available
- [3] Ignore
- [4] Cancel
Do not auto-fallback to an older template after ignore/failure; honor the
user's explicit choice and stop with a clear error instead.
* chore(lxc-stack-prompt): clarify host dist-upgrade action in option 1
* Update build.func
* fix(lxc-stack): use host upgrade instead of dist-upgrade in recovery flow
* Enhance upgrade prompt with warning message
Added a warning message to inform users about the implications of running the host upgrade.
---------
Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
* fix(mealie): restore start.sh before build steps to prevent broken container
When CLEAN_INSTALL=1 wipes /opt/mealie/* and a subsequent build step fails
(uv sync, yarn install, yarn generate - e.g. due to OOM or network error),
start.sh was never written because it was created at the very end of the
update function. On the next reboot systemd could not find the ExecStart
binary and the container was left in a permanently broken state.
Fix: move mealie.env restore and start.sh creation to immediately after
fetch_and_deploy_gh_release, before any build steps that can fail. This
ensures the service entry point is always present even if the build is
interrupted, allowing uv to self-heal on next startup.
Fixes: #13945
* fix(mealie): backup and restore start.sh alongside mealie.env
Instead of recreating start.sh from a heredoc after CLEAN_INSTALL wipes
/opt/mealie/*, simply back it up before the wipe and restore it together
with mealie.env. Simpler and avoids any drift between the hardcoded
heredoc and what was actually installed.
* fix(mealie): fallback heredoc if start.sh missing before backup
* fix(twingate-connector): perform real apt upgrade during update flow
The update path used ensure_dependencies, which only installs missing
packages and does not upgrade already installed ones. As a result, users
could see 'Updated successfully' even when a newer twingate-connector
version was available.
Switch update_script to a real package update flow:
- ensure apt is healthy
- refresh apt metadata
- install/upgrade twingate-connector via retry helper
- restart service
This aligns behavior with Twingate's documented upgrade process.
* Update twingate-connector.sh
In setup_nodejs() Scenario 1 (major version already matches), only npm
was refreshed - apt never upgraded the nodejs package itself. This left
existing LXCs stuck on older minor releases (e.g. 22.13.1) even though
NodeSource ships newer ones (e.g. 22.19+).
Fix: add pt-get install -y --only-upgrade nodejs before the npm pin
so the latest minor/patch from the already-configured NodeSource repo is
always installed.
Fixes: seerr update failing with ERR_PNPM_UNSUPPORTED_ENGINE because
seerr 3.2.0 requires Node >=22.19.0 but installed was v22.13.1 (#13955)
When PHS_SILENT and PHS_VERBOSE are both set, stop falling back to interactive mode. Changes prefer silent mode to keep automation safe and avoid blocking unattended/non-TTY updates. Only show a whiptail warning when both stdin/stdout are TTYs and whiptail is present, and ignore any whiptail errors. Added a brief comment and adjusted the fallback message accordingly.