News Leafsite mini-HOWTO
This HOWTO will help you to configure a small leafsite for Usenet News
using the free software package Leafnode. For any questions,
suggestions and comments, please write to Florian Kuehnert
(firstname.lastname@example.org). Please send any bugs you found in this document to me
as well. (C) 1998 by Florian Kuehnert.
In normal cases if you want to read news offline on your local computer
you have to install a news server software like INN or CNews. Also you
are in the need for an nntp or uucp connection to your newsfeed. In
fact that such packages contain much more features than you need, you
run better by installing Leafnode.
Leafnode is much simpler to use and very small but there are some
disadvantages: Leafnode is slow and loses news in about any error
situation. That's why you shouldn't use it for a big news server,
nevertheless, itīs appropriate for private users who donīt want spend
much time configuring INN.
Leafnode is available at
ftp://ftp.troll.no/pub/freebies/ and has been developed by
Arnt Gulbrandsen, an employee of Troll Tech AS. The recent version is
1.4 and in some distributions (for example Debian), Leafnode is
included. However, be sure to use at least version
1.4 as several critical bugs were fixed.
A small installation help comes with the package, but let's do it
together :-) -- If Leafnode >=1.4 is shipped with your distribution,
it would be the wisest to use the pre-compiled version and leave out
the steps 1 to 4.
1.) Be sure that there is no other news server running on your
computer. When you type
$ telnet localhost nntp
you should get an error message. If you get a connection get back to the
prompt of your shell, you should uninstall INN, CNews or whatever you're
running now and comment out the nntp-line in your /etc/inetd.conf.
2.) Make sure that there is a user called "news", check in
/etc/password for the name. If there isn't, create one (either typing
$ adduser news
or using a tool shipped with your distribution).
3.) Unpack the sources:
$ tar xfz leafnode-1.4.tar.gz
and change into the source directory
$ cd leafnode-1.4
4.) Compile the program and install it
$ make; make install
5.) Edit /usr/lib/leafnode/config (it may be on any other place like
/etc/leafnode when you use a pre-compiled version of your Linux
distribution). The line "server =" should point to the news server of
6.) Edit /etc/nntpserver. It should include your local hostname
(localhost or whatever your computer name is, the command hostname
should help you). If in some startup file like /etc/profile or
/.bash_profile the environment variable is defined, you should
adjust to your computerīs name as well.
7.) Edit the /etc/inetd.conf: Make sure that there is no line beginning
with "nntp". If there is such a line, comment it out putting a "#"
before it. Then add the following line:
nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode
When someone (for example you :-) connects to your computer on the
NNTP port, leafnode is started as server process.
8.) Go online and run the program "fetch" as root or news. The first time
fetch is started, it will download a list of your ISP's newsgroups. This
may take some time depending on the speed on your connection and the
number of groups your ISP has in its active-File.
9.) Start your favorite newsreader (slrn, (r)tin and knews are not a
bad start) and subscribe to all your groups you read. Be careful not
just to subscribe these groups, but also to enter them, even when
10.) Start fetch again to download all the news of the groups want to
Now you have got a working news system up and running, but there are
still some things to do. You may edit the file /usr/lib/leafnode/config
to set the expire dates of your groups. This number means, when old
messages should be deleted. The standard time of 20 days is much often
too long if you read some groups with much traffic, 4 days or a week
are in most cases a good time for your system. You may change the value
for all groups ("expire = n" to hold all groups n days), but you tell
leafnode to change this time for some separate groups writing
groupexpire foo.bar n
to set the expire time for the group foo.bar to n days.
This setting alone won't make leafnode deleting old messages, a
separate program is responsible for this: texpire. It may be started
as a cron job or by command line. If your computer is up all the time,
you may want to add the following line to news' crontab file (to edit
it, log in as news and type "crontab -e" or as type root "crontab -u
0 19 * * * /usr/local/sbin/texpire
This line causes the cron daemon to star texpire every day at
19:00. Check the crontab manual page for further adjustment. If
your computer is not regularly switched on, you may start texpire
just from time to time, when you notice that fetch gets slower. It
works fine as with the "cron-method".
Leafnode is a "real" NNTP server, which means that you can also login
from a different computer (via Internet, the local network
etc.). Every time you enter a group in your newsreader, your reader
sends the information to leafnode and requests it. If the group does
not exist, leafnode will create an empty file
/var/spool/news/interesting.groups, named like the group. When you run
fetch the next time, it will fetch the messages of the group. If a
newsgroup has not been visited for a certain time, leafnode will stop
to fetch its articles and delete its name in
/var/spool/news/interesting.groups. So if you just subscribed to a
high traffic newsgroup by accident, you may delete its file there by
hand for that you won't have to download all the postings there for
the next week.
A week is not enough for you? You want to go on holiday for three weeks
and still get news? Unfortunately, there is no option in leafnode to
change it. But you can edit the file leafnode.h and recompile it. The
#defined constants are TIMEOUT_LONG and TIMEOUT_SHORT, just set the
time in seconds up. Another, simpler solution is to define a cron-job
that does "touch /var/spool/news/interesting.groups/*" every night.
If you want to get a list of all avaible groups, look into the file
/usr/lib/leafnode/groupinfo, where you will find a short description
on the group.
If you want to re-read the list of newsgroups from your newsfeed (for
example when you want to read a new group), just delete the file
/var/spool/news/active.read. Fetch will create it the next time and
get the new list. Fetch will also re-read the grouplist from time to
time, so you don't have to do it by hand.
There is not *the* newsreader for Linux, like there is not *the*
editor. My favourite newsreader is emacs in gnus mode which is the
most configurable reader for Linux. Many people are using slrn and
tin on a terminal, many people use knews under X. There are also trn,
nn and a lot more reader, so just try what you like. The only reader
you shouldn't use is Netscape, it is big, feature-less, unstable, and
it creates sometimes broken postings. However, it is your personal
Anyway, knews is no bad idea for your first experiences as it is very
user-friendly and easy to understand.
Some documentation is provided with the Leafnode package (read the
files INSTALL and README, the sources are also quite interesting). If
you want to know more about "professional" and "big" news servers,
check the INN FAQ (they are provided with the INN package). To get
information about your newsreader, type man "name of your newsreader"
or check for other files in /usr/doc.
If you have any questions concerning the news system, just ask in an
appropriate newsgroup (look in the news.software.ALL hierarchy).
If you have any question, comments or corrections concerning this
HOWTO, just write to me (email@example.com).
This document is Copyright(c) 1995, Florian Keuhnert.
It is distributed under the GNU Free Documentation License, which you
should have received with it. You can also read it at
I would like to thank Michael Schulz (firstname.lastname@example.org)
for his help concerning some language problems and Cornelius Krasel
(email@example.com) for his "touch *"-trick.