Mercure documentation
Mercure is a real-time protocol built on HTTP and Server-Sent Events. The reference hub is open-source (AGPL-3.0), production-ready, and used to push billions of messages a month.
This documentation covers the protocol and the Mercure.rocks Hub for the 1.0 release. If you're upgrading from 0.x, start with the upgrade guide.
Get started with Mercure
Introduction: what Mercure is and when to reach for it
Quickstart: running hub, first subscription, first update in five minutes
Installation: binary, Docker, Compose, Kubernetes, AUR
Mercure core concepts
Topics and matchers: how subscribers say what they want
Subscribing: the SSE side
Publishing: the POST side
Authorization: OAuth 2.0 access tokens,
authorization_details, cookiesDiscovery: finding the hub and its protected resource metadata
Reconnection and history:
Last-Event-ID, replayActive subscriptions: presence and the subscription API
Encryption: JWE end-to-end
Mercure use cases
Mercure hub deployment
Configuration: Caddyfile directives and environment variables
Reverse proxies: NGINX and Traefik
Running Mercure in production
High availability: scaling beyond one node
Rolling updates: graceful shutdown for SSE
Tracing: OpenTelemetry spans
Mercure protocol reference
Protocol: the IETF specification
Mercure ecosystem
Awesome Mercure: libraries, integrations, demos
Mercure support and community
GitHub Discussions for community questions
Cloud and Enterprise support: contact@mercure.rocks