Nchan Pub/Sub Message Server on Ubuntu 24.04

Azure Streaming & Messaging

Nchan, a publish and subscribe message server that delivers messages published over HTTP to subscribers over WebSocket, EventSource or long polling, with both endpoints protected by a credential generated on first boot.

Base
Hardened build
minimal ports, security patches applied at build time
Access
Unique credentials
generated on first boot, readable only by root
Verified
Boots working
services pass a health gate before release
Support
24/7, 365 days
by email and live chat, 24 hour response SLA

Overview

Nchan is an open source publish and subscribe server built as a module for the nginx web server. An application publishes a message to a named channel with an ordinary HTTP request, and Nchan delivers it immediately to every client subscribed to that channel over WebSocket, EventSource (also known as Server Sent Events) or long polling, whichever the client asks for. Because the delivery layer is nginx itself, a single modest machine can hold a very large number of idle connections, and the application never has to keep a real time connection open.

It suits live dashboards, notifications, activity feeds, chat, collaborative editing and job progress updates: any place where data should be pushed to a browser or mobile client without polling. A publisher endpoint, a subscriber endpoint that serves all three transports, a loopback only statistics endpoint and a health endpoint are configured and ready, with message retention limits set so each channel keeps its most recent messages for a bounded window and late subscribers still receive the backlog.

Why the cloudimg image

Nchan endpoints are unauthenticated by default, so an open publisher would let anyone inject messages into any channel and an open subscriber would leak every message to anyone who can guess a channel name. This image puts both endpoints behind authentication, and there is no default password to change: the credential is generated uniquely on each machine's first boot and is never baked into the image, so no two machines share one. The statistics endpoint that would otherwise reveal live channel names and subscriber counts is restricted to the machine itself. Nginx and the Nchan module are installed as standard packages so ordinary security updates keep them current with nothing held back, an included self test publishes a message and confirms it is received over all three transports, and every image ships with a paired deployment guide and 24/7 cloudimg support.

Common uses

  • Pushing live updates to dashboards, notifications and activity feeds without client polling
  • Real time messaging for chat, collaborative editing and job progress over WebSocket, SSE or long polling
  • Offloading persistent client connections from an application to nginx at scale