Skip to: Site menu | Main content

niouz NNTP Server

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: one Ruby file, no dependencies outside Ruby 1.8, very simple setup.

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 Work, 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.

Availability

Requirements

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 libwebrick-ruby1.8.

Installation and configuration

  1. Get it:
    $ wget -O /usr/local/bin/niouz http://pcdavid.net/software/niouz/niouz.rb
    $ chmod a+x /usr/local/bin/niouz
  2. Create a place for the articles:

    $ mkdir -p /srv/niouz/articles

  3. 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
    ^D
  4. Run it:

    $ su -c /usr/local/bin/niouz /srv/niouz

  5. 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 restart.

Features

Limitations

Future plans

I don’t have enough time to continue niouz development. Although there are lots of things which could be improved and added, it has reached the point where it solves my initial problem well enough.

If someone is interested in taking over the project, please contact me.