Datacenter
└── PVE
├── LXC1
├── ...
└── LXCn
To download the scripts to your system:
- Navigate to your home directory.
- Open a terminal and paste the comand
curl -sL "https://raw.githubusercontent.com/git24chris/proxmoxhelperscripts/main/get_scripts.sh" -o "get_scripts.sh" && chmod +x "get_scripts.sh" - Hit Enter to execute the command.
This will create an executable script called
get_scripts.shin your/rootor home directory. - Execute the script with
./get_scripts.sh. It will create a full directory structure, and scripts will be downloaded from GitHub into a folder namedscriptsin either your root or home directory. - Run the script on PVE to access the PVE-level scripts, or run it inside an LXC to access the scripts for LXCs.
Scripts are organized into:
~home
├── pbs-root
├── pve-root
└── container
🪄 Hint: Consider running
get_scripts.shagain at any time in order to update your local scripts with the latest version.
Automates updates for Proxmox Backup Server via cron jobs.
- Location of the script:
/root/scripts/pbs-root - Runs
dist-upgradeto update Proxmox. - Logs:
/var/log/autoupdate_pbs.log - Local copy: A timestamped file is created in the root or home directory.
- Requires
cronfor full automation; a cron config example is in the script header. - If there are kernel updates, the server will be rebooted.
Automates updates for Proxmox via cron jobs.
- Location of the script:
/root/scripts/pve-root - Runs
dist-upgradeto update Proxmox. - Forced update the list of templates offered for LXC creation.
- Logs:
/var/log/autoupdate_proxmox.log - Local copy: A timestamped file is created in the root or home directory.
- Requires
cronfor full automation; a cron config example is in the script header. - If there are kernel updates, the server will be rebooted.
Updates all running LXC containers: apt-get update && apt-get upgrade && apt-get autoremove alternatively use unattended_upgrades
- Location of the script:
/root/scripts/pve-root - Logs:
/var/log/autoupdate_lxcs.log - Summary file: Timestamp and container details are stored in the root or user's home directory.
- Requires
cronfor full automation; a cron config example is in the script header. - Only affects actively running containers.
Configures smtp to sent emails
- Location of the script:
/root/scripts/pve-root - Interactive setup: Just enter your mail provider credentials.
- Safe to re-run for updates or to correct wrong input.
Configures msmtp to sent Gotify notification and emails
- Location of the script:
~/scripts/container - configures gotify, redirects an email
gotify@localhostto Gotify-App - configures email address to send email
- configures
unattended upgradesto inform per gotify or email, errors only or all
Updates every lxc configuration
- Location of the script:
~/scripts/pve-root - update parameters inside script, in this case deactivate apparmor settings which prevent docker to wrok properly
- script can be used to update other parameter in <lxc_number>.conf
- can be run each time a new lxc will be added, works idempotent
Interactive tool to select and execute updates and restores. is batch-ready to include backups per cron schedule.
- Preprequisites an installed PBS.
- Select and backup local configuration
- Only affects the configured PVE environment; does not back up CTs/VMs.
- Requires
cronfor full automation; a cron config example is in the script header. - Restore to /tmp for inspection after selection the desired repository on PBS
- Disaster restore system configuration after PVE system reinstall
- for restore the PVE configuration select the timestamp/repository you would like to have restored. WARNING: The current installation will be overridden and the server need to be rebooted if you choose to proceed.
- Logfile:
/var/log/pve_backup_restore_pbs.log
Displays system info during shell login.
- Location of the script:
~/scripts/container - Creates
/etc/config.d/show_info.sh - Info shown:
- Storage: mountpoint, size, usage
- Network: IP, DNS, DHCP
- System: CPU, RAM, time (UTC)
- User: sudo eligibility, SSH eligibility
- Optional welcome file (
welcome.txt) for custom messages or LXC information. - root account lists all registered userids of the LXC.
- you need to re-login for the effect.
ensures locale settings are set: language, timezone
offers to install typcial tools used or are necessary
- Location of the script:
~/scripts/container - run after container creation, or wheneever you like to change or update
locales - interactive application
- choose right locale (
UTF-8) to ensure Terminal Software does the terminal encoding right - approve timezone proposal, chose
UTC, or enter your own - confirm to-be-changes before implementation
setup unattended upgrade (automation) offers to install unattended_upgrades if necessary
- Location of the script:
~/scripts/container - run after lxc_postinstallation, interactive application
- configures options in unattended upgrades, select repositories,
- configures email alerting (option via Gotify)
- confirm to-be-changes before implementation
- Location of the script:
~/scripts/container - Interactive application
- Create, Remove user cleanly, SSH config, enable SUDO, home directory.
- Show list of registered users
- Maintain passwords
-
Location of the script:
~/scripts/container -
Install, update, remove docker environment.
-
in case of unattended-upgrades, docker repository will be added to whitelist of updates in case of installation/updates, and will be removed in case docker will be removed
-
Install, update, remove portainer (port parameter can be edited in docker_manager.sh).
-
Install, update, remove portainer_agent (port parameter can be edited in docker_manager.sh).
-
docker run -d \ -p 9001:9001 \ --name portainer_agent \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /var/lib/docker/volumes:/var/lib/docker/volumes \ -v /:/host \ portainer/agent:lts
Note: Using lts as the version is a trial to avoid updating the script each time. This section will be updated once it's confirmed if this approach works.
-
Location of the script:
~/scripts/container -
run to setup monitoring configuration for Signoz
-
Location of the script:
~/scripts/container -
run to setup monitoring configuration for Loki/Grafana
-
Location of the script:
~/scripts/container -
run to install/remove agent for collecting telemetry information for CheckMK monitoring server
Released under the MIT License.
You’re free to Use, Modify, and Redistribute.
See the full license in the LICENSE file.