Commit Graph

1360 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
d6811a3383 Fix ip import (#10964)
* Rename import_local_ip to get_local_ip

Replaces all references to the helper function import_local_ip with get_local_ip across scripts and documentation for consistency. Updates usage examples and comments to reflect the new function name.

* Rename get_local_ip to get_lxc_ip and update usage

Replaces all references to get_local_ip with get_lxc_ip across scripts, documentation, and templates for clarity and consistency. Updates the implementation in core.func to improve IP detection for LXC containers, and adjusts helper functions in addon scripts accordingly.
2026-01-19 17:32:44 +01:00
Slaviša Arežina
db5a6bacf4 [core]: Make LXC IP a global variable (#10951) 2026-01-19 15:43:12 +01:00
CanbiZ (MickLesk)
6e66359d8f Improve password handling and validation logic (#10925) 2026-01-18 21:19:53 +01:00
CanbiZ (MickLesk)
25a6a7ecc7 fix(hwaccel): improve NVIDIA version matching and GPU selection UI (#10901) 2026-01-18 12:43:58 +01:00
CanbiZ
1980e3c47f Usenoninteractive mode for NVIDIA setup
Replaces all apt commands with apt-get for consistency and adds noninteractive environment variables to prevent interactive dialogs during NVIDIA GPU driver installation. Also adds --force-confold to preserve existing config files and ensures smoother automated installs.
2026-01-14 15:51:00 +01:00
CanbiZ (MickLesk)
ce5ab97737 Improve NVIDIA GPU setup (5000x Series) (#10807) 2026-01-14 14:39:53 +01:00
CanbiZ
56e0783385 Show container ID warning only for user-specified IDs
The warning about a container ID being in use is now only shown if the user manually specified an ID, not when the ID is auto-assigned. This reduces unnecessary warnings during automated container creation.
2026-01-12 18:52:08 +01:00
CanbiZ
305a2ef449 Validate storage space only if container storage set
Storage space validation now occurs only when CONTAINER_STORAGE is defined, preventing premature validation before storage selection in certain modes. This avoids unnecessary errors and aligns validation with actual container creation logic.
2026-01-12 18:44:46 +01:00
CanbiZ
7f6ebeb119 Update build.func 2026-01-12 18:41:19 +01:00
CanbiZ (MickLesk)
ff76d83fa7 feat(storage): Add unified storage validation & fix GB/MB display (#10745) 2026-01-12 18:12:55 +01:00
CanbiZ (MickLesk)
c8f6786783 core: remove dupliocated pve_version in advanced installs (#10743) 2026-01-12 18:11:25 +01:00
CanbiZ (MickLesk)
1ccf90cb27 core: validate container ID before pct create to prevent failures (#10729)
* feat: validate container ID before pct create to prevent failures

Add validation to ensure container IDs are not already in use before attempting to create containers. This prevents pct create failures when an ID is already assigned to a VM/LXC or used in LVM volumes.

Changes:
- Add validate_container_id() and get_valid_container_id() functions to build.func
- Validate ID in base_settings() for default installation method
- Validate ID in advanced_settings() dialog with user prompt for next available ID
- Add validation to turnkey.sh with interactive dialog
- Add validation to all-templates.sh with automatic ID correction

Checks performed:
- Container config file existence (/etc/pve/lxc/*.conf)
- VM config file existence (/etc/pve/qemu-server/*.conf)
- LVM logical volume usage

Fixes issue where container creation would fail if the suggested/chosen ID was already in use.

* feat: validate container ID before pct create to prevent failures

Add validation to ensure container IDs are not already in use before attempting to create containers. This prevents pct create failures when an ID is already assigned to a VM/LXC or used in LVM volumes.

Changes:
- Add validate_container_id() and get_valid_container_id() functions to build.func
- Validate ID in base_settings() for default installation method
- Validate ID in advanced_settings() dialog with user prompt for next available ID
- Add validation to turnkey.sh with interactive dialog
- Add validation to all-templates.sh with automatic ID correction

Checks performed:
- Container config file existence (/etc/pve/lxc/*.conf)
- VM config file existence (/etc/pve/qemu-server/*.conf)
- LVM logical volume usage

Fixes issue where container creation would fail if the suggested/chosen ID was already in use.

* Update turnkey.sh

* Update build.func
2026-01-12 14:04:28 +01:00
CanbiZ (MickLesk)
76e7755956 Enforce non-interactive apt mode in DB setup scripts (#10714) 2026-01-12 08:48:36 +01:00
CanbiZ (MickLesk)
3e0d0f34cc fix(hwaccel): make beignet-opencl-icd optional for legacy Intel GPUs (#10677)
- Check if beignet-opencl-icd package is available before installation
- Package was removed in Debian 12+ and Ubuntu 22.04+
- VA-API hardware acceleration still works without OpenCL
- Prevents installation failure on systems with Intel HD 2000-5999 GPUs
2026-01-10 11:41:44 +01:00
Tobias
d047d1aeb7 fix: setup_mariadb hangs on (#10672)
* fix: setup_mariadb hangs on

* readd: docs
2026-01-09 21:19:47 +01:00
CanbiZ (MickLesk)
ee3f9c0bae fix(hwaccel): Fix Intel GitHub package patterns and dependencies (#10611)
- libigdgmm12: Fetch from intel/compute-runtime (not gmmlib which has no releases)
- intel-igc-core-2: Correct pattern with -2 suffix
- intel-igc-opencl-2: Correct pattern with -2 suffix
- libze-intel-gpu1: Correct package name (was intel-level-zero-gpu)
- Remove libigdgmm12 from apt install (already fetched from GitHub)
- Only fetch GitHub packages for Trixie/Sid (Bookworm uses repos)

Verified all patterns against actual GitHub release assets.
2026-01-06 20:43:07 +01:00
MickLesk
02fd6f2993 fix(hwaccel): Fix critical bash arithmetic exit code issues
- Fix ((gpu_count++)) returning exit code 1 when count=0
- Fix ((failed_modules++)) same issue in setup_nodejs
- Add || true to all arithmetic increments starting from 0
- Export ENABLE_GPU from build.func to container
- Check ENABLE_GPU instead of var_gpu in setup_hwaccel

The bash arithmetic expansion ((0)) and ((x++)) when x=0
returns exit code 1, which causes immediate script abort
when set -e is active.
2026-01-06 20:32:15 +01:00
MickLesk
0d9e3c56e0 export gpu for hwaccel 2026-01-06 20:15:22 +01:00
CanbiZ (MickLesk)
392a6696ba feat(hwaccel): Complete rewrite of GPU hardware acceleration support (#10597) 2026-01-06 19:27:04 +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
CanbiZ (MickLesk)
a761c05fc5 Harden setup_hwaccel for old Intel GPUs (#10556) 2026-01-05 18:03:02 +01:00
Rémi Bédard-Couture
cd8991875b Export IPV6_METHOD to trigger verb_ip6() function (#10538) 2026-01-04 23:11:29 +01:00
Slaviša Arežina
254ea64c99 Preserve log files (#10509) 2026-01-03 16:17:53 +01:00
Copilot
ca5cd83c40 Fix MariaDB runtime directory persistence on container reboot (#10468)
Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-01-01 23:53:53 +01:00
CanbiZ (MickLesk)
78b4f44447 fix(pelican-panel): prevent composer superuser prompt (#10418) 2025-12-29 20:38:10 +01:00
CanbiZ
62ca1552a8 fix cleanup &>/dev/null 2025-12-29 16:10:33 +01:00
Casey Jones
5a43b901b5 add libmfx-gen1.2 for intel gpu hwaccel (#10400)
Co-authored-by: Casey Jones <jonescaseyb@gmail.com>
2025-12-29 09:35:35 +01:00
James Polley
8526a25541 Set default LANG in locale configuration (#9440) (#10378)
Ensures LANG is set to en_US.UTF-8 by default if not already defined before updating /etc/locale.gen.

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-12-28 09:04:05 +01:00
CanbiZ (MickLesk)
bbc326ec23 fix(hyperion): increase disk to 4GB and fix /root/. path error (#10349) 2025-12-26 19:57:49 +01:00
CanbiZ (MickLesk)
f1c6f573aa fix(build): correct local template discovery and simplify pattern logic (#10282) 2025-12-24 14:23:10 +01:00
CanbiZ (MickLesk)
889116c82d fix(hwaccel): skip setup without GPU passthrough and fix Ubuntu AMD firmware (#10225) 2025-12-22 23:27:37 +01:00
CanbiZ (MickLesk)
72f9ca70dc Fix AMD GPU firmware installation by adding non-free repositories (#10205) 2025-12-21 23:11:18 +01:00
CanbiZ (MickLesk)
ad18ca0ff7 [Core] Auto-cleanup after all update_script executions (#10141) 2025-12-19 22:44:03 +01:00
CanbiZ (MickLesk)
c1ef6d7c51 Improve error handling and cleanup in shell functions (#10116)
Refactored various shell functions to add more robust error handling by redirecting stderr to /dev/null and using '|| true' to prevent script failures. Enhanced npm cache cleanup to remove both _cacache and _logs directories, and improved reliability of version and keyring extraction commands. These changes increase script resilience and prevent unnecessary errors from halting execution.
2025-12-18 18:38:08 +01:00
CanbiZ
503fc0e6e2 npm clean dont forward to std 2025-12-18 15:01:39 +01:00
CanbiZ
0e8d053ba0 Simplify npm cache cleanup logic in cleanup_lxc
Replaced the if-statement for npm cache cleaning with a single command using '||' to fall back to manual cache removal if 'npm cache clean' fails. This streamlines the cleanup process.
2025-12-18 12:28:04 +01:00
CanbiZ
f0f0a63f6c Improve npm cache cleanup fallback logic
Adds a fallback to manually remove the npm cache directory if 'npm cache clean --force' fails during cleanup. This ensures the cache is cleared even if the npm command encounters an error.
2025-12-18 12:09:52 +01:00
CanbiZ (MickLesk)
21e0a8fced Fix cleanup issues in npm cache and rustup toolchain (#10107)
Issue 1 - BentoPDF (npm cache clean failure):
- npm cache clean --force can fail with ENOTEMPTY on corrupted caches
- Added npm cache verify before clean to detect/fix corruption
- Explicitly redirect stderr to suppress error noise

Issue 2 - Linkwarden (rustup toolchain removed too early):
- Script deleted ~/.rustup during build cleanup
- Later cleanup_lxc() tried to run 'cargo clean' without toolchain
- Now only remove cargo cache dirs, preserve ~/.rustup toolchain

Files changed:
- misc/core.func (cleanup_lxc function)
- install/linkwarden-install.sh (install script)
- ct/linkwarden.sh (update function)

Both changes improve reliability of container cleanup process.
2025-12-18 11:32:30 +01:00
CanbiZ (MickLesk)
3a9d03fdb7 use setup_hwaccel for robust hardware acceleration (#10054)
* fix(jellyfin): use setup_hwaccel for robust hardware acceleration

Replaces manual hardware acceleration setup with the centralized
setup_hwaccel function from tools.func.

This fixes the installation failure in privileged containers where
/dev/dri does not exist (e.g., when no GPU is passed through).

The setup_hwaccel function includes:
- Proper error handling for missing /dev/dri
- GPU vendor detection (Intel, AMD, NVIDIA)
- Graceful fallback when no GPU is available

Fixes: Installation fails with 'chgrp: cannot access /dev/dri'
when creating privileged containers without GPU passthrough.

* refactor(hwaccel): standardize hardware acceleration across all install scripts

Migrated all install scripts to use the centralized setup_hwaccel function:
- plex-install.sh
- emby-install.sh
- ersatztv-install.sh
- frigate-install.sh
- tdarr-install.sh
- unmanic-install.sh
- channels-install.sh
- ollama-install.sh
- immich-install.sh (added error handling)

Enhanced setup_hwaccel function in tools.func:
- Added -d /dev/dri check before setting permissions
- Added error handling (2>/dev/null || true) for all /dev/dri operations
- Added adduser error handling for video/render groups
- No longer fails if no GPU is detected (graceful skip)
- Added intel-media-va-driver for newer Intel GPUs
- Improved AMD APU support with firmware packages
- Better NVIDIA handling (warning instead of failure)

This fixes installation failures in privileged containers without GPU
passthrough, where /dev/dri does not exist.

Supports: Ubuntu, Debian 12 (Bookworm), Debian 13 (Trixie)
GPU Support: Intel, AMD, NVIDIA (manual driver)

* refactor(hwaccel): complete migration for all GPU apps

Migrated remaining GPU apps to setup_hwaccel:
- fileflows-install.sh
- openwebui-install.sh (added setup_hwaccel - was missing)
- tunarr-install.sh

Also fixed tools/pve/hw-acceleration.sh:
- Added error handling for /dev/dri operations
- Added chmod 660 /dev/dri/* that was missing
- Added error suppression for adduser commands

All 13 GPU apps (var_gpu=yes) now use centralized setup_hwaccel:
jellyfin, plex, emby, ersatztv, frigate, tdarr, unmanic,
channels, ollama, immich, fileflows, openwebui, tunarr

* feat(hwaccel): complete Intel non-free driver support and GID sync

Enhanced setup_hwaccel function:
- Auto-detect Intel GPU generation (Gen 9+ for non-free drivers)
- Debian 12 (Bookworm): Add non-free repo + intel-media-va-driver-non-free
- Debian 13 (Trixie): Add non-free repo + libvpl2 + mesa-opencl-icd
- Ubuntu: Use ubuntu repos with intel-media-va-driver
- Fallback to open drivers if non-free fails
- GID sync for video/render groups (moved from install scripts)

OpenWebUI: Added Intel oneAPI support when installing Ollama
- Intel Level Zero GPU support
- Intel oneAPI Base Toolkit
- Same setup as standalone Ollama install

Cleanup:
- Removed duplicate GID sync from tdarr-install.sh
- Removed duplicate GID sync from unmanic-install.sh

* fix(ersatztv): remove duplicate HW acceleration code

Removed manual Intel HW acceleration setup that remained after
setup_hwaccel migration. The non-free driver prompt is no longer
needed as setup_hwaccel auto-detects Intel GPU generation.
2025-12-17 14:37:31 +01:00
CanbiZ
60635feeab quickfix; trim timezone 2025-12-16 17:11:14 +01:00
CanbiZ (MickLesk)
44ea7cecb8 core: IP-Range-Scan Support (app.vars / default.vars) (#10038) 2025-12-16 16:52:37 +01:00
CanbiZ
e95ae11f88 feat(tools): add optional enabled parameter to setup_deb822_repo (#10017) 2025-12-16 11:50:28 +01:00
CanbiZ
7ab0327376 fix(build): map Etc/* timezones to 'host' for pct compatibility (#10020) 2025-12-16 11:28:12 +01:00
CanbiZ
8672aa075a remove old files and assets (#9991) 2025-12-15 17:37:26 +01:00
CanbiZ
6da27a7112 fix(tools): handle flat repositories in setup_deb822_repo (#9994) 2025-12-15 17:29:48 +01:00
CanbiZ
c2034039e8 fix(tools): prevent awk errors in setup_rust on restricted containers (#9985)
Add error suppression and || true to awk commands that parse rustc version.
Prevents 'Operation not permitted' errors in containers with restricted syscalls.
2025-12-15 15:22:32 +01:00
CanbiZ
3568cf52f9 fix(build): App Defaults force mode and prevent unbound variables (#9971)
- load_vars_file() now supports force parameter to override existing variables
- App Defaults uses force=yes to properly apply saved user preferences
- Added safety check for SSH_KEYS_FILE in install_ssh_keys_into_ct()
- Initialize ENABLE_GPU, ENABLE_NESTING, ENABLE_KEYCTL, ENABLE_MKNOD, PROTECT_CT, CT_TIMEZONE in base_settings()
- Added fallback defaults in echo_default() to prevent unbound variable errors when advanced_settings is skipped
2025-12-15 13:02:28 +01:00
CanbiZ
e651c14f76 fix(build): App Defaults now override script defaults with force mode 2025-12-15 09:46:49 +01:00
CanbiZ
35793051a1 core: load app defaults before applying base_settings / fix composer cleanup after install/update (#9965)
* fix(build): load app defaults before applying base_settings

App defaults were loaded after base_settings, causing saved values to be ignored.
Now loads var_* from app defaults file before calling base_settings.

* fix(cleanup): suppress composer root warning in cleanup_lxc

Composer's clear-cache command prompts for confirmation when run as root,
causing scripts to hang at 'Cleaning up' stage. Set COMPOSER_ALLOW_SUPERUSER=1
to suppress the interactive prompt.

Fixes #9952 (Heimdall Dashboard), also affects BentoPDF and other PHP apps.

* Fix COMPOSER_ALLOW_SUPERUSER export in cleanup_lxc

Exports COMPOSER_ALLOW_SUPERUSER before running composer clear-cache to ensure the environment variable is set correctly during cleanup.
2025-12-15 09:37:01 +01:00
CanbiZ
7fae5d71f5 fix(build): skip -features flag when empty (#9871)
Fixes '400 too many arguments' error when creating privileged containers without nesting/fuse features enabled.
2025-12-11 10:52:11 +01:00