Commit Graph

158 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
627587c54b feat(autocaliweb): migrate from GitHub to Codeberg (#11440)
- Add Codeberg API functions: codeberg_api_call, get_latest_codeberg_release, check_for_codeberg_release
- Add fetch_and_deploy_codeberg_release function for Codeberg releases
- Update autocaliweb install and update scripts to use Codeberg
- Update autocaliweb.json documentation and website URLs
2026-02-01 22:27:31 +01:00
Slaviša Arežina
7e4e0b8941 Update fetch_and_deply_from_url (#11410) 2026-02-01 13:19:11 +01:00
Slaviša Arežina
f09f723a33 Add fetch_and_deploy_from_url (#11376) 2026-01-30 22:25:55 +01:00
CanbiZ (MickLesk)
90eb33c09e refactor(php): remove redundant PHP_MODULE entries (#11362)
- Add dom and gmp to BASE_MODULES in setup_php()
- Remove modules already covered by BASE_MODULES (cli,common,bcmath,curl,dom,gd,gmp,intl,mbstring,readline,xml,zip)
- Remove modules already covered by EXTENDED_MODULES (mysql,sqlite3,pgsql,redis,imagick,bz2,apcu)
- Remove modules already covered by BUILTIN (ctype,exif,ffi,fileinfo,gettext,iconv,pdo,tokenizer)
- Affected: 31 install scripts, 12 ct scripts
2026-01-30 13:05:05 +01:00
CanbiZ (MickLesk)
710884c90b fix(php): improve module handling and prevent installation failures (#11358)
Changes to setup_php():
- Add version detection for PHP 8.5+ built-in opcache
- Define BUILTIN_MODULES list for modules included in php-common
  (ctype, fileinfo, iconv, tokenizer, phar, posix, etc.)
- Filter out built-in modules before attempting installation
- Verify each package exists via apt-cache before adding to install list
- Skip unavailable packages with informational message instead of error
- Add extended default modules (mysql, sqlite3, pgsql, redis, imagick,
  bz2, apcu) to cover ~90% of typical use cases
- Improve error handling with graceful degradation

This prevents installation failures when:
- PHP version has module built into core (e.g., opcache in 8.5+)
- Module is provided by php-common (ctype, fileinfo, etc.)
- Package is renamed or unavailable in specific PHP version

Fixes #11359
2026-01-30 10:29:51 +01:00
CanbiZ (MickLesk)
313faa02fe fix(meilisearch): fix dump creation and improve migration handling
Bug fixes:
- dumpUid is only available AFTER the dump task completes, not in the
  initial POST /dumps response. Fixed the extraction logic to wait for
  task completion first, then extract dumpUid from the task result.
- Removed non-existent API endpoint /dumps/{uid}/import - Meilisearch
  only supports dump import via CLI flag --import-dump

Improvements:
- If dump creation fails, backup the data directory before proceeding
  instead of just overwriting (allows manual recovery)
- Better error messages with actual API response content
- Proper health check loop during import with process monitoring
- Clear user guidance about what to do after failed migration

Fixes #11349
2026-01-30 10:29:08 +01:00
CanbiZ (MickLesk)
49aa898edd fix(meilisearch): add data migration for version upgrades (#11356)
Meilisearch requires a dump/restore process when upgrading between
incompatible versions (different major.minor). The previous update
logic simply replaced the binary, causing database corruption.

This fix:
- Detects version changes that require migration
- Creates a data dump before upgrading
- Removes old incompatible data after binary update
- Imports the dump to restore data in new format
- Falls back to --import-dump CLI flag for older API versions
- Adds proper error handling and timeouts

Fixes #11349
2026-01-30 10:20:57 +01:00
CanbiZ (MickLesk)
8e7dc349ac core: Add config file handling options | Fix Vikunja update with interactive overwrite (#11317) 2026-01-29 12:43:54 +01:00
CanbiZ (MickLesk)
fa00a51110 fix(tools): prevent systemd-tmpfiles failure in unprivileged LXC during .deb install (#11271)
Set SYSTEMD_OFFLINE=1 for apt/dpkg in binary mode to prevent systemd-tmpfiles
'unsafe path transition' errors in unprivileged containers (Debian 13+/systemd 257+).
2026-01-28 13:25:07 +01:00
CanbiZ (MickLesk)
03e660fdef fix(tools.func): add PHP-FPM systemd override for LXC containers 2026-01-28 11:39:48 +01:00
CanbiZ (MickLesk)
533ca924c9 tools.func: fix php "wait_for" hint (#11254) 2026-01-28 11:09:30 +01:00
CanbiZ (MickLesk)
ddd0164c54 tools.func: add new function - setup_meilisearch (#11258) 2026-01-28 11:08:52 +01:00
Milen Valchev
0e7e08579b feat: add NVIDIA driver install prompt for GPU-enabled containers (#11184) 2026-01-27 22:40:47 +01:00
CanbiZ (MickLesk)
61ea6d980a fix(nvidia): use versioned nvidia-utils package for Ubuntu fallback (#11139)
- nvidia-utils is a virtual package and requires version suffix (e.g. nvidia-utils-580)
- Use nvidia_major_version to install correct versioned packages
- Show helpful warning message instead of crashing on failure

Fixes installation failures on Ubuntu 24.04 with NVIDIA 580.x drivers
2026-01-24 23:23:10 +01:00
CanbiZ (MickLesk)
b2017086cd Bump various scripts to Debian 13 (Trixie) (#11093) 2026-01-23 21:54:23 +01:00
CanbiZ (MickLesk)
eb596d2364 core: add IPv6 fallback support to get_current_ip functions | add check for SSH_KEYS_FILE in user_defaults (#11067)
* fix(core): add IPv6 fallback support to get_current_ip functions

Fixes IP detection in IPv6-only environments by adding fallback:
- Try IPv4 first (existing behavior)
- Fall back to IPv6 via interface lookup (eth0 scope global)
- Fall back to IPv6 routing with Google/Cloudflare DNS targets

Closes #issue-ipv6-only-environment

* fix(build): use SSH_AUTHORIZED_KEY from user defaults when no SSH_KEYS_FILE exists

When using 'User Defaults' with var_ssh_authorized_key set in default.vars,
the SSH key was not being installed because install_ssh_keys_into_ct() only
checked for SSH_KEYS_FILE (which is only created in Advanced Settings).

Now the function also checks SSH_AUTHORIZED_KEY and creates a temporary
SSH_KEYS_FILE if needed.

Fixes #11062
2026-01-23 09:05:17 +01:00
CanbiZ (MickLesk)
d95a273753 feat(tools.func): use distro packages for MariaDB by default (#11049)
- Changed setup_mariadb() to use Debian/Ubuntu distribution packages by default
- Official MariaDB repository only used when specific version is requested
- Added cleanup logic for old/orphaned repository files with apt update
- Added version comparison to prevent downgrades (keeps higher version installed)
- Added automatic fallback to distro packages if repo installation fails
- Extracted _setup_mariadb_runtime_dir() helper function
- Updated all related documentation

This change improves reliability by avoiding MariaDB mirror issues
(HTTPS->HTTP redirects, geographic availability problems) for standard
installations while still allowing specific versions when needed.
2026-01-22 11:33:13 +01:00
CanbiZ (MickLesk)
5c9087a91a tools: add ubuntu PHP repository setup (#11034)
Switches to using the ondrej/php PPA for Ubuntu and retains the Sury repository for Debian when setting up PHP. This ensures compatibility with the respective distributions' recommended PHP sources.
2026-01-21 15:39:15 +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)
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 (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
CanbiZ (MickLesk)
a761c05fc5 Harden setup_hwaccel for old Intel GPUs (#10556) 2026-01-05 18:03:02 +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
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
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)
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)
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 (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
e95ae11f88 feat(tools): add optional enabled parameter to setup_deb822_repo (#10017) 2025-12-16 11:50:28 +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
Gabriel David Pragin
0bcffdc8b0 fix(tools): handle repos with 30+ pre-releases in check_for_gh_release (#9786) 2025-12-09 15:49:43 +01:00
CanbiZ
ba5bdd94ad fix(tools.func): handle empty grep results in stop_all_services (#9748) 2025-12-07 21:30:23 +01:00
CanbiZ
dd5993d7ab fix(tools.func): handle GitHub 300 Multiple Choices in tarball mode (#9697) 2025-12-05 23:09:20 +01:00
CanbiZ
e73f35e2c8 var. core fixes (bash to sh in fix_gpu_gids ...) (#9666)
* Switch container exec from bash to sh in fix_gpu_gids

Replaces bash with sh for container execution in fix_gpu_gids and updates device matching logic to use a POSIX-compliant case statement. This improves compatibility with containers that may not have bash installed.

* fix(apt): auto-recover from interrupted dpkg operations

When a previous installation is interrupted (e.g., by script error or
user cancellation), dpkg can be left in an inconsistent state requiring
'dpkg --configure -a' to fix.

This change:
- Adds dpkg --configure -a check to ensure_apt_working()
- Adds dpkg --configure -a to retry logic in install_packages_with_retry()
- Adds dpkg --configure -a to retry logic in upgrade_packages_with_retry()

Fixes: Omada Controller update failing after interrupted installation
Reported-in: #9663
2025-12-05 09:17:19 +01:00
CanbiZ
8e93f5cb1d Improve Temurin JDK version detection
Enhances the setup_java function to attempt a package purge and reinstall if a Temurin JDK is detected but its version cannot be determined. This helps recover from inconsistent or broken JDK installations.
2025-12-04 09:20:32 +01:00
CanbiZ
a826769899 Three-tier defaults system | security improvements | error_handler | improved logging | improved container creation | improved architecture (#9540)
* Refactor Core

Refactored misc/alpine-install.func to improve error handling, network checks, and MOTD setup. Added misc/alpine-tools.func and misc/error_handler.func for modular tool installation and error management. Enhanced misc/api.func with detailed exit code explanations and telemetry functions. Updated misc/core.func for better initialization, validation, and execution helpers. Removed misc/create_lxc.sh as part of cleanup.

* Delete config-file.func

* Update install.func

* Refactor stop_all_services function and variable names

Refactor service stopping logic and improve variable handling

* Refactor installation script and update copyright

Updated copyright information and adjusted package installation commands. Enhanced IPv6 disabling logic and improved container customization process.

* Update install.func

* Update license comment format in install.func

* Refactor IPv6 handling and enhance MOTD and SSH

Refactor IPv6 handling and update OS function. Enhance MOTD with additional details and configure SSH settings.

* big core refactor

* Enhance IPv6 configuration menu options

Updated IPv6 Address Management menu options for clarity and added a new option for fully disabling IPv6.

* Update default Node.js version to 24 LTS

* Update misc/alpine-tools.func

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* indention

* remove debugf and duplicate codes

* Update whiptail backtitles and error codes

Removed '[dev]' from whiptail --backtitle strings for consistency. Refactored custom exit codes in build.func and error_handler.func: updated Proxmox error codes, shifted MySQL/MariaDB codes to 260-263, and removed unused MongoDB code. Updated error descriptions to match new codes.

* comments

* Refactor error handling and clean up debug comments

Standardized bash variable checks, removed unnecessary debug and commented code, and clarified error handling logic in container build and setup scripts. These changes improve code readability and maintainability without altering functional behavior.

* Update build.func

* feat: Improve LXC network checks and LINSTOR storage handling

Enhanced LXC container network setup to check for both IPv4 and IPv6 addresses, added connectivity (ping) tests, and provided troubleshooting tips on failure. Updated storage validation to support LINSTOR, including cluster connectivity checks and special handling for LINSTOR template storage.

---------

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
2025-12-04 07:52:18 +01:00
Slaviša Arežina
e5cc0a4726 core: sanitize appname for certificate generation (#9552)
* Update SSL key and certificate paths for Actual Budget

* Use lowercase app name for certificate paths

* revert changes at actualbudget

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-12-01 20:35:12 +01:00
CanbiZ
4d4095cd7d Enhance MariaDB version fallback logic (#9545)
Updated fallback mechanism for MariaDB version retrieval to use mariadb_repo_setup script when the mirror is unreachable.
2025-12-01 18:25:08 +01:00
Slaviša Arežina
33489e607b Refactor: Actual Budget (#9518)
* Update create_self_signed_cert function

* Refactor

* Remove old version file check
2025-11-30 17:34:14 +01:00
CanbiZ
e4b2e051bf fixes bug in setup_php 2025-11-22 13:23:40 +01:00