In which of the following situations can I use a GPL component in my website without having to GPL or disclose the source code of my entire site?

  1. The component is a JavaScript library that goes into one page.

  2. The component is an executable program called by the backend via something like System.run("component.exe").

  3. The component is a dynamic link library invoked at runtime by the backend.

  4. The component is a static library linked at build time with the backend.

Note that I only intend to use the GPL component to support the features in my site, not to modify or distribute the GPL component for others to use.

  • 1
    Which version of the GPL ?
    – ivanivan
    Oct 29, 2017 at 17:11

1 Answer 1


The GPL only triggers when you distribute a program that is derivative of the GPL'ed program, e.g. by linking to it. You are free to run a GPL-licensed program without having to accept the license.

  • If the GPL'ed program is client-side JavaScript, then you are distributing the GPL'ed code and possibly derivative code to your visitors. You are only allowed to do this in accordance with the GPL. Whether your website is a derivative work of the GPL'ed code depends on what this code is and how you are using it.

    Simple example: you have a single-page web-application. Your JS code uses a GPL'ed widget or library. Therefore, your SPA falls under the GPL and you are required to make your source code available in accordance with the GPL.

  • If you are calling a separate executable where that executable is subject to the GPL, you are very likely not creating a derived work.

    Example: Your server invokes the GNU wget command line tool to archive some web page. Since this is an entirely independent program from your code, your server code is not affected by the GPL.

  • If you are linking with GPL'ed code dynamically or statically then you can run this combined work, but may only distribute/publish it under the terms of the GPL. Deployment to servers under your control is not distribution.

    Example: Your server-side code builds upon a GPL'ed library. Therefore, your server-side code is a derived work of the GPL'ed code. If you publish your program, you can do so only under the terms of the GPL. Running a publicly available server is not the same as publishing the server program, so you have no further restrictions.

Note that the GPL contains a family of licenses. Different versions of the GPL have different specific details and terminology. But they all share the same spirit. The LGPL licenses are a more liberal variant of the GPL, e.g. they allow you to link to LGPL'ed code under certain circumstances. The AGPL license gives end-users of web applications similar freedoms to end-users of normal applications. When running AGPL'ed software this answer does not apply as you are subject to additional requirements.

  • What if instead of an SPA, I have a traditional website which just uses the public API of the Javascript component?
    – mljrg
    Oct 21, 2017 at 15:58
  • Are my AWS servers considered as "servers under your control" ?
    – mljrg
    Oct 21, 2017 at 15:59
  • 5
    The GPL is not concerned with whether you only use the public API. If you're calling JS functions that probably means you've got a derivative work, but this is a tricky subject and there isn't a general answer. Yes, cloud deployment is not necessarily distribution as far as the GPL is concerned. The GPLv3 makes the conditions quite explicit (“Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.”)
    – amon
    Oct 21, 2017 at 16:07
  • is it possible to use gpl3 component in android app? as any one can get source code of apk. or i have to share server side code too?
    – Amit
    Mar 30, 2018 at 9:37
  • @Amit If you use GPLv3 code in an Android app, you can only publish that app under the GPLv3 and you must share your source code (decompiled APKs are not the same as source code!). If you use GPLv3 code on the server side, you probably have no restrictions as explained by my above answer.
    – amon
    Mar 30, 2018 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.