Installation
There are two halves to install. The server side is the kraken broker, optionally with @nolag/core; you run those yourself, and Self-Hosting covers them. This page covers the client side: the SDKs your applications import.
Client SDKs
npm install @nolag/js-sdkOther package managers work the same way:
yarn add @nolag/js-sdk| SDK | Package | Checked against | Requirements |
|---|---|---|---|
| JavaScript and TypeScript | @nolag/js-sdk | 1.14.0 | Node.js 18 or later, or a modern browser. Ships its own TypeScript types. |
| React Native | @nolag/react-native | 1.0.0 | React Native 0.71 or later, with @nolag/js-sdk alongside it |
| Python | nolag | 2.6.0 | Python 3.10 or later, asyncio |
| Go | github.com/NoLagApp/go-sdk | v0.5.0 | Go 1.21 or later |
For React Native, install both packages. @nolag/react-native adds app lifecycle, network and polyfill handling on top of the core SDK:
npm install @nolag/react-native @nolag/js-sdk
Point the SDK at your broker
Every client passes the address of your kraken broker. The SDKs still carry the retired NoLag Cloud broker as their built-in default, so a client created without a URL will not connect.
import { NoLag } from "@nolag/js-sdk";
const client = NoLag(token, { url: "ws://localhost:8080/ws" });
await client.connect();Use ws:// against a broker on your own machine. In production, kraken sits behind a reverse proxy that terminates TLS, and clients connect with wss://. See the Production Checklist.
Blueprint SDKs
Blueprint SDKs wrap the JavaScript SDK with an API for one kind of feature. Each one attaches to a @nolag/js-sdk client that your app creates and connects, so install both:
npm install @nolag/js-sdk @nolag/chat
| Package | For |
|---|---|
@nolag/chat | Multi-room chat: messages, typing indicators, presence and unread counts |
@nolag/collab | Collaboration: document operations, cursors and idle awareness |
@nolag/dash | Live dashboards: streaming metrics and widget snapshots |
@nolag/feed | Activity feeds: posts, likes and comments |
@nolag/iot | Device telemetry and commands with acknowledgements |
@nolag/notify | Notifications with read and unread tracking and badge counts |
@nolag/queue | Job queues with progress updates and load-balanced workers |
@nolag/signal | WebRTC signalling: peer discovery, offers, answers and ICE candidates |
@nolag/stream | Live stream engagement: comments, reactions, polls and viewer counts |
@nolag/sync | Document sync with version tracking and last-writer-wins conflicts |
@nolag/track | Vehicle and asset tracking with client-side geofencing |
All eleven were at version 1.2.0 when these docs were checked, and each declares @nolag/js-sdk 1.12.0 or later as a peer dependency. Two Blueprint SDKs exist outside JavaScript: nolag-signal on PyPI and github.com/NoLagApp/nolag-iot-go for Go.
Each Blueprint SDK uses its own topics, and the tokens you issue have to grant them. The page for each one lists the topics to grant.
The server side
| Component | How to get it |
|---|---|
| kraken | Build from source with Docker: git clone --branch v0.9.0 https://github.com/NoLagApp/kraken.git, then docker compose up -d --build. See the Quick Start. |
@nolag/core | npm install @nolag/core to mount it in a NestJS host of your own, or clone nolag-core for the example host, admin UI and quickstart. See Full Stack. |