As Proxmox changed their code a bit, I had to update my code too. So I want to discuss how to do that.

Motivation

I am using Proxmox VE as my hypervisor in my home network. Naturally, the Proxmox UI is an interface I use quite often.

The Proxmox Code is open source, and I am able to use it without paying for it. Still, the company asks to buy a subscription for every server, as this is their way of surviving. I actually did think about it, but this is a bit hard for me: The current minimum price is 115€ per year and CPU socket. Considering that I currently run six sockets with Proxmox, this would be about 60€ per month, which is not something I am willing to pay at the moment - particularly since this does not give me that much advantage. So, no subscription it is.

So I kind of have to live with the fact that every time I login to the interface, I am asked if I may consider buying a subscription.

Disabling this popup

I already had a code snippet in the past that did the disabling, but with the latest update of Proxmox, this snippet did not work any more. Turns out, Proxmox changed their code slightly…

Essentially, I just created the file /etc/apt/apt.conf.d/proxmox-disable-subscription-nag with the following contents:

DPkg::Post-Invoke { "dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ $? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/.*res\.data\.status.*/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi"; };

This is really not nice, but I will still explain what it does:

  • If proxmox-widget-toolkit was updated, and in particular if the file proxmoxlib.js was changed, then do something. Else, do nothing.
  • The sed command is a bit hard to understand, but essentially it looks for a line that looks like that: res.data.status.toLowerCase() !== 'active'.
    • This line occurs in an if statement, and res.data.status.toLowerCase() represents essentially the status of the subscription, so it is something like active or inactive or something similar. I don’t bother about the actual contents of this variable, but I am quite sure that it will never be 'DoNotAsk'.
    • Hence, change the !== to ==, and change 'active' to 'DoNotAsk'.
    • That way, this condition will always be false, and this will disable the subscription popup!