Mercure license
Short version:
- The Mercure protocol is open. Anyone can implement it, including in proprietary software.
- The Mercure.rocks Hub is licensed under AGPL-3.0 with the Mercure Library Exception. If you distribute a modified hub or let users interact with a modified hub over a network, you must offer the corresponding source under the license's terms.
- Applications that embed the hub as a Go library can keep their own license, as long as changes to Mercure itself are shared.
- Independent applications that use the hub over HTTP can keep their own license: proprietary, MIT, GPL, or another license. Publishing and subscribing do not make your application AGPL.
- For organizations that need different terms, commercial licenses are available.
#The Mercure protocol license
The Mercure specification is published with the IETF's copyright and legal notices. You can implement the protocol independently, including in proprietary software. The hub's AGPL license applies to its implementation, not to the protocol itself.
#The Mercure.rocks reference hub license
The Mercure.rocks Hub (this repository) is AGPL-3.0, with the Mercure Library Exception.
In practice:
- Running the hub. You can use it for personal or commercial projects.
- Modifying the hub. If you convey a modified version, or users interact with it remotely over a network, you must provide its Corresponding Source as required by the AGPL.
- Publishers and subscribers. A proprietary backend that publishes over HTTP to a Mercure hub stays proprietary. The same applies to independent subscriber applications.
- Embedding the hub. See below.
#Embedding the hub in your application
The Mercure Library Exception lets you import the github.com/dunglas/mercure and github.com/dunglas/mercure/caddy Go packages into your own program, including a single statically linked binary or a program in another language that calls them through bindings, and keep your program under the license of your choice:
- Your code stays yours. Code that only uses Mercure's exported API doesn't have to be released, whether you distribute the binary or run it as a network service. Copying Mercure's code or reaching its unexported internals doesn't qualify.
- Unmodified Mercure needs a notice. Ship a notice naming the Mercure module path and version, with a link to its source.
- Changes to Mercure are shared. If you modify Mercure's own files, license your changes under the AGPL with this exception, and offer the modified Mercure source to the people who receive your program and to its network users.
- Hub products are excluded. The exception doesn't cover programs, services or features whose primary function is letting third parties publish or receive updates for their own applications, such as a hub distribution or a hosted hub service. Serving the applications you develop, including ones you distribute, is fine.
- Transports are excluded. The exception doesn't cover code that stores, dispatches or replays updates for Mercure, such as an implementation of its
Transportinterfaces. Wrapping a built-in transport only to log, measure or trace calls is fine.
Hub products and transports need full AGPL compliance or a commercial license. The exception applies to releases that include it in their COPYRIGHT file, which holds the full text. You may remove it from your copies, which are then under the plain AGPL.
#Commercial licenses
Mercure Enterprise, available through Self-Hosted plans, includes a commercial license, multi-node transports, and direct support. Run the hub on your infrastructure with Redis/Valkey, PostgreSQL, Kafka, or Pulsar. Compare plans for current prices and support terms.
For custom licensing, contact contact@mercure.rocks. Your legal team can review the commercial terms before purchase.
Prefer managed hosting? Mercure Cloud lets you use Mercure without installing or maintaining a hub.
#Mercure trademarks
"Mercure" and "Mercure.rocks" are trademarks of Dunglas Services SAS. The AGPL does not license these trademarks. Contact contact@mercure.rocks for permission to use them in your product's name or branding. Compatible implementations may describe themselves as "compatible with the Mercure protocol."
#Contributing to the Mercure.rocks hub
Contributions are welcome under AGPL-3.0 with the Mercure Library Exception. On your first pull request, the CLA assistant asks you to sign the Contributor License Agreement. It grants Kévin Dunglas a license to your contribution with the right to sublicense it, so the hub can be offered under the AGPL with the exception and under commercial licenses. See CONTRIBUTING.md for the development workflow.
#Mercure patent grant
The AGPL-3.0 includes an explicit patent grant from contributors. The protocol itself, published as an IETF Internet-Draft, is subject to the IETF's patent policy.
#Mercure licensing questions
For licensing questions that aren't answered here, email contact@mercure.rocks.