Skip to main content
Community Scripts logo
Core engine

Helper libraries

A map of the engine's helper files and where each one is documented.

Scripts never download a helper file themselves. The engine loads the right ones for the place a script runs in, and the functions are documented one page per file in the function reference.

What is loaded where

WhereLoaded byFiles
Container script on the hostcore/build.funccore/core.func, core/error_handler.func, the menu code in ui/, the backend in pve/ or incus/, and lib/tools.func at start
Install script in the containersource /dev/stdin <<<"$FUNCTIONS_FILE_PATH"lxc/install.func, which loads core/core.func and core/error_handler.func
Install script, after update_osupdate_oslib/tools.func, or lib/alpine.func on Alpine
update_script in the containercore/build.func, then startthe same as on the host; lib/tools.func is loaded on Alpine too

lib/tools.func is only a loader. It sources five files, and those hold the functions:

FileContainsReference
lib/system.funcdownloads with retry, packages, repositories, services, create_backup and restore_backup, OS probesSystem helpers
lib/forge.funccheck_for_gh_release, fetch_and_deploy_gh_release and the GitLab and Codeberg equivalentsReleases and downloads
lib/runtime.funcsetup_nodejs, setup_uv, setup_go, setup_rust, setup_php, setup_java, setup_docker and other installersRuntimes and tools
lib/db.funcsetup_postgresql, setup_mariadb, setup_mysql, setup_mongodb, setup_clickhouse, setup_meilisearch and the *_db helpersDatabases
lib/hwaccel.funcsetup_hwaccelHardware acceleration

The other files a script author meets:

FileContainsReference
core/core.funcmsg_info, msg_ok, msg_error, $STD, prompts, header_info, cleanup_lxc, arch_resolve, the update entry pointcore.func
core/error_handler.funccatch_errors, the error handler and the signal trapsError handling
lib/alpine.functhe smaller helper set for Alpine install scriptsAlpine helpers
lxc/install.funcsetting_up_container, network_check, update_os, motd_ssh, customize, the pkg_* and svc_* wrappersInstall scripts

Which names are public

Each loader has a generated list of the functions it exposes, and the engine's CI compares the list with the code on every change:

A function that appears there can be used in a script. Names starting with an underscore are internal and can change without notice.