News for hackers. Stuff that matters.

Ask HN: How to license an OSS so that only commercial use is paid?

When building and maintaing OSS-es, I like to get paid. I really like the idea of having the software be completely free, essentially no paywalled features for personal use (or for NPOs), but making commercial and government organizations pay for it, possibly with a few extra enterprise features like SSO.

I'm wondering how I would license this. I really have no clue on licensing, I use MIT for nearly everything. I've seen some people mention dual-licensing, but I'm not sure how that works.

TL;DR: What kind of licensing to use so that personal and NPOs don't pay, but commercial and governments do pay (per user).

( 10 comments | on HN )
Re:Ask HN: How to license an OSS so that only commercial use... by tshirttime on Tuesday February 27, 2024 @08:45PM (#39532870)
some people mention dual-licensing, but I'm not sure how that works.

That's because it doesn't. A license is only good as its enforcement, which in your case is nil.

Re:Ask HN: How to license an OSS so that only commercial use... by ambigious7777 on Wednesday February 28, 2024 @08:30PM (#39545625)
Sorry if I wasn't clear, I meant I personally don't understand to use dual-licensing, and what is does; not how dual-licensing actually does something.
Re:Ask HN: How to license an OSS so that only commercial use... by greyface- on Tuesday February 27, 2024 @08:20PM (#39532687)
Publish it without an explicit license, djb-style. Include a note that explains your intent about free personal use, and states that that organizations that wish for more legal certainty are welcome to contact you for an individual license.
Re:Ask HN: How to license an OSS so that only commercial use... by sargstuff on Tuesday February 27, 2024 @07:30PM (#39532295)
Video on "Free and Open Source Licenses: MIT vs GPL Explained" might help. https://news.ycombinator.com/item?id=39532268

table comparison of difference licenses : https://en.wikipedia.org/wiki/Comparison_of_free_and_open-so...

Re:Ask HN: How to license an OSS so that only commercial use... by sp332 on Tuesday February 27, 2024 @08:03PM (#39532552)
Dual licensing makes sense to me. You could look at CC-NC licenses for example of a non-commercial license.
Re:Ask HN: How to license an OSS so that only commercial use... by logtempo on Tuesday February 27, 2024 @07:30PM (#39532288)
offering services, such as expertise, hosting, pushing features on-demand that the company want(and pay), doing plug-in on-demand, API limited access, promotion of a company on the website(as opensource is good PR).
Re:Ask HN: How to license an OSS so that only commercial use... by wittystick on Tuesday February 27, 2024 @08:51PM (#39532917)
Have a look at the MongoDB license (SSPL) as an example of an almost open source license which doesn't really impact personal use, but impacts big service providers who would be required to release the entirety of their source code. You can provide a proprietary alternative for those.

If you dual-license you will require a contributor agreement that any contributor grants you the right to relicense their contributions.

Re:Ask HN: How to license an OSS so that only commercial use... by ambigious7777 on Wednesday February 28, 2024 @08:36PM (#39545663)
I see that MongoDB has a license, which I'm assuming is similar to the AGPL. Since companies don't want to release all their code, they also provide a Enterprise edition, which probably is under a non-copyleft license. This edition is then paid, so they make money. This also requires all PR contributors to sign a relicensing agreement.

Correct me if I'm wrong, but that's how I'm understanding it currently.

Re:Ask HN: How to license an OSS so that only commercial use... by josephcsible on Wednesday February 28, 2024 @12:53AM (#39534534)
If you required commercial/government users to pay, then you'd necessarily fail to meet the Open Source Definition, so it'd be impossible. The next best thing is indeed dual licensing. Choose a license that companies are irrationally afraid of, like the AGPLv3, and release your code for free to the public under that license. The dual licensing part is you say something to the effect of "if you don't like the AGPLv3, then you can pay for a different license instead". The FSF calls this "selling exceptions" and is completely fine with it.
Re:Ask HN: How to license an OSS so that only commercial use... by ambigious7777 on Wednesday February 28, 2024 @08:29PM (#39545619)
Someone mentioned[0] that this requires contributers to sign some sort of agreement. I did read somewhere that this discourages a lot of possible PRs, but if this is the only way I guess I don't have much choice then (if I want some money, that is).

[0]: https://news.ycombinator.com/item?id=39532917