PubNub is a hosted real-time messaging platform: publish and subscribe channels, presence and push delivered over a global network. It is proprietary, billed by usage. Open-source replacements give you the same publish/subscribe model on your own servers, but you run the infrastructure and handle scaling yourself.
Every tool below is under an OSI-approved licence (Apache-2.0, MIT or AGPL-3.0), checked against its repository. EMQX, a popular MQTT broker, moved to the Business Source License and is listed separately at the end.
Licences checked against each repository on November 7, 2026.
What you're replacing
•Publish/subscribe channels for web and mobile clients
Best for: Closest drop-in real-time messaging server
An open-source scalable real-time messaging server. Clients connect over WebSocket and other transports and subscribe to channels while your backend publishes through an API.
A protocol for pushing live updates to browsers and other HTTP clients, with a free reference hub written in Go. The managed hub on mercure.rocks is a separate paid service.
A simple, secure and performant communications system for digital systems, services and devices. Strong for service-to-service messaging; browser clients typically connect through its WebSocket support.
One email a week with the open-source projects, launches and releases added to TechLogHub. Unsubscribe in one click.
Get the TechLogHub digest
One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.
How to choose
If you need…
Start with
A standalone pub/sub server with channels
Centrifugo
Real-time events in a Node.js app
Socket.IO
One-way live updates over HTTP
Mercure
Messaging between backend services
NATS
Realtime on a Postgres-based stack
Supabase Realtime
Existing Pusher clients
Soketi
Often called open source, but aren't
Public source code, but under licences the Open Source Initiative doesn't approve. Fine to use; read the terms first.
EMQX(Business Source License 1.1)
Source is public, but since version 5.9.0 the project moved from Apache-2.0 to BSL 1.1, and multi-node clusters need a licence file. BSL is not an OSI-approved licence.
Open-source PubNub alternatives: FAQ
Quick answers to common questions
Is there an open-source alternative to PubNub?
Yes. Centrifugo (Apache-2.0) is a standalone real-time messaging server with channel subscriptions, and is the closest open-source analogue. Socket.IO, NATS and others cover different parts of the same job.
Can I self-host a PubNub replacement?
All six tools here are self-hostable. Centrifugo, Mercure and Soketi are deployed as servers or containers; Socket.IO is embedded into your own application.
Is EMQX open source?
Not any more. The repository states that from version 5.9.0 it uses the Business Source License 1.1, which is not OSI-approved.
Which option supports presence?
Supabase Realtime lists tracking and synchronising shared state among its features. Check each project's docs for presence support before committing to one.
What do I lose by leaving a hosted service?
You take on scaling, monitoring and uptime yourself. PubNub's managed global network has no direct open-source equivalent, so plan capacity for peak connection counts.
Maintain an open-source PubNub alternative?
List it on TechLogHub and we'll review it for this page.