# Open source license choice for lab code: keeping commercial options open

URL: https://zernyxhub.com/blog/open-source-license-lab-code
Author: Sahil Sheikh, Regd. Patent & Trademark Agent, cRTTP
Published: 2026-11-20
Category: Technology transfer

> Open source license choice for Indian faculty: MIT, Apache 2.0, GPL and AGPL compared, what each means for later licensing, and how to keep commercial options.

**Short answer:** Open source license choice for lab code sets what others may do with it. Permissive licences such as MIT and Apache 2.0 allow commercial use with little obligation. Copyleft licences such as GPL and AGPL require shared changes, which keeps a dual-licensing option open if the institution owns all the code. Agree the choice with the TTO first.

A research group finishes a paper and wants to release its code so others can reproduce the results. A student pushes it to a public repository with a licence chosen from a drop-down menu. Two years later, a company wants to license the code for a product, and the TTO discovers that the licence already lets the company use it for free, or that the student's choice conflicts with a library the code depends on. The licence decision was made in thirty seconds and is very hard to reverse.

This guide compares the common open source licences, explains what each means for later licensing, and sets out how faculty can keep commercial options open.

## How do the common licences compare?

| Licence | Type | Commercial use by others | Must share changes? | Patent terms |
|---|---|---|---|---|
| [MIT](https://opensource.org/license/mit) | Permissive | Allowed, with notice | No | Silent |
| BSD 3-Clause | Permissive | Allowed, with notice | No | Silent |
| [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) | Permissive | Allowed, with notice | No | Express patent licence; ends if the user sues claiming the work infringes a patent |
| MPL 2.0 | Weak copyleft, file level | Allowed | Changes to licensed files | Express patent licence |
| LGPL | Weak copyleft, library level | Allowed | Changes to the library | Version 3 has patent terms |
| [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Strong copyleft | Allowed, but distributed works must be GPL | Yes, when distributed | Express patent licence |
| AGPL 3.0 | Strong copyleft, network | Allowed, but network services running modified versions must offer source | Yes, including over a network | As GPL 3.0 |

Copyleft means anyone who distributes the code, or a work built on it, must release their changes under the same licence. AGPL extends that to software offered as a service over a network. Permissive licences ask only for the copyright notice and licence text to be kept.

**Permissive or copyleft for lab code**
Permissive:
- MIT, BSD, Apache 2.0
- Widest adoption
- Companies can use it free
Copyleft:
- GPL, AGPL
- Changes must be shared
- Leaves room for dual licensing
Choose permissive for adoption, copyleft plus a paid licence when commercial income matters.

## What does each choice mean for later licensing?

| Goal | Suitable choice | Effect on a later commercial licence |
|---|---|---|
| Maximum adoption of a research tool | Apache 2.0 or MIT | Companies need no licence; income comes from support or new versions |
| Shared improvements from users | GPL 3.0 or MPL 2.0 | Companies that distribute products may want a commercial licence instead |
| Cloud or web software | AGPL 3.0 | Companies running it as a service may want a commercial licence |
| Commercial licensing only | No open source release | Full control, fewer users |
| Both adoption and income | Copyleft plus commercial licence (dual) | Works only with clean ownership of all code |

Dual licensing depends on one thing: the institution must own, or have rights to relicense, every line of code. Code written by outsiders under GPL, without an agreement giving the institution relicensing rights, cannot be included in a commercial licence. Our post on [licensing lab software](https://zernyxhub.com/blog/license-university-lab-software) explains ownership of lab code.

## How do you keep commercial options open?

**Releasing lab code without closing doors**
1. Talk to the TTO: Before the first public push
2. Check dependencies: Licences must be compatible
3. Choose the licence: Matched to the goal
4. Set contribution rules: Agreement for outside code
5. Add licence and notices: In every repository

| Step | Why |
|---|---|
| Ask the TTO before release | It may want to file a patent or keep a commercial route |
| Check every dependency's licence | A GPL library can force GPL on the whole program when distributed |
| Use a contributor agreement for outsiders | Keeps relicensing rights for dual licensing |
| Keep the licence file and headers | Makes the terms clear and enforceable |
| Record who wrote what | Supports ownership if a company asks |

Patents need a separate thought. Publishing code is a public disclosure that can destroy novelty for any patent on the method. Section 3(k) of the Patents Act limits software patents in India, but a method with a technical effect may still be patentable, so check with the TTO before publishing. Our post on [Section 3(k)](https://zernyxhub.com/blog/section-3k-software) explains the limits.

## Are dependencies a problem?

Often, yes. Lab code usually builds on many libraries, each with its own licence. Permissive licences mix easily. Strong copyleft libraries, when distributed with your code, can require your whole program to be released under the same licence. Some combinations are incompatible: for example, code under GPL version 2 only cannot be combined with Apache 2.0 code in one distributed program. List every dependency and its licence before choosing yours.

| Your licence | Can include MIT code? | Can include Apache 2.0 code? | Can include GPL 3.0 code? |
|---|---|---|---|
| MIT | Yes | Yes, keeping its notices | Only if the combined work is released under GPL 3.0 |
| Apache 2.0 | Yes | Yes | Only if the combined work is released under GPL 3.0 |
| GPL 3.0 | Yes | Yes | Yes |

## How can AI help?

An AI assistant can list a repository's dependencies, draft a licence notice or summarise the options for a TTO meeting, which the faculty member then checks. TT Co-Pilot is Zernyx's AI assistant for technology transfer, for TTO teams and university faculty, built on Zernyx's proprietary technology licensing dataset.

## Does the institution's IP policy apply to code?

Usually, yes. Many Indian institutional IP policies cover software written by employees and students as part of their work, so the institution may own the code and decide its licence. Check the policy before release, and ask the TTO for written approval of the licence you choose. That record also helps if a company later asks who had the right to release the code.

## A worked example

**Illustration with invented figures.** A lab at a Kolkata institute has a protein structure analysis tool used by other researchers and by two companies.

| Option considered | Outcome |
|---|---|
| Apache 2.0 | Wide use, but companies have no reason to pay |
| GPL 3.0 only | Researchers fine; companies embedding it in products object |
| GPL 3.0 plus commercial licence | Chosen, after contributor agreements from three outside contributors |

In the first year, the tool stays free for research under GPL 3.0. One company takes a commercial licence at ₹4,00,000 a year to embed it in its own software without GPL obligations. The contributor agreements made that possible.

## Common mistakes

- Choosing a licence from a drop-down without asking the TTO.
- Publishing code before deciding on a patent.
- Ignoring dependency licences.
- Accepting outside contributions with no agreement, then trying to dual-license.
- No licence file, which leaves others with no clear right to use the code.

My view: faculty should decide the licence with the TTO before the first public push, because the choice is close to permanent once others rely on the code. The hedge is that a permissive licence is often the right answer for research tools, since adoption and citations matter more than income for many labs.

To see which software technologies companies are looking at, [Zernyx Hub](https://zernyxhub.com/technology-marketplace) has mapped patents from universities across India, and its AI gives business insight on each technology, including its commercial applications.

## Common questions

### Which open source licence is best for university code?

It depends on the goal. For wide adoption of a research tool, a permissive licence such as Apache 2.0 or MIT suits. To keep commercial licensing possible, a copyleft licence such as GPL or AGPL, offered alongside a paid licence, can work if the institution owns every contribution.

### What is the difference between MIT and Apache 2.0?

Both are permissive. Apache 2.0 adds an express patent licence from contributors and ends that licence for anyone who sues over patents in the work. MIT is shorter and says nothing about patents.

### Can code released under GPL also be licensed commercially?

Yes, if the owner holds the rights to all the code. The owner can offer the same code under GPL to the public and under a commercial licence to companies that do not want GPL obligations. This is called dual licensing.

### Can I change the licence later?

The owner can release future versions under a new licence, but code already released stays available under the old one. Changing licence also needs the agreement of every copyright holder, which is hard once outside contributors are involved.

---

Published by Zernyx Hub. More: https://zernyxhub.com/llms.txt
