Freenet Installation and Administration
Freenet, quite possibly the most exciting file-sharing technology out there, is unfortunately a little difficult to install and administer. Your intrepid author spent a weekend with literally no sleep (strong tea and death metal can do wonders) figuring it out when he first got his hands on it back in September 2000. Fortunately, Freenet's ease of use has come a long way since then. With an hour or two of work, anyone competent in Linux system administration should be able to get their own Freenet node up and running.
The installation of a Java runtime is out of the scope of this article. However, a list of recommended JDKs (Java Development Kit) and some warnings about them can be found in the Resources section.
If you want to run a full-time, contributing node you'll need 100MHz 486 or greater with at least 32MB of RAM. There are no minimum requirements (other than about 1MB for the actual software) for hard drive space, but in this age of 20GB drives, it'd be nice if you set aside a few GBs for Freenet data. For your internet connection, a static IP address or dynamic DNS is required. Anything faster than a dial-up is fine. As for uptime, if your node is on 24/7 you can contribute (downtimes of up to an hour or so are okay, but try to avoid anything more than that). Anything less and your node will still work just fine for you, but you won't be contributing anything to the network.
For a part-time, noncontributing node, similar system and memory requirements apply, but you can use whatever internet connection you like.
First of all, you need to actually download Freenet. Here you have two main options. You can download a binary or choose the source package. If you run Debian, Mr. Bad has created a Debian package (see Resources). Because Freenet is written in Java, you don't have to worry about binary compatibility, so it's easiest simply to download a binary package. After that the question is which version do you want. A release (current is 0.3.5) or CVS copy? You'll probably want to go with a release at first. Do make sure you download the Linux tarball, not the Windows executable.
The Linux version of Freenet doesn't have any installation scripts. Instead you simply untar the tarball into a directory of your choice. Personally I'd suggest creating a special Freenet user and putting the Freenet software and data store in the Freenet user's home directory.
Next you'll want to make your node automatically start at boot up. Unfortunately, not all distributions handle the startup scripts quite the same way. If you want to use dæmontools, follow the instructions at freenet.netunify.com/25. Otherwise, use something like:
su - -c "cd ~/freenet ; rm freenet.log nohup.out ; nohup ./freenet_server & >/dev/null" freenet
This changes the user to the Freenet user. The “-” sets the environment to that of a login shell so the environment is set up as though running from a normal shell. Finally, the command -c changes the directory to the Freenet directory, removes old log files and runs the Freenet server in nohup mode directing any non-errors to /dev/null. You'll need to insure the Java program itself is in your path. Try running Java from a room shell to test this.
The Freenet node software uses two configuration files: .freenetrc, the configuration for the node; and .fproxyrc, the configuration for the fproxy module. Of the two, .freenetrc contains all but one of the options; .fproxyrc just tells fproxy which Freenet node it should connect to.
The first thing you'll want to set is the transient option up at the top of the .freenetrc file. The default, “no”, means that your node will tell other nodes about its existence. This is probably what you want if you plan on running a 24/7 node with a good internet connection and a static IP address or dynamic DNS service. If you set transient to “yes”, your node won't tell other nodes about its existence. If you have spotty uptime, a slow internet connection or a dynamic IP address without dynamic DNS, set transient to “yes”.
You'll want to change the port used by Freenet to a random port between 5,000 and 65,535. If everyone ran their node on the same port it would be far easier for Freenet to be filtered out, which is not a good thing. To do this, change the listenPort value in .freenetrc and the serverAddress in .fproxyrc to reflect the new port. Also, remember to use the -serverAddress option when running the command-line clients or set the FREENET environment variable to the address of your node.
If you have a dynamic IP address but use dynamic DNS you can still contribute to Freenet by setting nodeAddress to your dynamic DNS name. Instead of telling other Freenet nodes the IP address of your machine, it will tell them the address in the nodeAddress setting.
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane