3

I am in the process of creating a project that I would like to make open source for the community.

Ideally, I would like to restrict the use of my code to non-commercial use only. Is this possible?

If not, am I able to specify that if my source code is used for any commercial activities then I am entitled to receive a compensation or would that require I choose a dual-license?

1

2 Answers 2

3

No OSI- or FSF-approved software license allows you to restrict commercial use. There are some Creative Commons licenses with Non-Commercial clauses, but they are not suitable for software (no warrantee clauses).

So, yes, if that is a strict requirement of yours you will need to dual-license (I assume you mean pick a copyleft license and then dual-license).

Additionally, you will need to get contributors to sign a CLA giving you copyright of their contributions, so that you can relicense the whole codebase. This will most likely reduce your potential pool of contributors: some won't contribute for philosophical reasons, and there is simply a bigger barrier to entry.

One alternative is to skip the dual-licensing and just use a copyleft license. While these licenses allow commercial use, most companies avoid them because the requirement to release source code isn't compatible with their business model.

(Obviously the few companies that do have compatible business models would be able to profit from your work. However, they could do this anyway if you dual-license. They are likely to be warmer to a regular copyleft rather than dual-license, you will have access to any changes they distribute, and they will most likely contribute those changes to you directly.)

2
  • Even a copyleft license (that is compatible with the Open Source definitions) allows a company to use a software program (use as in download and use it as a tool) for commercial use. If you really want to restrict all commercial use, you are in the wrong forum. This is Open Source SE, not Proprietary Software SE.
    – Brandin
    Commented Apr 15, 2018 at 16:41
  • ah, I didn't realise the OP meant "use the software" as "run the software" rather "incorporate in other software"
    – lofidevops
    Commented Apr 16, 2018 at 12:53
3

Short answer no.

As the Free Software definition and Open Source definition, states that the licence must not limit how the software is used. It must give freedom to use in any way that the user wishes. If this was not so, then it would make Free and Open software use less. You could not put a DVD on the front cover of a magazine; you could not provide a service to sell disk; you could never sell a pre-installed computer; …

From Free Software definition

https://www.gnu.org/philosophy/free-sw.en.html

The freedom to run the program as you wish, for any purpose (Freedom 0).

“Free software” does not mean “noncommercial”. A free program must be available for commercial use, commercial development, and commercial distribution.

From Open Source definition

https://opensource.org/osd-annotated

  1. No Discrimination Against Fields of Endeavor

The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

Rationale: The major intention of this clause is to prohibit license traps that prevent open source from being used commercially. We want commercial users to join our community, not feel excluded from it.

A better solution

Use a copy-left licence, such as GPL. This will force any distributor/modifier to pass on the same freedoms to their customers. So they can charge for copies, but must tell their customers of the freedoms that they have.

Not the answer you're looking for? Browse other questions tagged or ask your own question.