DEV Community

Cover image for Which licence do you use for your open source projects?

Which licence do you use for your open source projects?

Exequiel Beker on March 06, 2020

(Image by Annett Zobel from Pixabay) Recently, i made a quick OK Http server for feature i was developing in my work, and had to do a little resea...
Collapse
 
dnnrly profile image
Pascal Dennerly

I tend to prefer Apache 2 as I would like attribution as well as protection from liability.

AGPL or GPL3.0 make businesses nervous. Like not even allow you to download it sometimes (if they don't have decent lawyers)!

That gets in the way of people adopting it, as businesses don't want to accidentally open source their secrets. It totally makes sense for something like dev.to to use AGPL but might prevent adoption for libraries that could be hidden away behind the scenes.

Collapse
 
overlordex3 profile image
Exequiel Beker

I don´t get why AGPL or GPLv3 could make them not allow to download software. Or I don't fully understood the license (i think the last is more feasible hahaha)

It totally makes sense for something like dev.to to use AGPL but might prevent adoption for libraries that could be hidden away behind the scenes.

I think, in that cases, that one could just talk to the developer and try luck. If they deny you the open-sourcing, you could use an alternative. There are always many!

Thanks for your reply!

Collapse
 
dnnrly profile image
Pascal Dennerly

The problem is the AGPL and GPL3 force you to make your code available to anyone that consumes that service, whether that's a website or and API. This applies even if you're just using a library this license.

To mitigate this this risk, it's easier for companies to just not use AGPL or GPL3 open source products at all.

Collapse
 
ben profile image
Ben Halpern

At DEV we use the copy-left AGPL license which enforces that users of our software must also open-source their code and publish any changes.

Part of our aspirations as a provider of transparent social media is that anyone who uses our software must live up to the same transparency.

If/when we release more lower-level library-style software we'd release that under MIT so that it could be used in more different contexts.

I'm intrigued by some of the novel licenses which have restrictions on the basis of ethics or commercialization, and while I'd definitely experiment with those on personal projects, it's hard to be an early adopter of exotic licenses and do so with a lot of confidence that it holds up if challenged on any of its merits.

Collapse
 
overlordex3 profile image
Exequiel Beker

I love how you follow your own filosophy. In this case, i totally agree that the use of some kind of "restrictive" license is good not just for the owner(s) of the software, but for the entire open source community.

I am currently working in a closed-source company who benefits with open source code. I think is kind of unfair to not retribute to the community. That's why i'm planning to release open-source some part of the code i own.

Thanks for your reply!

Collapse
 
aleixmorgadas profile image
Aleix Morgadas • Edited

I would say each License has a purpose, and you should take that into account choosing some for a project.

I'm gonna try to summary the main Licenses I used depending on the purpose of the project.

When:

  • GPL and alike? When you aim to create a communty. GPL forces forks to disclosure the source code and you are able to merge back enhancements. So, as a communty, you put what you create first, preventing third party to take advantage of your work and don't contribute back.
    • When AGPL? When your type of software is a web application. For example, dev.to is a communty that creates a web application.
    • When LGPL? When you are creating a "Library", you want the enhancements to be shared, but you would like close sourced projects to use your library.
    • MPL has become more popular this days I think. mozilla.org/en-US/MPL/. I'm contributing to a project that has this license and I'm happy.

Why do I try to contribute to GPL alike licensed projects? Because I want my work to be for the communty and protected to be taken advantage of and not being contributed back.

  • Apache-2.0 or BSD alike? When you want to achieve adoption but you don't mind others do a private fork. Scenario? You aim to create enterprise software, and you want what you are creating to win as much as adoption as you can. You probabily want to achieve a high user base so then you can a) sell consultancy for that product b) win some competitor by software popularity.

I think Apache-2.0 is more popular for companies that aim to drive their business by open-source product. Apache-2.0 only restricts that you cannot reuse the brand. I think...

  • MIT. It's suuper permissive, you allow others fork, reuse the naming, ... only prevents the next:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

When I use MIT? for some libraries and minnor projects like Katas. Software that I will not dedicate a lot of effort, that I don't aim to create a community around it, or that I am not aiming to get a lot of adoption to then create a business around it.


My 5 cents about licensing, of course it's quite opinionated and there are more purposes. I just tried to give an inside of what I think, I might be wrong!!!, that those licenses can be used for.

I hope it helped you ^_^

Collapse
 
simme profile image
Simme

I like MIT, but I am at the same time growing more and more fond of the hippocratic license as it also emphasizes that the source code can't be used in violation of UNs universal declaration of human rights.

Collapse
 
cjbrooks12 profile image
Casey Brooks

Most of my projects are under the BSD 3-clause license. It's pretty close to MIT, but with the additional that the name cannot be used without consent (hard forks must be renamed).

However, for Orchid, a bigger project with more at stake, I chose LGPL 3.0. It's functionally GPL 3.0, but has a special exception for use as a library. So companies are free to distribute their apps which contain LGPL libraries without disclosing their source, unlike GPL. For me, this gives the project the protection and collaboration benefits of GPL from OSS consumers, while not scaring off business consumers.

Collapse
 
k3cl profile image
Charlie Li

Depends on the project.

If I intend for something to have a mostly educational tilt, I lean on the Mozilla Public Licence 2.0. The boundaries are at the file, so if someone else wants to incorporate the MPL-licensed stuff into their stuff, the whole does not need a relicensing; only the MPL-licensed parts have to remain that way and distributed under those terms.

Otherwise, I prefer the three-clause BSD licence. I warmed up to this after I started getting involved with the BSD communities, where there is very much a don't-reinvent-the-wheel attitude; the BSD licences allow for that sort of thinking on a wider scale. Unlike the operating system projects, however, I actually have the energy to respond and want to know who wants to use my or the project's name in derivative works. Again, the boundaries are at the file.

For ham radio stuff, GPLv2 for any user-facing (ie not a library) stuff. We continue to have problems (although fading, thankfully) of code and implementations released under proprietary terms in a community and service where openness is required by regulation. Libraries, see above.

Collapse
 
overlordex3 profile image
Exequiel Beker

Oh, yesterday i landed in that page, and i can't remember how! but definitely it was super helpful! (specially the 'Bring your lawyer' part, in 'I don’t want to choose a license.')

Thanks for your reply!

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

I usually just choose MIT for my public repos

Collapse
 
overlordex3 profile image
Exequiel Beker

I am starting to use it too, but i wanted to consider other options.
Why you choose MIT over others? I like it because is short and somewhat simple.

Thanks for you reply!

Collapse
 
n8chz profile image
Lorraine Lee

Not that I'd recommend it, but the most permissive license is the Cypherpunks Anti-License

Collapse
 
delta456 profile image
Swastik Baranwal

MIT most of the time or BSD if I want credit when needed.

Collapse
 
mirkoperillo profile image
mirko

It depends from the project purpose, currently I use:

  • GPLv3 for projects I consider a sort of "product"
  • CC0 (Common Creative Zero) for projects and code I create to learn something.
Collapse
 
overlordex3 profile image
Exequiel Beker

Interesting, i never heard of that license! Why you prefer it over MIT?

Hey, thanks for your reply!