Skip to main content
Back to Glossary (O)
Glossary · O

Open-Source Licence.

An open-source licence sets out the conditions under which open-source software may be used, modified and distributed. Common licences are MIT, Apache-2.0 and GPL or AGPL. They differ mainly in whether you must also disclose your own changes. For texts and images, Creative Commons (such as CC-BY) is often used.

Illustration of "Open-Source Licence": Document "Open-source licences · obligations" Open-source licences · obl…LicenceKey obligationMITKeep noticeApache-2.0Notice + NOTICE fileAGPL-3.0Source even for web ap…CC-BY-4.0Attribution

Open-Source Licence — Explained in Detail

Code on GitHub is visible but not automatically free to use. Without a licence, copyright applies: all rights rest with the author, use only with permission. Only an open-source licence grants that permission generally, usually in a file called LICENSE in the root folder. Licences fall broadly into two families. Permissive licences such as MIT and Apache-2.0 allow almost anything as long as the licence notice is retained. Copyleft licences such as GPL and AGPL require derived software to be distributed under the same licence.

MIT is the shortest and most widespread licence: use, modify, sell, even in closed software, as long as the copyright notice and licence text are included. Apache-2.0 is similarly permissive but also explicitly covers contributors' patent rights and requires changes to be marked and any NOTICE file to be included. The GPL requires anyone who distributes derived software to make its source code available under the GPL as well. AGPL-3.0 goes one step further: the obligation also applies when modified software is offered to users only over a network, for example as a web app.

Creative Commons is intended for content, not software: texts, images, data. CC-BY allows any use with attribution; variants such as CC-BY-NC exclude commercial use, and CC-BY-SA requires sharing under the same terms. Particular care is needed with AI models: a model's code may be under MIT while the model weights have their own licence with restrictions, for example non-commercial only or with usage rules. This affects local tools for text-to-speech and image generation in particular.

For companies this means in practice: read the licence before incorporating third-party code, and record which libraries under which licence are in the project. With MIT and Apache, including the licence notices is usually enough. With AGPL components in your own web app, clarify beforehand whether changes would have to be disclosed. When commissioning software, the contract should specify which open-source parts are included and who owns the custom code, see custom software. This overview is not legal advice; if anything is unclear, a specialist should review the specific licence.

The key licences at a glance

MIT: very permissive, commercial use and closed further development allowed, licence notice must remain. Apache-2.0: permissive like MIT, plus an explicit patent licence, marking of changes and a NOTICE file. GPL-3.0: copyleft; anyone who distributes derived software must make the source code available under the GPL. AGPL-3.0: like GPL, but also for use over a network, and therefore relevant for web apps and SaaS. CC-BY-4.0: for content, use with attribution.

If a repository has no licence file, you may not simply take the code, even if it is publicly visible. The same applies to agent skills and templates from other people's repositories. How we document dependencies in client projects is described on custom software Switzerland and web app development.

Example: a start-up and an AGPL library

A constructed example: a Zurich start-up is building a web app for club administration and wants to use an open-source library for calendar functions. The library is licensed under AGPL-3.0. The team plans to modify it and offer the app as a subscription, but not to publish its own code.

The review reveals that because the modified library is offered to users over the network, the AGPL could require disclosure of the source code of the changes and, depending on the integration, of further parts. The team therefore chooses a comparable library under the MIT licence. Alternatively, it could have asked the author for a commercial licence, which some projects offer in addition. The decision is documented in the project.

Related Page

Vendor Lock-in

Frequently Asked Questions About Open-Source Licence

Only within the terms of the licence. With MIT and Apache-2.0 this is almost always possible as long as licence notices are included. With GPL and AGPL, disclosure obligations can arise. Without a licence file, use is generally not permitted.

Both require derived software to be distributed under the same licence with source code. The GPL applies when the software is distributed; the AGPL additionally applies when modified software is offered to users over a network, for example as a web app.

Yes, CC-BY also allows commercial use but requires correct attribution with the licence stated. Variants with NC exclude commercial use; variants with SA require sharing under the same terms. The exact designation is therefore decisive.

Ready for Your Project?

Apply this knowledge to your website — DLM Digital will help you.