PVE Post Install
Set up package repositories, the subscription notice, high availability services and updates on a fresh Proxmox VE 8 or 9 host.
post-pve-install.sh walks through the steps most people do by hand after installing Proxmox VE: fix the APT sources, switch from the enterprise to the no-subscription repository, remove the subscription notice, turn high availability services on or off, update and reboot. Every step is a question. A few things also happen on a no or without a question; they are noted in the tables below.
Website entry: post-pve-install. Source: tools/pve/post-pve-install.sh.
Run
In the Proxmox VE host shell, as root:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)"In a cluster, run it on every node.
Supported versions
The script reads the version from pveversion and exits with code 105 on anything else:
| Version | Routine | Sources format |
|---|---|---|
| 8.0 to 8.9 | start_routines_8 | .list files, Debian bookworm |
| 9.0 to 9.2 | start_routines_9 | deb822 .sources files, Debian trixie |
It starts with the text prompt Start the Proxmox VE Post Install Script (y/n)?. All later questions are whiptail menus. Cancel or Esc in a menu ends the script at that point; earlier steps stay applied.
Proxmox VE 8 steps
Each menu offers yes and no.
| Menu title | On yes |
|---|---|
| SOURCES | Overwrites /etc/apt/sources.list with the bookworm, bookworm-updates and bookworm-security entries (main contrib) and writes /etc/apt/apt.conf.d/no-bookworm-firmware.conf to silence the non-free-firmware warning. |
| PVE-ENTERPRISE | Overwrites /etc/apt/sources.list.d/pve-enterprise.list with the entry commented out. |
| PVE-NO-SUBSCRIPTION | Writes /etc/apt/sources.list.d/pve-install-repo.list with deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription. |
| CEPH PACKAGE REPOSITORIES | Writes /etc/apt/sources.list.d/ceph.list with the ceph-quincy and ceph-reef entries (enterprise and no-subscription), all commented out. |
| PVETEST | Writes /etc/apt/sources.list.d/pvetest-for-beta.list with the pvetest entry commented out. |
Proxmox VE 9 steps
On 9.x the script looks at what is already there instead of overwriting it.
Sources format. If any *.sources file exists in /etc/apt/sources.list.d/, a message box says so and the format steps are skipped. Otherwise:
| Dialog | Choices | Effect |
|---|---|---|
"Disable legacy sources?" (only if sources.list has active deb lines or .list files exist) | Yes | Copies sources.list to sources.list.bak and comments out its deb lines; renames every /etc/apt/sources.list.d/*.list to *.list.bak. |
| No | Keeps them. | |
| SOURCES "Migrate to deb822 sources format?" | yes | Deletes /etc/apt/sources.list.d/*.list, removes lines containing proxmox or bookworm from sources.list and writes /etc/apt/sources.list.d/debian.sources for trixie, trixie-security and trixie-updates (main contrib). |
no | No change. |
Repositories. What you are asked depends on the current state:
| Repository | State | Choices |
|---|---|---|
pve-enterprise | present in a .sources file | keep, disable (sets Enabled: false in that file), delete (removes the file) |
| absent | no (default) or yes: writes /etc/apt/sources.list.d/pve-enterprise.sources | |
| Ceph enterprise | a .sources file points at enterprise.proxmox.com Ceph | keep, disable (Enabled: false), delete. Not asked if absent. |
pve-no-subscription | present and active | keep, disable (comments the stanza out), delete |
| present but commented out | enable (uncomments it), keep, delete | |
| absent | yes: writes /etc/apt/sources.list.d/proxmox.sources; no | |
| Ceph no-subscription | a component no-subscription exists | Skipped with a message. |
| absent | yes: writes /etc/apt/sources.list.d/ceph.sources, using ceph-tentacle on 9.2 and ceph-squid on 9.0 and 9.1. no: sets Enabled: false on Ceph enterprise .sources entries and comments them out in .list files. | |
pve-test | present | Skipped with a message. |
| absent | yes: writes /etc/apt/sources.list.d/pve-test.sources with Enabled: false; no |
Steps on both versions
| Menu title | Choices | Effect |
|---|---|---|
| SUBSCRIPTION NAG | yes | Writes /usr/local/bin/pve-remove-nag.sh and the APT hook /etc/apt/apt.conf.d/no-nag-script (DPkg::Post-Invoke), so the patch is reapplied after every package operation. The script patches /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js and, if present, /usr/share/pve-yew-mobile-gui/index.html.tpl. |
no | Deletes both files. This is how you undo the patch. | |
HIGH AVAILABILITY (asked if pve-ha-lrm is not active) | yes | Enables and starts pve-ha-lrm, pve-ha-crm and corosync. |
HIGH AVAILABILITY (asked if pve-ha-lrm is active, which includes right after you enabled it in the step above) | yes | Disables and stops pve-ha-lrm and pve-ha-crm, then asks COROSYNC. |
| COROSYNC | yes | Disables and stops corosync. |
| UPDATE | yes | apt update and apt -y dist-upgrade. |
| REBOOT | yes | Reboots the host. |
After the nag question, in both cases, the script reinstalls proxmox-widget-toolkit (and pve-yew-mobile-gui if installed). With the hook in place that applies the patch; with the hook removed it restores the original files.
Before the reboot question a reminder tells you to run the script on every cluster node and to clear the browser cache or reload with Ctrl+Shift+R.
Undo
| Change | How to revert |
|---|---|
| Subscription notice | Run the script again and answer no at SUBSCRIPTION NAG. |
| High availability | Run the script again; it offers the opposite action. |
| Legacy sources on 9.x | Restore /etc/apt/sources.list.bak and rename the *.list.bak files back. This only works if you answered Yes to "Disable legacy sources?"; the deb822 migration itself deletes .list files without a backup. |
| Repositories on 9.x | Run the script again; existing repositories get keep, disable, enable or delete. |
| Sources on 8.x | No backup is made. Restore the files by hand. |
Environment variables
| Variable | Default | Purpose |
|---|---|---|
COMMUNITY_SCRIPTS_CORE_URL | https://raw.githubusercontent.com/community-scripts/core/main | Base URL the script loads api/api.func from. |
Limits
- Disabling HA services and Corosync is meant for single nodes. Do not do it on a cluster member.
- On 8.x the
yesanswers overwrite the named files, including third-party entries you put into/etc/apt/sources.list. - The script does not upgrade between major versions. For 7 to 8 see pve8-upgrade.
- Proxmox VE 9.3 and later are rejected until the script is extended.