The code is all MIT license and we're working to make it easier to self-host. I make money through providing a hosted version of the product.
It's a similar model to Sentry or Gitlab. Open-source does not have to be libraries and frameworks, there are good opportunities to build more traditional SaaS products that can be self-hosted and you can make money by selling a hosted version.
I understand that not all open-source projects can be funded this way. Once I can pay my own salary, I'm planning to set aside a percentage of revenue to fund open-source projects that Plausible itself relies on.