Interesting, can you elaborate how a "premium user" pays if he wants to host the system by himself? Does he contact you directly or is there a payment system where he gets a code?
As long as you're logged into the app itself, it makes a check on startup with your auth token to see if your current subscription is still active. If it's active, all the paid features turn on.
No passwords, no license keys, auth & subscription data storage managed by Auth0, and one tiny accounts server that glues the checkout & auth0 together (which is also open source: https://github.com/httptoolkit/accounts/).
That's the normal flow, but assuming you don't change the code it works the same whether you use the hosted deployment or you fully self-host the core app.