$ show community-scripts/ProxmoxVE
This repository is a large collection of Bash scripts that automate the deployment, configuration, and update of self-hosted services on Proxmox VE, primarily through LXC containers and VMs. It is a provisioning and automation framework rather than a runtime application: each ct/*.sh script declares resource variables (CPU, RAM, disk, OS template) and an optional update_script(), while install/*.sh scripts run inside an existing container to install a specific application. Usage is typically a one-line curl command executed as root on the Proxmox host, after which the script creates a container/VM, installs dependencies, generates credentials, writes systemd units or OpenRC init scripts, and configures databases and reverse proxies. The architecture is layered: hundreds of app-specific scripts wrap a smaller set of shared Bash function libraries in the misc/ directory (build.func, install.func, vm-core.func, core.func, error_handler.func). These shared functions handle common operations such as fetching GitHub releases, setting up language runtimes, creating databases, backing up configs before updates, and standardizing error handling. Update flows generally stop the service, back up configuration/data, fetch the latest release, restore the backup, run migrations, and restart the service. This consistency is the project's main strength and makes adding a new container recipe relatively straightforward. Weaknesses are typical of a large community-driven shell-script collection: no unit tests, heavy reliance on third-party installers fetched via curl|bash, some hardcoded versions, and external dependencies on GitHub release asset names and remote core-library URLs. Many scripts assume Debian/Ubuntu or Alpine bases and run as root with no signature verification. Despite these risks, the codebase is actively maintained, consistently formatted, and the shared function libraries are practical examples of reusable Bash abstractions for Proxmox automation.
The LLM identified 3 files worth highlighting for reuse:
Central container build library that turns the declarative var_* definitions in ct/*.sh scripts into actual Proxmox LXC creation operations. It provides build_container, check_for_gh_release, fetch_and_deploy_gh_release, setup_* runtime installers, and create_backup/restore_backup. It is reusable because the library is isolated and generic: a new container script only needs variable declarations and an optional update_script(). This demonstrates a clean declarative interface over an imperative shell tool.
Common install workflow functions for existing containers, including setting_up_container, network_check, update_os, motd_ssh, customize, and cleanup_lxc. It standardizes package-manager operations, OS detection, and cleanup into a few sourced commands, eliminating repetition across hundreds of installers. The functions are self-contained enough to be extracted into any Bash provisioning script for Debian/Alpine-based systems.
Handles the full VM creation lifecycle from cloud images, including resource checks, storage/network defaults, cloud-init configuration, and qm command invocation. This is reusable across QEMU/KVM automation projects and demonstrates non-obvious handling of Proxmox VM provisioning, particularly around cloud-init user-data and VM template setup.