Nchan Pub/Sub Server on Ubuntu 24.04 by cloudimg
by cloudimg
Publish over HTTP and deliver instantly via WebSocket, EventSource or polling.
Nchan is an open source publish and subscribe server built as a module for nginx. Your 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 holds a very large number of idle connections, and your application never has to keep a real time connection open. It suits live dashboards, notifications, activity feeds, chat, collaborative editing, job progress updates and any place you want to push data to a browser or mobile client without polling.
This image delivers a complete, working message server within minutes of launch, rather than a module you still have to compile and configure. A publisher endpoint, a subscriber endpoint that serves all three transports, a loopback only statistics endpoint and a health endpoint are already configured, with message retention limits set deliberately: each channel keeps its most recent one hundred messages for up to one hour, and a subscriber that connects after a message was published still receives it.
Security is the main reason to start from this image rather than a bare install. Nchan endpoints are unauthenticated by default, which means an open publisher lets anyone inject messages into any channel, and an open subscriber leaks every message to anyone who can guess a channel name. Here both endpoints sit 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, which would otherwise reveal live channel names and subscriber counts, is restricted to the machine itself.
Nginx and the Nchan module are both installed as standard Ubuntu packages, so ordinary Ubuntu security updates keep them current, with nothing pinned or held back. A self test command is included that publishes a message and confirms it is received over all three transports, so you can verify the machine is genuinely delivering messages at any time. The paired cloudimg deployment guide walks through publishing, subscribing on each transport, inspecting channel state, tuning retention and integrating authentication with your own application.
Please note: Nchan is a mature and stable project with a slow release cadence. The most recent upstream release is version 1.3.8, published in February 2026, following version 1.3.7 in September 2024. The project is actively maintained and is not archived. This image ships version 1.3.6 as packaged and security maintained by Ubuntu 24.04 LTS.
cloudimg images are built from a hardened, fully patched base and are backed by 24/7 support.