Hey fellow Linux enthusiasts.
I’m inching closer to releasing my program for Linux. I’ll go into details on what the program is when I release it, as it’s not really relevant to this question (IMHO).
Anyway, here are my prerequisites:
- the program will be free. I will accept donations, but the program will be free to download and use.
- open source.
- I’m happy for others to use my code, as long as I’m credited.
- I do not wish to allow others to use my code in commercial applications (as there will be mobile versions later, and I don’t want clones selling it for money, as the mobile versions will also be free.
I’m looking for advice on the best code license to choose, based on my requirements. I’d also like it if my choice of license didn’t prohibit my program from potentially being included in package managers.
I’m grateful for any advice. Thank you.
Edit
Thanks for the replies everyone. I’ve decided to not let my concerns overcome the most important thing of releasing the project as fully open source.
Just going to go with GPLv3 and not worry about the clones that will happen regardless of the license type, if the program becomes popular.
Thank you all for your insight and for helping me come to what I believe to be the best option.
As others have already said, the prohibition of using the code in commercial applications would make the license not open source/free software (as defined by the Free Software Foundation and Open Source Initiative.)
These are some of the most commonly used licenses:
If you want to use a true FLOSS license and your goal is to discourage people from selling it, I’d say the GPL is your best bet. Legit vendors who don’t want to give out their source code won’t touch GPL code. The non-legit ones won’t care no matter what license you choose. Also, iOS App Store terms are not compatible with the GPL so they can’t release their stuff there, but you can as long as you hold full copyright to your application.
This is very important in case you expect outside help! A single PR/MR from a volunteer could accidentally lock you out of legally selling your software on app stores without their express permission, so make sure to get a Contributor License Agreement transferring the necessary rights to you(r project) set up and signed before you merge other people’s code!
Please don’t do this. It’s immoral to ride off the free work of others, then turn around and rug pull them. Either stick with open source and take the good and the bad, or go proprietary. Don’t do this fake open source that harms the community. If you have a permissive license there’s nothing stopping you from selling other’s work and a CLA is not needed. If you have a copyleft license then a CLA defeats the entire purpose of that.
You can pick between “transferring rights and publishing on app stores” or “not accepting outside help” with licenses like GPL. Anything else is a recipe for disaster. You can’t publish GPL software to mobile app stores, you need to dual license it (which is easy to do yourself, and very hard to do as more people get involved).
A CLA only affects the upstream projects, all manner of forks and modifications are still allowed. Furthermore, a CLA doesn’t need to be the “we own your code now” type, it can also be the “the upstream project you volunteer your code to is allowed to publish your code to app stores” type.
Alternatively you could pick a license that’s more liberal, such as Apache or MIT, but that would also allow businesses to clone the app without upstreaming changes, which is the main reason GPL is such a good license to prevent corporate meddling in the first place.
That is a good point to emphasize. A downside of a CLA is that it adds a bit of bureaucracy and may deter some contributors. If the primary concern is whether a GPL licensed app is publishable on an App Store, an alternative is to add an app store exception clause to the license. (The GPL allows optional extra clauses to make the license more permissive.) Though this means that while your code can be incorporated to other GPL licensed applications, you can’t take code from other GPL projects that don’t have the same exception.