{"id":18856016,"url":"https://github.com/rickycodes/pve-no-subscription","last_synced_at":"2025-04-14T11:06:16.562Z","repository":{"id":43369926,"uuid":"315198275","full_name":"rickycodes/pve-no-subscription","owner":"rickycodes","description":"Proxmox VE No-Subscription Removal","archived":false,"fork":false,"pushed_at":"2022-12-14T02:43:55.000Z","size":31,"stargazers_count":132,"open_issues_count":1,"forks_count":22,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T11:06:11.418Z","etag":null,"topics":["bash","proxmox","proxmox-cluster","proxmox-ve","virtualization"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rickycodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-23T04:16:54.000Z","updated_at":"2025-03-21T22:44:57.000Z","dependencies_parsed_at":"2023-01-28T16:30:32.640Z","dependency_job_id":null,"html_url":"https://github.com/rickycodes/pve-no-subscription","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickycodes%2Fpve-no-subscription","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickycodes%2Fpve-no-subscription/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickycodes%2Fpve-no-subscription/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickycodes%2Fpve-no-subscription/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickycodes","download_url":"https://codeload.github.com/rickycodes/pve-no-subscription/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868768,"owners_count":21174757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","proxmox","proxmox-cluster","proxmox-ve","virtualization"],"created_at":"2024-11-08T03:57:21.913Z","updated_at":"2025-04-14T11:06:16.538Z","avatar_url":"https://github.com/rickycodes.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/rickycodes/pve-no-subscription.svg?branch=main)](https://travis-ci.org/rickycodes/pve-no-subscription) ![Shellcheck Status](https://img.shields.io/badge/shellcheck-passing-brightgreen)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frickycodes%2Fpve-no-subscription.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Frickycodes%2Fpve-no-subscription?ref=badge_shield)\n\n# Proxmox VE No-Subscription Removal\n\nThis script removes the 'No valid subscription' warning in Proxmox VE 6 and should only be used in test or demo environments. Please consider [buying a subscription](https://www.proxmox.com/en/proxmox-ve/pricing)\nand supporting the development of Proxmox VE.\n\n## How to install\n\n#### You can run the removal script one of three ways:\n\n##### 1. Curl\n\n`curl` into bash like shell:\n\n```\ncurl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rickycodes/pve-no-subscription/main/no-subscription-warning.sh | sh\n```\nDo not curl blindly :see_no_evil: [Audit the script before you run it](no-subscription-warning.sh). It's not doing anything terribly surprising, I assure you!\n\n##### 2. With Git\n\nYou can also clone the repo with git and run locally if you prefer, but you'll need `git` (a typical proxmox host doesn't have it installed):\n```\ngit clone git@github.com:rickycodes/pve-no-subscription.git\ncd pve-no-subscription\nbash no-subscription-warning.sh\n```\n\n##### 3. Download\n\nOr, you can download the source directly from one of [the releases](https://github.com/rickycodes/pve-no-subscription/releases/tag/v1.0):\n```\nwget https://github.com/rickycodes/pve-no-subscription/releases/download/v1.0/source.tar.gz\ntar -xf source.tar.gz\nbash ./pve-no-subscription/no-subscription-warning.sh\n```\n\n## Diagnostic\n\nThe script provides stdout and verifies a few things on behalf of the user.\n\n#### After a successful run, you should see the following result:\n```\nsubscription status: NotFound\nperforming replacement in /usr/share/perl5/PVE/API2/Subscription.pm...\nrestarting services...\nall done!\n```\n\n#### Running the script a second time will produce the following result:\n``` \ncannot find item. have you already run the replacement?\n```\n\n#### Running the script on a non pve install will produce:\n```\n/usr/share/perl5/PVE/API2/Subscription.pm does not exist! are you sure this is pve?\n```\n\n## TL;DR\n\nIf you don't care about the above diagnostic feedback and you'd rather yolo, this is the gist of it:\n```sh\n#!/bin/sh\nset -ex\nsed -i \"s/NotFound/Active/g\" \"/usr/share/perl5/PVE/API2/Subscription.pm\"\nsystemctl restart pvedaemon\nsystemctl restart pveproxy\n```\n\n## Adding apt hook\n\nAfter updating you may find you need to re-run the script to apply the patch. You can automate this by adding a `Post-Invoke` apt hook.\n\nFirst, let's create the script to run (you can put these files anywhere, but I am following pve conventions as best I can).\n\n```\ntouch /usr/share/proxmox-ve/pve-apt-post-hook\n```\n\nThe above file should look something like this:\n\n```sh\n#!/usr/bin/env bash\nset -ex\ncurl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/rickycodes/pve-no-subscription/main/no-subscription-warning.sh | sh\n```\n\nWe'll also need to make the file executable:\n\n```\nchmod +x /usr/share/proxmox-ve/pve-apt-post-hook\n```\n\nOnce that's done, we can add the hook. For that we're going to edit an existing file: `/etc/apt/apt.conf.d/10pveapthook`\n\nAdd the following line to the above file:\n\n```\nDPkg::Post-Invoke { \"/usr/share/proxmox-ve/pve-apt-post-hook\"; };\n```\n\nAnd that's it! The next time you perform an `apt upgrade` you should see something like the following (if the patch needs to be applied):\n\n```\n...\nSetting up dnsutils (1:9.11.5.P4+dfsg-5.1+deb10u2) ...\nProcessing triggers for mime-support (3.62) ...\nProcessing triggers for libc-bin (2.28-10) ...\nProcessing triggers for rsyslog (8.1901.0-1) ...\nProcessing triggers for systemd (241-7~deb10u5) ...\nProcessing triggers for man-db (2.8.5-2) ...\nProcessing triggers for initramfs-tools (0.133+deb10u1) ...\nupdate-initramfs: Generating /boot/initrd.img-5.4.34-1-pve\nRunning hook script 'zz-pve-efiboot'..\nRe-executing '/etc/kernel/postinst.d/zz-pve-efiboot' in new private mount namespace..\nNo /etc/kernel/pve-efiboot-uuids found, skipping ESP sync.\nProcessing triggers for ca-certificates (20200601~deb10u1) ...\nUpdating certificates in /etc/ssl/certs...\n0 added, 0 removed; done.\nRunning hooks in /etc/ca-certificates/update.d...\ndone.\n+ sh\n+ curl --proto =https --tlsv1.2 -sSf https://raw.githubusercontent.com/rickycodes/pve-no-subscription/main/no-subscription-warning.sh\n\t\tstatus =\u003e \"NotFound\",\nsubscription status: NotFound\nattempting replacement in /usr/share/perl5/PVE/API2/Subscription.pm...\nrestarting services...\nall done!\n```\n\nYou can see the script ran successfully around the `+ sh` part.\n\n## Notes\n\nI couldn't get the install steps in [pve-no-subscription](https://github.com/lnxbil/pve-no-subscription) to work properly and [discovered this](https://github.com/lnxbil/pve-no-subscription/issues/5#issue-671298084). This script is a result of that discovery.\n\n[pve-nag-buster](https://github.com/foundObjects/pve-nag-buster) does the replacement in the web UI source, but that approach also seems to have stopped working? There's an [issue here](https://github.com/foundObjects/pve-nag-buster/issues/3) with details on how to get around that).\n\nThis is very likely to break in the future. But as of this writing it works for proxmox versions `6.2.x` through to `7.3-3`\n\n## License\n\nMIT License. See the [LICENSE](LICENSE) file for details.\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frickycodes%2Fpve-no-subscription.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Frickycodes%2Fpve-no-subscription?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickycodes%2Fpve-no-subscription","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickycodes%2Fpve-no-subscription","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickycodes%2Fpve-no-subscription/lists"}