Replies: 18 comments 23 replies
|
Glad to see this finally merged in! Thanks I would have loved a small shoutout to @bvdberg01 and myself, given that we were behind the initial work of this script. |
|
this changes everything |
|
is there a way to do var_unattended= yes with Verbose Mode? |
|
Can someone add an ability to put an "apt update / upgrade" or similar in before the update script runs? After running the update script I went to the container and ran apt update/upgrade and there were packages needing updating still. Also the script failed during updates, but progressed enough that it wouldn't see an update on the containers. For one container it was trying to install Ruby and some part of that failed. Rerunning the script said no update available for the main container. I didn't have logging enabled and can't seem to recreate the issue at the moment. |
|
Nice script. One thing worth adding — a way to know when the update script itself stops running (server down, cron misconfigured, etc.). I use a heartbeat monitor for this. You add a curl at the end of the script, and if it stops pinging, you get a Slack or Discord alert: # At the end of update-apps.sh:
curl -fsS --retry 3 https://gabe.usegabe.workers.dev/ping/YOUR_IDGabe is open source and free for up to 3 monitors. Works well alongside automated update scripts like this. |
|
I'm having trouble trying to figure out - Does this script update the operating system within the LXC, or only apps? |
|
I think there is an issue with with the "Daily update with logging" script. The echo into /etc/crontab is missing the user declarative it needs. I copied the code block, verified the /etc/crontab entry, then did a systemctl status cron and it showed syntax error and did not run. What is now: Fix: |
|
Is there a way to do a "dry run"? I want to know which LXCs have app updates so I can check for breaking changes, features, etc before running the update. |
|
Like @1joneselliot I, too, am concerned about potentially breaking changes. It would be useful to be able to check for major versions and only update minor versions for example. Granted, automatically updating should be done with caution, my k8s cluster with Renovate will only auto-update minor versions for example. |
|
Not sure if my comment should be added here or elsewhere... the interactive method as described here works well. It seems though that it doesn't execute when going through ProxMenuX (option 18 PVE LXC Apps Updater, Scripts in Proxmox & Virtualization) |
|
This script automates the process of adding a specific tag to all Linux Containers (LXC) in a Proxmox environment while preserving existing tags. |
|
Hi, is it possible to make the script output a bit more logfile-friendly? I run the script from a systemd service and get a lot of Local log ( Remote log (written via rsyslog): |
|
Is the discussion on this just dead? Checking for major versions / breaking changes seems pretty important for something capable of auto-updating. |
|
@MickLesk can you help me please? :) A log file is created in /tmp/, the backup completes successfully, but after that the script just hangs and never finishes. When I check the log file with cat, it stops at this point (see screenshot below): This is my script: |
|
Is there a way to get cleaner email notifications? Mine is a mess: |
|
Thank you for this! I wanted to make a minor improvement to the guide, instances where Before# Edit crontab
crontab -e
# Add this line:
0 3 * * 0 var_backup=yes var_backup_storage=local var_container=all_running var_unattended=yes var_skip_confirm=yes var_auto_reboot=no bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)" >> /var/log/lxc-update.log 2>&1After # Edit crontab
crontab -e# Add this line:
0 3 * * 0 var_backup=yes var_backup_storage=local var_container=all_running var_unattended=yes var_skip_confirm=yes var_auto_reboot=no bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)" >> /var/log/lxc-update.log 2>&1 |
|
I guess this is not an error with the script, but i ran into a problem. My question would be if this can be fixed here or in the other script this relates to. When I ran this on one of my LXC containers that are currently stopped it did run into an error and did not shutdown the container after that error. Which is not ideal. The reason for this probably is, that the update script in the LXC was not called update. The LXC in question is the one using the Copyparty Script (https://community-scripts.org/scripts/copyparty) which is anyway installed into an existing LXC (instead of the script setting up the LXC) and it does therefore not add the community-script tag. I added it manually so that it gets updated as well (since that script is also marked as updatable). But as said there the update script is named update_copyparty. Is what I did/tried out of scope of this script, so that my expectation for the LXC to shutdown after it fails on this error is misplaced? Can this be done anyhow? Or should the update script be renamed in the copyparty script so that updatable always can be used in this script? Or as the copyparty script is different in how it acts, I should live with this problem/just rename the update functionality as it is needed? |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🔄 LXC Container Update Tool - Complete Guide
The
update-apps.shtool allows you to update multiple LXC containers created with community-scripts, either interactively or fully automated via cron jobs.📋 Table of Contents
🚀 Quick Start
Interactive Mode (Default)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"Fully Automated (All Running Containers)
var_backup=no var_container=all_running var_unattended=yes var_skip_confirm=yes var_auto_reboot=no \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"✨ Features
community-scriptorproxmox-helper-scriptstags (or specified tags of your choosing - seevar_tagsbelow)⚙️ Configuration Variables
All variables can be set as environment variables before running the script.
var_container- Container Selectionallall_runningall_stopped101,102,105var_backup- Backup Before Updateyesnovar_backup_storage- Backup Storage Locationlocalnas-backupvar_unattended- Unattended UpdatesyesPHS_SILENT=1inside container)novar_skip_confirm- Skip Initial Confirmationno(default)yesvar_auto_reboot- Auto-Reboot Containersyesnovar_tags- Override Default Tags For Auto-Detection📖 Usage Examples
Interactive Mode
Full interactive experience with all dialogs:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"This will:
Unattended Mode
Update All Running Containers (No Backup)
var_backup=no \ var_container=all_running \ var_unattended=yes \ var_skip_confirm=yes \ var_auto_reboot=no \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"Update All Containers with Backup
var_backup=yes \ var_backup_storage=local \ var_container=all \ var_unattended=yes \ var_skip_confirm=yes \ var_auto_reboot=yes \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"Update Specific Containers Only
var_backup=no \ var_container=101,105,110 \ var_unattended=yes \ var_skip_confirm=yes \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"Update Stopped Containers (Start → Update → Stop)
var_backup=yes \ var_backup_storage=nas-backup \ var_container=all_stopped \ var_unattended=yes \ var_skip_confirm=yes \ bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)"Cron Job Automation
Weekly Update (Every Sunday at 3:00 AM)
Daily Update with Logging
Monthly Full Backup + Update
🔧 Advanced Examples
Update Script with Notifications (Email)
Update Script with Telegram Notification
Conditional Update (Only on Weekdays)
Export Current Configuration
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-apps.sh)" --export-configOutput:
{ "var_backup": "", "var_backup_storage": "", "var_container": "", "var_unattended": "", "var_skip_confirm": "no", "var_auto_reboot": "" }🔍 How It Works
Resource Management
The script automatically handles build resources:
var_cpu,var_ram)❓ Troubleshooting
"No LXC containers available!"
community-scriptorproxmox-helper-scriptspct config <CTID> | grep tagspct set <CTID> -tags community-script"Update script not found"
/usr/bin/updatescript is missing or invalid"Backup failed"
backupcontent typepvesm status"Specified backup storage not found"
var_backup_storagedoesn't existcat /etc/pve/storage.cfgUpdates Fail Silently
pct exec <CTID> -- cat /var/log/update.logpct exec <CTID> -- updateContainer Stuck After Update
pct reboot <CTID>/var/run/reboot-requiredinside container📊 Quick Reference Card
📝 Notes
community-scriptorproxmox-helper-scripts) are detectedvar_tags="custom-tag|OTHERTAG"will override this behaviour/usr/bin/updatescriptvzdumpwithzstdcompressionLast updated: February 2026
All reactions