Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which license would fit the following requirements the most?

  • Everyone is welcome to make updates and use the source code
  • But nobody should sell it or sell an application that is using it, unless they make a deal with owners
share|improve this question
From my research, this sounds like GPL, but perhaps someone more competent will answer.. – dr Hannibal Lecter Apr 17 '11 at 21:30
You are not asking about an open source license, so ignore most of the answers below which make some incorrect assumptions. Hire an attorney to write your own proprietary license which allows your desired restrictive use. – hotpaw2 Apr 18 '11 at 1:29
@dr Hannibal Lecter: No, the GPL is both a Free Software license and an Open Source license, and both the Free Software Definition and the Open Source Definition forbid such restrictions. – Jörg W Mittag Apr 18 '11 at 1:30
up vote 10 down vote accepted

I hate to tell you, but no OSI approved license (GPL included) prohibits selling the covered software. This is known as discriminating against a particular field of endeavor, which essentially makes the software non-free when referring to liberty not price.

For what you want, you'd need to write your own license and I strongly urge you not to do that. You'd be contributing to something we call bad license proliferation.

In your case, I'd suggest version 3 of the GNU Affero GPL which specifically addresses software that interacts with a network. This compels anyone using your software (through dynamic linking or directly) to provide the source code to their version of it to anyone accessing the program over a network. If you stop and think about it, that covers quite a bit of software.

This ensures that development continues to stay out in the open, which I believe is what you want. You can then offer people interested in a more 'commercial friendly' license a less restrictive license if they come to an agreement with you.

Note, dual licensing requires that you own 100% of the copyright of your code. A catch to that is you'll have to get a copyright assignment from all contributors. That may or may not be a problem depending on the nature of your community.

Finally, double check everything you read on the Internet with an attorney when it comes to legal matters.

share|improve this answer

The only one I can think of, would be the original FreeQT license (one from Qt < 1.45). It's not used anymore, as it was not compatible with any open source definition.

share|improve this answer

A Creative Commons Attribution Non-Commercial Share-Alike licence would seem to fit the requirements you specify. It isn't OSI-approved, though, so it arguably isn't an open source licence. In addition, it isn't often used for software (though there is no reason why it couldn't be) so you may find yourself many of the same problems as licence proliferation. You may be better dropping your requirement for no commercial use and going with a GNU licence - that way it'll be easier to do things such as use GPL-ed libraries.

share|improve this answer

You can't forbid selling or require a deal with owners and still be open source. The best you can do is forbid selling a closed-source version, as the GNU GPL does.

That may be good enough if your project is a library, you can use the "dual license" business model where you sell people a non-GPL version and everyone else can only sell the GPL one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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