Do I really have to Open Source my project?
<p>I'm currently working on a software which uses another software under the <a href="https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_3" rel="noreferrer">GPL version 3</a> license:
<a href="https://github.com/ViaVersion/ViaVersion/blob/dev/LICENSE" rel="noreferrer">https://github.com/ViaVersion/ViaVersion/blob/dev/LICENSE</a></p>
<p>Now someone just came to me and said I have to Open Source my project or I can get in trouble.</p>
<p>I'm not quite sure... But I thought I don't need to do this, because my project is completely private. I will not publish this project whatsoever.</p>
<p>Only me and 2 friends use my software.</p>
<p>Do I really have to Open Source my project?</p>
<p>And if yes, is it enough to just publish the code parts using the software?</p>

<p>You need to know two things about the GPL:</p>
<ul>
<li><p>The GPL is a license which requires that when you distribute binaries, you distribute the source code with them (binaries being the things you can directly run)</p>
</li>
<li><p>The GPL is <em>copyleft</em> - any project using something licensed under the GPL must also be licensed under the GPL</p>
</li>
</ul>
<p>The easiest way to comply with the first point is to simply make the software open source by making it available to all online. Many, if not all, large projects licensed under the GPL do this.</p>
<p>The other way of complying is to simply give anyone else who has a copy of the binaries, or who makes use of them, a copy of the source code. In your case, all you need to do is send your friends a copy of the source. As long as no one else uses this project, I think you satisfy the requirements of the license.</p>
<p>You must, however, also license your code under the GPL. This means, as mentioned in the comments, that you must somehow make your friends aware that if they redistribute your code, they must also do so under the terms of the GPL. This can be as simple as including a file called <code>LICENSE</code> in the root directory of the source code, containing a copy of the text of the GPL.</p>
<p>This further means that your friends will be able to share your code with other people without letting you know. You could politely ask them not to, but you can't stop them.</p>
<p>(That said, you have no reason to be worried - only big breaches of license misuse by large companies ever tend to get chased up. However, it's great that you want to be careful about this! Software licensing, especially FOSS licensing, is very important.)</p>

<p>It depends on exactly how you are &quot;using&quot; the GPL code.</p>
<p>If you have copied and modified the source code then you can only distribute copies under the GPL.</p>
<p>If you have invoked a GPL program as a separate process so that your code can use its output then you can distribute your program without the source code, as long as you comply with the terms of the GPL for the GPL program.</p>
<p>If your code is linked either statically or dynamically with a GPL library then the jury is AFAIK still out. The FSF argues that the linked binary is a derivative work and therefore can only be distributed under the GPL. However this has never been actually determined by a court.</p>

<p>What you have been told is incorrect. You are in no way required to release your product under an open source license, nor to publish it in any form. If you do &quot;convey&quot; a work that is under the GPL, or a modified version of a work under the GPL, then you must provide the source code, and include the GPL license text, and for a modified version, place it also under the same license, the GPL (same or later version as the one you received). (for an unmodified copy, the work remains under the same license, and the notices that it is under the GPL must not be changed.) All of that applies only if you &quot;convey&quot; a work, which means to provide it to others in such a form that the others could make further copies.</p>
<p>Section 5 of the GPL, and other parts that refer to a &quot;modified version&quot; apply only to &quot;a work based on the Program&quot;. A work that &quot;uses&quot; another work that has been released under the GPL may or may not be &quot;based on&quot; that program. If it is the modified version must be released, if at all, under the same license. But if a new work uses a GPL work <strong>only</strong> in the sense of making calls to it, and does not itself include any of the source or object code of the original work (which is under the GPL) nor was it created by startling with the GPL source and making changes, even extensive changes, then the new work is not a modified version of the original, and need not be released under the GPL, but may be released under any license that the developer chooses, including a non-free license.</p>
<p>In short, when you convey copies of a work you got under the GPL to others, you must include the source code and retain the license and copyright notice. If you create a modified version <strong>and</strong> convey it to others, you must license that modified version under the GPL. You do not need to set up a formal open source project, however.  If you create a program that will &quot;use&quot; another program under the GPL, but that is not a modified version of the GPL'd program, and does not incorporate that program, you need not place it under the GPL even if you convey it. If you create a modified copy of a GPL'd program for personal use but do not convey it to others, you need not place a GPL license notice on it.</p>

<p>For your case specifically, <a href="https://github.com/ViaVersion/ViaVersion/tree/dev#license" rel="noreferrer">the API for that library is licensed under MIT, not GPL</a>.</p>
<p>MIT is non-viral, so as long as you only call into the API for that library, you do not need to make your code open-source.</p>

<h3>Not if you host it on a web server.</h3>
<p>If you host a program containing open source code on a web server, you don't need to abide by the terms of the open source licenses and distribute the source code to the people who access your server, because you're technically not considered as distributing the code. This is also known as the &quot;SaaS (Software as a Service) Loophole&quot;.</p>
<p>This is the loophole that the Server-Side Public License sought to close, before it was rejected by the Open Source Initiative because they were clearly corrupted by moneyed interests and big business (their <a href="https://opensource.org/node/1099" rel="nofollow noreferrer">press release</a> on the subject talked about the new license &quot;taking away rights&quot;, but the only rights taken away were the rights to exploit this loophole).</p>
<p>However, if you aren't using software licensed under the SSPL, then you can not only exploit this loophole to give copies of your program to your friends, you can exploit it to sell access to your SaaS service commercially, too!</p>

<p>You are using open source software in your project. You are allowed to do that because of the open source license. Most likely (for example for GPL licensed software) you are allowed to do the following:</p>
<ol>
<li><p>Create and use software that is derived from the open source software, without any obligation to you.</p>
</li>
<li><p>Distribute your modified software IF you distribute it under an open source license.</p>
</li>
</ol>
<p>So as long as this is private, you have no obligations. If you are a company, as long as the software stays within your company, you have no obligations. As a company, you'd have to be careful not to give it to anyone outside the company, and to tell your employees not to give it to anyone outside the company. If an employee distributes the software, against specific orders, it's the employee who is on the hook and not you.</p>
<p>If you distribute your software, you have the choice: Distribute it under an open source license, as you should, or risk being sued for copyright infringement by the copyright holder. That is your choice. Of course if you get sued and lose the case (as you most likely will) and go on distributing, you will go straight back to court, and the judge may say &quot;apparently a million fine wasn't enough, so now it's five millions&quot;. BUT only the copyright holder can do that. Nobody else can force you to do anything.</p>
<p>PS. If this is a private project, and you give it to your best mate, and you don't want anyone else to have your project: You can give the project, under an open source license, COMPLETE WITH SOURCE CODE, to your mate, and you have no further obligation at all. You have no obligation towards anyone. Your mate is allowed to give the project to others, but has no obligation. As long as you can trust your mate to not hand the project to anyone, nobody else has any rights. The important thing is that when you hand over the project, it must be accompanied by the source code. Without that, I can ask you for the source code.</p>

<h2>Preface</h2>
<p><em>This answer assumes that OP has a GPL'ed modified work he is distributing to his friends, and wants to avoid giving them his modifications to the source code. If by &quot;uses another software&quot; he means he simply executes their unmodified executable, then this answer would probably, depending on the exact details, be quite different (for example by distributing the two pieces separately).</em></p>
<p>The relevant bits of the <a href="https://www.gnu.org/licenses/gpl-3.0.html" rel="nofollow noreferrer">GPL</a> are the following; I have obviously quoted very short snippets only. Use these as a guideline for your own studies. The GPL document is quite short and, in my opinion, self-sufficient enough to work through it yourself instead of only relying on other opinions:</p>
<blockquote>
<p>Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.</p>
</blockquote>
<blockquote>
<p>To “convey” a work means any kind of propagation that enables other parties to make or receive copies.</p>
</blockquote>
<p>Pure <a href="https://en.wikipedia.org/wiki/Copyright" rel="nofollow noreferrer">copyright</a> (with not license whatsoever), in a nutshell, forbids propagating and conveying per default; the function of the GPL is to allow it and make sure it cannot be taken away. The copyright, per se, stays with the copyright holder.</p>
<blockquote>
<p>You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works,</p>
</blockquote>
<p>Up to here, this last sentence is important (<em>but not directly applicable to you!</em>). It clears up an important issue which would otherwise mean it would be very hard to actually <em>use</em> GPLed software, or to work on it with subcontractors. It means that for example you can take a GPL'ed source, modify it, and give it to a subcontractor specifically to continue development for <em>you</em>. You can give it to, say, a hosting service to run it for you. Both without having to GPL your own modifications. This clause is far up in the license, and specifically says that for all other cases, the rest of the license is relevant.</p>
<p>Again, your use case does <em>not</em> fall under this clause.</p>
<h2>GPL is &quot;viral&quot;</h2>
<p>In all other cases, including yours, the rest of the license says this:</p>
<blockquote>
<p>Conveying under any other circumstances is permitted solely under the conditions stated below.</p>
</blockquote>
<blockquote>
<p>You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source</p>
</blockquote>
<p>So this is rock solid and plain as daylight: it does not matter to how many people you distribute your modified work, or if it's private or public. By sending your friends your program, you must make the source code available to them. The license has a lot to say about ways how to do that. Specifically, you do not actually send the source code along with the program; it is enough if you have the source on a server and provide them the information how to get it.</p>
<h2>Not necessarily public</h2>
<p>On the question whether you need to also make the code <em>publicly</em> available: the license does not require that. The relevant chapter 6 makes three mentions of the word &quot;public&quot;. One is the way &quot;e)&quot; to convey the source - but it only requires you to pick <em>one</em> of the ways; the others make no mention of it being public.</p>
<p>At the very end of chapter 6 is a mention that the way you provide the source has to be public. That is, if you a way to compress your code (i.e., as a tar or zip file), then the <em>compression method</em> must be public, and an implementation of the compression method, i.e. the programs &quot;tar&quot; or &quot;unzip&quot;, have to be publicly available).</p>
<p>To clarify: this means you are <em>not</em> required to upload your modified source to a public source repository.</p>
<h2>Must give unrestricted access to code</h2>
<p>Finally, regarding whether your friends are then bound to the license:</p>
<blockquote>
<p>You are not required to accept this License in order to receive or run a copy of the Program.</p>
</blockquote>
<p>This means your friends can <em>use</em> the program however they see fit, they do not need to care about the source at all if they only <em>use</em> it. The obligation is on you to provide the source, but they have no obligation to actually download with it, or put it next to the program on their hard drive or anything like that.</p>
<p>But here's the kicker:</p>
<blockquote>
<p>However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.</p>
</blockquote>
<p>This means <em>you</em> have, by giving the program to your friends, implicitly agreed to GPL your modified program. So you are indeed required to distribute the LICENSE together with your modified program, and you are required to give them free and unrestricted access to the code; and they do indeed have to do everything with the program and code as per the GPL - specifically, they can distribute the program, if accompanied by the source, in public.</p>
<p>There is no way for you to avoid that except by not giving your friends the program at all.</p>
<p>As said, the only exception for that are the two very specific cases mentioned in the preface - if your friends were developing the software for <em>you</em>, or hosting the software for <em>you</em>, then this would usage be exempt. But again, this is not what you are describing.</p>

<p>First of all, GPL requires you to provide your code <strong>upon request</strong> only to the people you have distributed GPL binaries to.</p>
<p>Now does your code need to be GPL in the first place?</p>
<p>In case you are using the MIT API of a GPL program, then your code likely doesn't have to be GPL but you shouldn't distribute the GPL parts together with your program as a bundle (unless allowed by some project modification of GPL).</p>
<p>In case your program supports multiple backends (lets call the GPL program you are using a backend) or is useful also without a backend, you can distribute your program without the GPL backend and let user locally install it (maybe with a script provided by you), then again you don't have to open source your code.</p>

licensing open-source-software gpl