Disclaimer: This project is NOT affiliated with, endorsed by, or connected to community-scripts / Proxmox VE Helper Scripts. It is an independent wrapper that automates their
update-apps.shtool.
PVE-Cron-LXC-Apps-Update automates unattended updates for community-scripts-managed LXC containers on Proxmox VE. It runs update-apps.sh, backs up containers first, and posts a clean summary notification.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Skulldorom/PVE-Cron-LXC-Apps-Update/main/install.sh)"This launches an interactive whiptail menu that:
- Scans your Proxmox node for community-script LXC containers
- Walks you through frequency (daily/weekly/monthly), hour, notifications, backups, and dry-run options
- If backups are enabled, detects backup-capable storage targets using the upstream
update-apps.shselection logic - Installs
update-community-apps.sh, a cron wrapper script, and configures the crontab
- Runs community-scripts
update-apps.shunattended with:var_backup=yes|no— snapshot withvzdumpbefore updating (toggleable)var_unattended=yes— no interactive prompts inside containersvar_skip_confirm=yes— skip initial confirmationvar_continue_on_error=yes— continue to next CT if one failsvar_auto_reboot=yes— reboot CT if app requires it
- Per-container error resilience — one container failing does not abort the run; downstream processing (summary, notification, status file) always executes
- Bounded readable logs only — produces a single timestamped
.logper run from upstream's ownFull log:file, capped at 10 MiB by default; raw terminal-noise output is held temporarily as a 1 MiB tail-only capture for fallback parsing - Last-run status file — writes
/var/log/update-community-apps-last-statuswith exit code, timestamp, containers, and error count; the installer Status menu reads it for ✅/❌ display - Captures the summary table for quick review
- Optionally sends the summary followed by the clean run log, with the ending summary removed, through Proxmox VE's default notification pipeline
- Upstream's generated full log is copied into
/var/log/update-community-apps-YYYYMMDD_HHMMSS.logwithout duplicating noisy spinner output into the stable cron log; oversized logs are truncated with a warning while preserving the beginning and final summary tail
# Normal update — backup then update
/usr/local/bin/update-community-apps.sh "101,102,105,109,111" "HDD-Storage"
# Dry-run — check what's available without applying
/usr/local/bin/update-community-apps.sh "101,102,105,109,111" "HDD-Storage" dry-run
# Run without backups — no storage selection needed
BACKUP=no /usr/local/bin/update-community-apps.sh "101,102,105,109,111"| Arg | Required | Description |
|---|---|---|
container_ids |
✅ | Comma-separated list of CT IDs to update |
backup_storage |
Required when BACKUP=yes |
Proxmox storage name for pre-update backups |
dry-run |
❌ | Pass dry-run as 3rd arg to check only |
| Variable | Default | Description |
|---|---|---|
NOTIFY |
yes |
Set to no to skip Proxmox notification delivery |
BACKUP |
yes |
Set to no to skip pre-update vzdump backups |
MAX_WORKER_LOG_BYTES |
10485760 |
Maximum bytes for each persisted timestamped worker log |
MAX_UPSTREAM_CAPTURE_BYTES |
1048576 |
Maximum bytes retained from upstream terminal output while looking for the Full log: pointer |
UPDATE_COMMUNITY_APPS_LOG_DIR |
/var/log |
Directory for timestamped worker logs; mainly useful for tests |
UPDATE_COMMUNITY_APPS_STATUS_FILE |
$UPDATE_COMMUNITY_APPS_LOG_DIR/update-community-apps-last-status |
Last-run status file path; mainly useful for tests |
UPDATE_COMMUNITY_APPS_UPSTREAM_LOG_DIR |
/usr/local/community-scripts/update_apps |
Directory where upstream update-apps.sh writes its full logs |
UPDATE_COMMUNITY_APPS_UPSTREAM_SCRIPT_URL |
community-scripts raw GitHub URL | Upstream script URL; mainly useful for tests |
The installer creates a config file at /etc/update-community-apps/config with all settings:
CONTAINER_IDS="101,102,105"
BACKUP_STORAGE="local"
BACKUP="yes"
SCHEDULE="0 5 * * 0"
NOTIFY="yes"
DRY_RUN="no"
A thin wrapper script at /usr/local/bin/update-community-apps-wrapper.sh sources this config and calls the worker. The crontab entry invokes the wrapper, keeping the cron line compact and editable via the Edit Config menu.
The installer's Edit Config menu shows each current value and lets you keep it or change only that setting — no reinstall, no remembering your old LXC IDs, no ritual sacrifice to the cron gods. When backups are enabled, storage is selected immediately after the backup prompt; when backups are disabled, storage is skipped. It rewrites the config file, wrapper script, and crontab entry atomically.
- Proxmox VE node with
pctandvzdumpavailable curlandwhiptailinstalled on the host- Community-scripts-managed LXC containers (tagged
community-scriptorproxmox-helper-scripts) - Storage target(s) configured in Proxmox with
backupcontent type enabled - The installer lists storage targets using the same backup-capable storage detection as the upstream
update-apps.shtool
- Proxmox notifications — configure notification targets and matchers in Proxmox VE (
Datacenter→Notifications). When enabled, this updater sends the summary at the top of the notification, followed by a sanitized run log with terminal redraws, banners, scan progress spam, and the ending summary removed, through the default Proxmox notification pipeline instead of posting to a custom webhook URL. The updater creates the requiredsimplenotification templates in/etc/pve/notification-templates/default/if they are missing, so webhook targets can render the summary payload. - proxmox-discord-notifier — companion service that receives the JSON webhook payload and delivers it to Discord. Provides rich embed formatting for update summaries. Install it on your homelab and point
NOTIFIER_URLat its/api/notifyendpoint. - Log monitoring — check
/var/log/update-community-apps-*.logfor readable run output based on upstream's ownFull log:file. If upstream exits before printing that pointer, the wrapper falls back to the newest upstream log in/usr/local/community-scripts/update_appscreated during the run. Raw terminal-noise output is not kept as a separate timestamped log and is not duplicated into/var/log/update-community-apps-cron.log. Notification delivery successes and failures are appended to the timestamped worker log; failures also print a warning to cron stderr.
| Path | Purpose |
|---|---|
/usr/local/bin/update-community-apps.sh |
The worker script (installed by install.sh) |
/usr/local/bin/update-community-apps-wrapper.sh |
Cron wrapper — sources config, calls worker |
/etc/update-community-apps/config |
Configuration file (source-able key=value pairs) |
/var/log/update-community-apps-YYYYMMDD_HHMMSS.log |
Per-run worker log copied from upstream's Full log: output, capped at 10 MiB by default |
/var/log/update-community-apps-cron.log |
Stable cron stdout/stderr log |
/var/log/update-community-apps-last-status |
Last-run status (exit code, timestamp, errors) |
Each run creates one timestamped worker log file. The worker caps each persisted run log at 10 MiB by default (MAX_WORKER_LOG_BYTES=10485760) and keeps only the last 1 MiB of temporary upstream terminal capture (MAX_UPSTREAM_CAPTURE_BYTES=1048576). Timestamped logs still accumulate because every run uses a unique path, so the included logrotate config removes worker logs older than 28 days and also rotates them early at 10 MiB. The cron stdout/stderr log is handled separately as /var/log/update-community-apps-cron.log, rotates daily, keeps 3 compressed rotations, and rotates early at 10 MB.
To prevent unbounded accumulation, install the included logrotate config:
cp logrotate.conf /etc/logrotate.d/update-community-appsOr download directly:
curl -fsSL https://raw.githubusercontent.com/Skulldorom/PVE-Cron-LXC-Apps-Update/main/logrotate.conf \
-o /etc/logrotate.d/update-community-appsThis removes timestamped worker logs older than 28 days, and keeps 3 compressed daily rotations of the stable cron log with a 10 MB max size. The installer also includes a Logs menu where you can change the timestamped worker log retention period, browse all current updater logs, or delete current updater logs.
Run the local shell regression harness from the repository root:
bash -n update-community-apps.sh install.sh tests/*.sh
bash tests/run.sh
bash tests/cron-path.sh
bash tests/notification-noise.shThe test fakes the upstream community-scripts updater and Proxmox notification module so it can validate the early-exit log fallback and notification diagnostics without a live Proxmox VE node.
| Option | Description |
|---|---|
| Install | Discover containers & storage, configure schedule, install cron |
| Edit Config | Keep current settings or change only containers, backups/storage, schedule, notifications, and dry-run without reinstalling |
| Dry Run | Check for updates without applying (reads args from config or prompts) |
| Update | Diff and pull latest update-community-apps.sh from GitHub |
| Remove | Remove cron schedule, wrapper, config file, and local script |
| Status | Show installed state, human-readable schedule, ✅/❌ last-run outcome |
| Run Now | Manual trigger — runs script immediately |
| Logs | Manage log retention, view update logs, and delete current update logs |
| View | Display installed script, config file, and cron config |
The installer supports three schedule frequencies:
| Frequency | Cron Expression | Example Display |
|---|---|---|
| Daily | 0 H * * * |
"Daily at 05:00" |
| Weekly | 0 H * * DOW |
"Weekly: Sunday at 05:00" |
| Monthly | 0 H DAY * * |
"Monthly: day 15 at 05:00" |
The Status menu parses the cron entry and displays a human-readable schedule description. The Edit Config menu lets you change the schedule at any time.
MIT — see LICENSE