OPEN SOURCE · SELF-HOSTED · NO VENDOR

Open source realtime,
yours to run.

kraken is an Apache-2.0 WebSocket broker you run on your own servers: pub/sub, rooms, presence, lobbies, filters and multi-tenant access scopes. No licence keys, no usage metering, no vendor to outlive. The SDKs are MIT, and Blueprint SDKs give you chat, notifications, tracking and dashboards on top.

0
licence keys
Apache-2.0 broker and auth core
MIT
client SDKs
JS, React Native, Python, Go
11
Blueprint SDKs
chat, notify, feed, dash, track, and more
Open sourceApache 2.0 One docker compose up and the broker is on ws://localhost:8080/ws.
import { NoLag } from "@nolag/js-sdk";
import { NoLagChat } from "@nolag/chat";

const client = NoLag(TOKEN, { url: "ws://localhost:8080/ws" });
const chat = new NoLagChat({ client, appName: APP_SLUG, username: "Alice" });
await client.connect();
await chat.ready();

const room = chat.joinRoom("general");

room.on("message", (msg) => {
  console.log(`${msg.username}: ${msg.text}`);
});

room.on("typing", ({ users }) => {
  showTyping(users);
});

room.sendMessage("Hello!");
room.startTyping();
TRANSPORT
WebSocket / TCP
CODEC
MessagePack
PROTOCOL
v2
MAX MESSAGE
900KB
QoS LEVELS
0 · 1 · 2
HEARTBEAT
30s
RECONNECT
auto · backoff
Open source Apache 2.0

NoLag is open source. Run as much of it as you need.

Both halves are public: kraken, the broker, and nolag-core, the authorization library behind it. Start with the broker on its own, put it behind the auth service you already have, or run the whole stack on your own machines.

Start here

Broker only

One container, static tokens

Run kraken on its own. Access tokens and their topic grants live in an auth.json file, fan-out runs in-process, and there is no database to set up.

  • Apache 2.0, no licence keys or metering
  • WebSocket on :8080, health check at /health
  • Tokens and topic grants in auth.json
  • Point fan-out at your own MQTT broker to scale
git clone https://github.com/NoLagApp/kraken
cd kraken
docker compose up
Run the broker →

Broker + your auth service

Your users, your rules

Point kraken at an HTTP service you already run. It answers three calls: validate a token on connect, revalidate a live session, and check room access on subscribe.

  • Your user database stays the source of truth
  • Plain JSON over HTTP, three endpoints
  • Decisions cached by the broker for 30 seconds
  • Same SDKs and wire protocol
docker build -t kraken .
docker run -p 8080:8080 \
  -e AUTH_BACKEND=http \
  -e AUTH_HTTP_URL=https://auth.internal \
  kraken
The auth contract →

Full stack with @nolag/core

Projects, apps, rooms and tokens

@nolag/core is the authorization library: projects, apps, rooms, lobbies, access scopes, actors and signing keys, stored in Postgres. Its quickstart is in early development and is meant for trying the stack locally.

  • Postgres, core, kraken and an admin UI
  • Access scopes for multi-tenant isolation
  • Import a whole project from one document
  • One script to start
git clone https://github.com/NoLagApp/nolag-core
cd nolag-core
./quickstart/quickstart.sh
Run the full stack →

Kraken and nolag-core are licensed under Apache 2.0, and the client and Blueprint SDKs under MIT. There is no hosted version: NoLag Cloud was retired in October 2026, so you run the broker yourself. Contributions to kraken are welcome. nolag-core takes issues and bug reports but does not currently accept external code contributions.

Pub/Sub ♦WebSocket ♦Clustering ♦MessagePack ♦Rooms ♦Binary Protocol ♦Retained Messages ♦QoS 0/1/2 ♦Load-Balanced Subscriptions ♦Presence built-in ♦Multi-Tenancy ♦Access Scopes ♦Filters ♦Topic ACLs ♦Webhooks ♦Lobbies ♦Apache 2.0 ♦JS · Python · Go ♦Pub/Sub ♦WebSocket ♦Clustering ♦MessagePack ♦Rooms ♦Binary Protocol ♦Retained Messages ♦QoS 0/1/2 ♦Load-Balanced Subscriptions ♦Presence built-in ♦Multi-Tenancy ♦Access Scopes ♦Filters ♦Topic ACLs ♦Webhooks ♦Lobbies ♦Apache 2.0 ♦JS · Python · Go ♦
01 · MENTAL MODEL

How it works.

NoLag organizes your real-time infrastructure into four levels. Each level serves a distinct purpose, from isolation and limits down to individual message channels.

project
Your product: isolation, limits, and actor boundary
app
A real-time feature: own topics, config, and webhooks
room
Scoped instance: per-user, team, or device data isolation
topic
Message channel: one data type per channel within a room

Actors (your users) are granted access to specific apps. One actor can interact with multiple apps through a single connection.

Learn more →
NAMESPACE EXPLORER18 topics live
◆ logistics-prodproject
chat/general/
└―messages5 sub
└―typing2 sub
└―reactions7 sub
chat/dispatch-team/ PRIVATE
└―messages5 sub
└―typing2 sub
└―presence6 sub
chat/support/
└―messages5 sub
└―log5 sub
02 · WHAT'S IN THE BOX

Everything you'd otherwise build yourself.

Every feature ships in the open-source broker. No add-ons, no "presence is on the Pro plan", no licence keys. Run it and you have the full surface area.

01

Pub/Sub

Topic-based routing on a binary protocol. Wildcards, retained messages, infrastructure-level filters.

↗
02

Presence

Built-in. Per-room, per-lobby, with custom metadata. Joins and leaves are events you subscribe to.

↗
03

QoS 0/1/2

Per-message delivery levels on the hop to an MQTT broker backend. The default in-process broker delivers at most once to connected subscribers.

↗
04

Access Scopes

new

Multi-tenant isolation via topic namespacing. Assign actors to scopes and communication is partitioned automatically.

↗
05

ACL

Per-topic read/write. Roles, actor types (device, user, service, session), scoped tokens.

↗
06

Webhooks

Hydration on subscribe. Triggers on publish. Set per topic in @nolag/core or by your own auth service.

↗
07

Lobbies

Observe presence across many rooms at once. Built for dashboards, ops centers, and admin views.

↗
08

Clustering

Join kraken nodes over Erlang distribution (epmd or DNS discovery), or hand fan-out to an MQTT broker such as EMQX.

↗
09

Load Balancing

Shared subscriptions spread a topic across a worker group, so each message reaches one subscriber.

↗
03 · DELIVERY GUARANTEES

Pick a QoS per message, not per app.

Most brokers force one delivery contract on the whole connection. NoLag attaches QoS to the message itself. Telemetry can fly, payments can wait for the handshake. The levels apply when kraken runs in front of an MQTT broker such as EMQX or Mosquitto.

Acknowledged delivery. May duplicate on retry. The SDK default.

TYPICALLY USED FOR
Chat messages, presence updates, IoT commands.
PROTOCOL HOPS
2
WIRE OVERHEAD
18 B
WIRE SEQUENCE
A
publisher
PUB
ACK
B
subscriber

QoS is honoured on the hop from kraken to an MQTT broker (BROKER_BACKEND=mqtt). The default in-process broker ignores the level: it delivers each message at most once, to subscribers that are connected at the time, with no offline queue.

04 · SECURITY

Shared infrastructure. Isolated data.

Your tenants share one broker, but their data never crosses boundaries. Isolation is enforced at the protocol level, not in application code.

Access Scopes

Multi-tenant isolation via topic namespace partitioning. Assign actors to scopes and communication is partitioned at the broker level.

  • Tenant data partitioned automatically
  • No app-level filtering needed
  • Scopes flow through webhooks

Room-Level Access

With @nolag/core, rooms are public by default and become private when you attach actors. No toggle, no config.

  • Public by default, private when actors attached
  • Per-room data isolation
  • No auth code required

Per-Topic ACL

Granular read/write permissions on every topic. Role-based access control enforced at the broker.

  • Per-topic read/write control
  • Role-based permission grants
  • Enforced at broker, not middleware

Actor-Based Auth

Typed actors (Device, User, Service, Session), each with its own access token and topic grants.

  • Four actor types
  • Token scoping per actor
  • Separate projects per environment
05 · WHAT PEOPLE SHIP

One broker. Five categories. Probably yours.

The same primitives (rooms, topics, presence, filters) adapt to wildly different shapes. Hover to see the wiring.

Chat & messagingtemplate available
Asha
Shipping the prototype now
Ben
Looks great, adding presence
Asha
Filter by user_id?
ben is typing…
+ Topic per channel
+ Presence built-in
+ Typing indicators free

Run the broker. Ship the realtime bit.
Before lunch.

Chat, notifications, tracking, dashboards. One docker compose up, no account, no sign-up. Open source, on your own infrastructure.