How to remove subscription notification from Proxmox VE 5

This guide will show you how to easily remove the “No Valid Subscription” nag from Proxmox VE 5.* that pops up every time you log in.

Introduction and Disclaimer

In order to apply this “hack” to a Proxmox installation, you require SSH or console access with administrative/sudo privileges. This guide assumes that you have the appropriate privileges. (If you’re reading this guide then, let’s face it, you probably do).

By following this guide you agree that you do so at your own risk. I take no responsibility for any damage that occurs as a result of this guide.

Steps

1) Log in to your Proxmox machine via SSH or via the VNC console available from within the web UI.

2) Navigate to the following directory where the PVE manager configuration files are stored

/usr/share/pve-manager/js/

3) Make a backup of the Javascript file pvemanagerlib.js

cp pvemanagerlib.js pvemanagerlib.js.bkp

4) Now open the file you just backed up with your favourite editor and find the following lines of code:

if (data.status === 'Active') {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}

5) Replace the first if() string with if(false), like so:

if (false) {
    Ext.Msg.show({
      title: gettext('No valid subscription'),
      icon: Ext.Msg.WARNING,
      msg: PVE.Utils.noSubKeyHtml,
      buttons: Ext.Msg.OK,
      callback: function(btn) {
          if (btn !== 'ok') {
              return;
          }
          orig_cmd();
      }
    });
} else {
    orig_cmd();
}

6) Restart the node – make sure you shut down your running VMs properly first!

7) Navigate back to your web UI (log out first if you’re still logged in) and hard refresh your browser. Log back in, no more nag! Do note that this may be overwritten by subsequent updates. If you update your machine and the nag returns simply follow this guide again.

4 thoughts on “How to remove subscription notification from Proxmox VE 5

  1. You don’t need to restart the node! This is only a Javascript change so it doesn’t really change anything on the server, just how your browser renders it. Clearing the cache on your browser so the JS file is re-downloaded is all that’s required.

  2. I changed if (data.status === ‘Active’) {

    to

    if (data.status === ‘false’) {

    then applied updates. After a reboot, the subscription notification was still there. I tried a couple of different browsers (even in private mode in case there was some cached version being loaded) but it didn’t go away.

    During the 5th time looking at the Active to false change, I noticed the following:

    if (data.status !== ‘false’) {

    There is an exclamation point in the place of the first equal sign. Once I changed that back to an equal sign and rebooted, the subscription notification went away.

  3. Thats not what the file looks like in PVE 5.1 anyways. The only occurance of that If statement looks like this
    if (data.status === ‘Active’) {
    if (data.level === ‘c’) {
    me.updateCommunity(data);
    } else {
    me.updateActive(data);
    }
    } else {
    me.updateInactive(data);
    }

Leave a Reply