Can I use MongoDB as the database for providing a paid service?

MongoDB is licensed under the AGPL, but the drivers I'm using are MIT licensed. Do I have to buy a commercial license for MongoDB or can I use it as a backend for my app?

  • 3
    Have you read the licensing page? – user40980 Jan 30 '14 at 16:45
  • I have, but its unclear, do i have to buy the commercial license or can i use the AGPL3 license but make any changes i make to mongoDB public? also there customer support is confusing! – Ujjaval Jan 30 '14 at 16:52
  • are you making changes to mongodb the application? – user40980 Jan 30 '14 at 16:53
  • No i am not, just using with node.js and its drivers for the backend. – Ujjaval Jan 30 '14 at 16:54
  • 1
    This statement of "we promise" has been removed from the MongoDB website ( as of 2016, maybe earlier ), so it seems they no longer promise. – Brian Bulkowski May 17 '16 at 0:42
up vote 44 down vote accepted

The use of MongoDB as a backend database may be used for commercial web based services and does not require one to GPL or AGPL the web based service. Do note that nothing in the GPL or the AGPL prevents anyone from using the library/database/whatever commercially - just that you need to distribute the source code of the work in its entirety to people you have distributed the work to.

MongoDB recognizes that applications using their database are a separate work:

we promise that your client application which uses the database is a separate work

This means that you don't need to be concerned with the licensing of MongoDB to use it. They'll even send signed letters asserting the promise to legal departments if there are questions (and they'll do commercial licenses if the signed letter isn't enough for the legal department or you live somewhere where such a promise isn't binding).

That said, when a web programmer sees the AGPL, it is indeed right to go "wait, what?" and look closely at what is being used where and what it implies about your source code licensing.

The specifics of why MongoDB is using the AGPL rather than some other, more permissive license stems to commercial companies modifications of MySQL. For Example, Google Cloud uses MySQL in its backend. However, there have been some changes to it (disabling some features... and possibly some optimizations). Since MySQL is under the GPL and has the web services loophole available to it, it doesn't need to submit those changes back to the MySQL community.

MongoDB, by selecting the AGPL, forces that if a company was to do what Google has done with MySQL, any changes would be submitted back to the community.

This is only an issue if you have modified MongoDB from its distribution. If there are no changes to MongoDB, you may use it anyhow you like.

See also: http://www.mongodb.org/about/licensing/

  • 4
    I read the licensing page when it included the firm promise that "your client application is a separate work". It even included an offer to send an official statement to the legal department to that effect. They have since removed that statement from the linked page. I am looking into alternatives. – dhj Feb 10 '16 at 21:27
  • 1
    @dhj I'll look at updating the answer, though the licensing page still explicitly says that only enhancements to the MongoDB are needed to be released while the drivers are under Apache License. While their promise isn't online anymore, the backend database's license doesn't impact the applications that use it (using Oracle doesn't prevent something from GPL, nor does using MySQL require it to be GPL). If in doubt about that, check with the FSF on that subject. – user40980 Feb 10 '16 at 21:32
  • The legal question is whether combining an (unmodified) *GPL file forces the *GPL of a Work. It is already decided case law that adding an unmodified GPL file to a program requires the entire program to be licensed under GPL or better and published, because the simple act of using the code together in one program is a modification. I assume AGPL is similar. What no one knows - until litigation - is whether the combined service is a modification ( as in standard GPL ) or not. We know with GPL that adding a single GPL file to a program forces GPL of the entire project under 2(b) of GPLv2. – Brian Bulkowski May 17 '16 at 0:47
  • I think that AGPL forces you to open source your code, even when your user AGPL library over the network. MongoDB just gives you a promise that they will not be pursuing you if you use MongoDB over the network, without changing anything. Is that right? – Damian Dec 26 '16 at 3:36
  • @user40980: "we promise that your client application which uses the database is a separate work" - they may promise that all they want, but the court of law may take a different view on the matter. – LetMeSOThat4U Jan 11 '17 at 16:14

Disclaimer: IANAL

You can use AGPL programs for anything, including commercial programs. If you make changes to the programs, however, you have to release these changes. As the driver can be considered "part of your work" under GPL terminology, you might have to release the source code when using an AGPL driver.

This is the reason why the DRIVER is not AGPL. So you don´t have to worry, at least as far as my understanding goes.

But again: I am not a lawyer, I might be wrong.

  • 1
    Did you read the licensing page for mongodb? – user40980 Jan 30 '14 at 17:47
  • 1
    @MichaelT What do you want to suggest ? – Ujjaval Jan 30 '14 at 17:56
  • @MichaelT I did read it and the 2nd paragraph of my answer is how I interpret it. – fNek Jan 30 '14 at 18:55
  • Unfortunately that may not be true, there is evidence of other AGPL libraries which owning companies are very clear on telling you, that using it as part of your project means releasing the whole as AGPL or otherwise you need to buy the commercial license, e.g. IText (itextpdf.com/Pricing, look for the section: What about the AGPL license?). Actually the company I currently work for, after doing an extensive analysis decided not to use MongoDB only because of the AGPL stuff. But these things are really not clear until the attorneys come into the picture. – raspacorp Nov 8 '16 at 7:33
  • @raspacorp "But these things are really not clear until the attorneys come into the picture." - that alone is a legal risk that made company where I work now outright ban all the AGPL stuff, even for internal projects. – LetMeSOThat4U Jan 11 '17 at 16:16

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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