Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
86 lines (65 sloc) 3.19 KB

niouz is a small, simple NNTP server suitable to set up private newsgroups for an intranet or workgroup.

What’s niouz ?

niouz is an extremely simple NNTP server implemented in pure
Ruby. It does not offer all the features of standard NNTP
servers like CNews or INN (most notably, it can’t communicate with other servers, but only
with clients), but it is orders of magnitudes simpler to deploy.

niouz provides a simple and easy way to quickly set up private newsgroups for a small
group of people. It generally does the Simplest Thing That Can Possibly
, and would probably
not scale beyond a few dozen users and a few thousands messages. On the other hand, the
resulting code is quite small (about 600 lines including comments), easy to understand and
to modify/extend.

It’s been used internally in the research department I worked in for more than two years
now, and it seems quite stable (no data loss, no server crash ever) although given the low
number of users and messages, it’s difficult to be sure how much load it can handle.



Beware Debian users. The Debian package named ruby1.8 does not contain Ruby’s standard
library. You need to install WEBrick explicitely. The package is named

Installation and configuration

  1. Get it from
    $ chmod a+x /usr/local/bin/niouz
  2. Create a place for the articles:
$ mkdir -p /srv/niouz/articles
  1. Create the groups:

    $ cat > /srv/niouz/newsgroups
    Name: test
    Date-Created: 2004-08-24
    Description: blah blah

Name: projects.foobar
Date-Created: 2004-08-24
Description: Discussion related to project foobar

  1. Run it:
$ su -c /usr/local/bin/niouz /srv/niouz
  1. Enjoy!

By default, it listens to port 119, so you need to be root to run it. It you don’t like
that, just edit the script to change the port.

If you want to add new groups, just kill the process, edit the newsgroups file and


  • One file, no dependencies outside Ruby 1.8, very easy to setup.
  • Small (less than 600 lines), simple code, easy to customize/extend.
  • Generally does The Simplest Thing That Could Possibly Work.
  • (Too) simple database format; easy to hack if necessary.
  • Implements all the basic NTTP commands, plus some extensions (some partially, but well
    enough for most clients).
  • Works with all major clients.
  • Never forgets/expires articles.
  • Lots of room for expansion! :-)


  • Does not interact with other NNTP servers (by design).
  • Probably does not scale very well.
  • Stays in memory (no inetd mode).
  • Only tested under Linux.
  • Some relatively standard NNTP extensions are not supported, most importantly article
    cancellation and authentification.