Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsPVE Tools

Proxmox Datacenter Manager Post Install

Set up package repositories, the subscription notice and updates on a Proxmox Datacenter Manager host.

post-pdm-install.sh is the post-install routine for Proxmox Datacenter Manager (PDM). A fresh PDM has the pdm-enterprise repository enabled, which makes apt update fail without a subscription; this script lets you switch to pdm-no-subscription.

Website entry: post-pdm-install. Source: tools/pve/post-pdm-install.sh.

Run

In the Proxmox Datacenter Manager shell, as root:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pdm-install.sh)"

The script exits with 232 unless the package proxmox-datacenter-manager is installed.

Prompts

After the text prompt Start the Proxmox Datacenter Manager Post Install Script (y/n)? the script asks one whiptail menu per step. The Debian codename comes from VERSION_CODENAME in /etc/os-release.

Menu titleChoicesEffect
PDM SOURCESyesWrites /etc/apt/sources.list.d/debian.sources (deb822; the release, its -updates and -security suites; main contrib non-free-firmware) and deletes /etc/apt/sources.list.
PDM-ENTERPRISEsee below
PDM-NO-SUBSCRIPTIONsee below
PDM-TEST (only if pdm-test is not found anywhere)yesWrites /etc/apt/sources.list.d/pdm-test.sources with Enabled: false.
SUBSCRIPTION NAGyesWrites /usr/local/bin/pdm-remove-nag.sh, runs it once and installs the APT hook /etc/apt/apt.conf.d/no-nag-script.
noDeletes both files and reinstalls proxmox-datacenter-manager-ui, which restores the original interface.
UPDATEyesapt update and apt -y dist-upgrade.
REBOOTyesReboots the host.

The enterprise and no-subscription menus depend on the state found in /etc/apt/sources.list, *.list and *.sources:

RepositoryStateChoices (first is preselected)
pdm-enterpriseEnableddisable, keep, delete
Disabledkeep, enable, delete
Missingno, yes: writes /etc/apt/sources.list.d/pdm-enterprise.sources
pdm-no-subscriptionEnabledkeep, disable, delete
Disabledenable, keep, delete
Missingyes: writes /etc/apt/sources.list.d/proxmox.sources; no

disable and enable set Enabled: false or Enabled: true in a .sources file, and comment or uncomment the lines of a .list file. delete removes the file that contains the repository.

How the notice is removed

PDM's interface is one JavaScript bundle. The nag script appends a block marked PDM_NO_MORE_NAGGING to /usr/share/javascript/proxmox-datacenter-manager/js/pdm-ui_bundle.js. That code closes the subscription dialog in the browser when it appears. The APT hook reruns the script after every package operation, so the block is added again after a PDM update.

Clear the browser cache or reload with Ctrl+Shift+R afterwards, otherwise the old bundle stays cached.

Undo

  • Subscription notice: run the script again and answer no at SUBSCRIPTION NAG.
  • Repositories: run the script again and pick enable, disable or delete.
  • /etc/apt/sources.list is deleted without a backup when you answer yes at PDM SOURCES.

Environment variables

VariableDefaultPurpose
COMMUNITY_SCRIPTS_CORE_URLhttps://raw.githubusercontent.com/community-scripts/core/mainBase URL the script loads api/api.func from.

Limits

  • disable and delete act on the whole file that contains the repository.
  • The script's closing reminder applies: PDM is under active development, so keep direct access to the web interfaces of your nodes.