Nchan Pub/Sub Message Server

AWS Streaming & Messaging

publish over HTTP, deliver instantly over WebSocket, EventSource or long polling

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 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 instance 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.

Why the cloudimg image

cloudimg ships Nchan as a complete, working message server rather than a module you still have to compile and configure: a publisher endpoint, a subscriber endpoint serving all three transports, a loopback only statistics endpoint and a health endpoint are already wired up. Nchan ships nothing authenticated, so both the publisher and subscriber endpoints are placed behind a credential generated uniquely on each instance's first boot and never baked into the image, and the statistics endpoint is restricted to the instance itself. A bundled self test publishes a message and confirms delivery across all three transports, and nginx and the Nchan module are ordinary distribution packages kept current by normal security updates with nothing pinned. Backed by a paired deployment guide and 24/7 cloudimg support.

Common uses

  • Push live updates to dashboards and browsers without polling
  • Deliver notifications, activity feeds and chat over WebSocket, SSE or long polling
  • Fan out job progress and real time events from your application over HTTP

Key features

  • Ready-to-run pub/sub server the moment the instance boots. Publish over HTTP and deliver instantly over WebSocket, EventSource, or long polling from one subscriber endpoint. Preconfigured retention keeps one hundred messages per channel for up to one hour, and late-connecting subscribers receive the full buffered backlog. A bundled self-test command verifies end-to-end delivery across all three transports on demand.
  • Secure by default where the software is not. Both publisher and subscriber endpoints sit behind a credential generated uniquely on each instance's first boot - never baked into the image, never shared between instances. The statistics endpoint is restricted to loopback only, preventing external exposure of channel names and subscriber counts. Both endpoints fail closed until the per-instance credential exists.
  • 24/7 expert support from cloudimg engineers who assist with publishing, subscribing on each transport, tuning retention, replacing basic-auth with your application's authorization via nchan_authorize_request, and TLS termination with Certbot or ALB. nginx and Nchan are installed as standard distribution packages so normal security updates apply with nothing pinned or held back.

Description

This is a repackaged open source software product wherein additional charges apply for cloudimg support services.

## Nchan - Production-Ready Publish and Subscribe Message Server AMI

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 POST, and Nchan delivers it immediately to every connected client over WebSocket, EventSource (Server-Sent Events), or long polling - whichever the client requests. Because the delivery layer is nginx itself, a single instance holds a very large number of idle connections while your application never maintains a persistent real-time socket.

This AMI delivers a complete, working message server within minutes of launch - not a module you still have to compile and configure.

## Who This Is For

  • Teams building live dashboards, notifications, activity feeds, or chat
  • Developers adding collaborative editing or job-progress updates to existing apps
  • Anyone who needs to push data to browsers or mobile clients without polling
  • Organizations that want pub/sub without managing Redis clusters or external brokers

## Why This AMI Over a Manual Install

Instant time-to-value: A wired-up, hardened pub/sub server the moment the instance boots. No source build, no module/ABI juggling, no per-location configuration required.

Secure where the software is not: Nchan endpoints are unauthenticated by default, meaning an open publisher lets anyone inject messages into any channel and an open subscriber leaks every message. This image puts both endpoints behind a credential generated uniquely on each instance's first boot - never baked into the image - so no two instances share one. The statistics endpoint is restricted to loopback only.

Proven, not merely listening: A bundled self-test command publishes a message and confirms delivery across all three transports, so you can verify end-to-end function at any time.

## Application Stack

  • nginx (BSD-2-Clause) as the front door on port 80
  • Nchan dynamic module (libnginx-mod-nchan 1.3.6, MIT) loaded into nginx and pinned to the distribution nginx ABI
  • In-memory memstore for channel storage (no external Redis required for single-instance use)
  • Dependency-free WebSocket subscriber and shipped self-test proving publish/receive across all three transports
  • First-boot systemd oneshot that mints a per-instance credential, resolves the public IP, and writes a root-only instance info file

## Preconfigured Defaults

  • One hundred messages retained per channel for up to one hour
  • Late-connecting subscribers receive the full buffered backlog
  • Publisher endpoint, subscriber endpoint (all three transports), loopback statistics endpoint, and health endpoint ready immediately

## Security Posture

  • No baked credential: htpasswd generated per instance on first boot; both endpoints fail closed until it exists
  • Both endpoints authenticated: publisher and subscriber sit behind nginx basic-auth by default
  • Statistics restricted: nchan_stub_status bound to loopback only - channel names and subscriber counts never exposed externally
  • Nothing pinned or held back: nginx and Nchan are standard distribution packages; ordinary security updates keep them current

## Deployment Quickstart

1. Launch the AMI on an m5.large or larger EC2 instance

2. Open port 80 in your security group (and port 22 for SSH)

3. SSH in and read /root/nchan-info.txt for this instance's publisher credential and endpoints

4. Publish a message: POST http://your-instance-ip/pub/channel-name with basic auth

5. Subscribe over WebSocket, EventSource, or long polling: GET http://your-instance-ip/sub/channel-name with basic auth

6. Run sudo /usr/local/sbin/nchan-selftest to confirm end-to-end delivery

## Get Started Quickly

Need help integrating TLS termination, replacing basic-auth with your application's authorization layer, or tuning retention for your workload? cloudimg support is available 24/7 to help you go from launch to production as quickly as possible.

## About Nchan Upstream

Nchan is a mature, actively maintained project. The most recent upstream release is version 1.3.8 (February 2026), following version 1.3.7 (September 2024). This AMI ships version 1.3.6 as packaged and security-maintained by the underlying Linux distribution.

## About cloudimg

cloudimg publishes and maintains production-ready images across AWS and Azure Marketplace, built from a hardened, fully patched base and backed by 24/7 engineering support.

All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

Related technologies

nchan pub sub servernginx websocket amipublish subscribe awsserver sent events ssereal time messaging ec2long polling serverwebsocket push notificationsnginx event stream modulelive dashboard serverchat message broker ami