Page 1 of 2

Tests wanted: Tor, Freenet & I2P

Posted: Sun Jun 03, 2012 2:26 pm
by Raspberry Brew
I'm considering getting a RasPi and setting up a 24/7 Tor/Freenet/I2P server on my home network. Since Freenet and I2P are written in Java they'll probably run and as there are Tor packages for Arch Linux ARM and Android I'm pretty certain there'll be no problem with that either.

How well they'll run, that's what I'd like to know. I expect the more bandwidth and – in case of Freenet – disk space you allocate the more CPU and RAM will be required.

Any Pi owners reading this, it'd be great if you could run some tests and post results in this thread. Proper network intergration can take quite some time so an uptime of multiple days will probably produce more accurate results than running for just a few hours. But getting even some rudimentary info about the initial resource usage would be great.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Thu Jun 07, 2012 2:53 am
by micedwards
I have my board, and I'm also very interested in this, but I'm just moving house. Ping me again in about 6 weeks if no-one has provided the data yet!

I'm about to lose my fast Internet connection, but as soon as I get a new one I'll get the tests running.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Tue Jun 12, 2012 4:42 am
by zburatorul
I'm also thinking of setting up a Tor node on an RPI. Whoever has one, please devote a few days worth of cpu time to test if and what works.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Thu Jun 14, 2012 9:40 am
by benedict3578
I have got Tor running on a Pi emulator I am working on at the moment. Its seems to run fine, but connecting through it is quite slow. Only reason i'm using an emulator is that I do not have a spare cable to connect it to my internet! (P.S. I am running Debian on the emulator) :(

Re: Tests wanted: Tor, Freenet & I2P

Posted: Thu Jun 14, 2012 10:01 am
by AndrewS
Ethernet patch cables and 100Mb ethernet hubs/switches can be picked up quite cheaply... :)

Re: Tests wanted: Tor, Freenet & I2P

Posted: Fri Jun 15, 2012 9:33 am
by benedict3578
benedict3578 wrote:I have got Tor running on a Pi emulator I am working on at the moment. Its seems to run fine, but connecting through it is quite slow. Only reason i'm using an emulator is that I do not have a spare cable to connect it to my internet! (P.S. I am running Debian on the emulator) :(
Oops, sorry. That should say 'I do not have a spare socket to connect it to my internet!'. :)

Re: Tests wanted: Tor, Freenet & I2P

Posted: Mon Jun 18, 2012 10:12 am
by Karalabe

Shoot. What would you like tested and how exactly?

Have a nice day,

PS: Can't promise long running tests, but for a while why not.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sun Jun 24, 2012 4:37 pm
by irongeek
I can confirm I2P works, but you need to teak what Java you use: ... -svartkast

Hopefully it will be faster as time goes by, memory seems to be the big bottle neck.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sun Aug 12, 2012 3:02 pm
by micedwards
OK ... after moving countries, I'm finally back on a solid fast Internet connection at home ...

I have a TOR relay up and running. It seems to be performing OK, but I have only just started it, so I'm not really able to see how it performs once it's integrated into the network.

I have done a tiny bit of testing by using it as a SOCKS proxy and asking for a big download to go out over the TOR network. Here's a screenshot from the 'arm' monitoring command while I'm downloading an Ubuntu image:
tor-arm-screenshot.jpg (41.71 KiB) Viewed 15000 times
So, while pushing 1.2Mb/s through the Tor SOCKS proxy, I'm seeing 13.8% load from tor, and 15.2% from arm.

I'll be leaving this running for a while, so I can get more answers, but so far it seems pretty happy.

It was super easy to install ... on the Raspbian image, use 'apt-get install tor' (and then edit the torrc file).

I'll try to answer questions and post more info after this has been running for a while. I'm not using the RasPi for anything else this week, so I should be able to leave it going.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Mon Aug 13, 2012 4:02 pm
by Skiesare
I've just tried installing Freenet with the Bodhi distro. Installation went OK, but it looks like it crashed pretty much immediately. During installation there was a message about it not working well with so little memory but that was with a GUI running. I'll have to try again without the GUI.

It might work better if I was running from a hard drive but I haven't got that working yet either. With a 16 gig SD card the largest data store it would allow was 1gig, I'm not sure how useful that would be.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Mon Nov 05, 2012 11:20 pm
by cave
I have now also a TOR Middle RELAY up and running.

I have written a HowTo for Basic Beginners to set up a middle relay and explaining the difference between middle, exit and bridge relay. ... relay.html

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sun Nov 11, 2012 4:25 am
by oblivion2k
I'll be keeping an eye on this one. I've got the second iteration RasPi with 512 mb ram so I'm hoping it'll run Freenet alright once somebody figures out how to get it running at all. Thank you all for your work.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sat Nov 17, 2012 5:40 pm
by Wasp_Box
I'll give it a go once I've got my Pi.

I've been running a tor relay node for about a year on a linux box I set up as a server to teach (actually, to learn from) my son. It's really easy to set up - this chap was very helpful - ... on-ubuntu/

The more tor nodes, the better.

Edit: Ooops, cave's done a how-to a couple of posts up. I'm redundant :(

Re: Tests wanted: Tor, Freenet & I2P

Posted: Wed Nov 21, 2012 12:53 pm
by cave
no problems, the more HowTo's the more Tor Nodes :twisted:

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sat Dec 29, 2012 12:23 am
by superhamster
I've managed to build and run the freenet daemon on Debian Wheezy and Raspbian. It took me a while to figure out how to build all parts of the daemon but it is actually pretty simple. I'll post instructions below so you can try yourself if you want.

My freenet node currently runs on Debian wheezy for armel with Oracle JDK. I've done a build with openjdk-7 on Raspbian (armhf) before, but there was a performance problem so I switched to the current platform to see if it makes any difference. As I later found out the USB memory stick that stored freenet data was too slow causing the freenet node to perform poorly. Currently I'm using an old 80 GB IDE disk in an USB case as the datastore which seems to work well. So it should be possible to run freenet on Raspbian with openjdk 6 or 7 as well, and I'll definitely give it another try later on.

Here are some statistics for the node; it has only been up for about a day so I really can't say anything about long term performance yet. I've set it to use 192 MB memory at maximum, and bandwith limits are 512 KiB for download and 48 KiB for upload. The thread limit is 200. The security options in freenet are all set to low so there is less disk encryption involved than with other settings. This should give the best performance and since it is only a test node I guess it doesn't matter. The node runs in Opennet mode. I've also increased ping thresholds to 3000 and 1500. The raspberry is overclocked at 900 MHz.

Some of the values I see on the freenet Status/Statistics page are given below (for some I have given ranges of values I usually see):
Used Java memory: 110-130 MB
Running threads: 130-160
nodeAveragePingTime: 500-800 ms
Session uptime: 20 h
Session Total Input and Output both approx. 40 KiB/s
Global Total Input and Output both approx 3 GiB

The connection limit is set by the freenet daemon to 24, and (almost) all connections are used. So far the freenet node runs stable and I've actually used it to browse freenet a bit. The performance is comparable to another test node I have set up on Debian wheezy for x86 running in a virtual machine on a 2 GHz CPU, with approx. the same bandwith limits for freenet.

Altogether it seems to run quite well so far. One odd thing is that system load (as shown by e.g. top) is always very high when running the freenet daemon. I've seen values as high as 30 (during initial node announcement), and currently it is about 6 to 8. The system and freenet remain as responsive as usual though so this doesn't seem to be a problem. The system even idles sometimes as can be seen in top.

For detailed build instructions please see my next post.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sat Dec 29, 2012 1:40 am
by superhamster
Here are the instructions for building the freenet daemon on soft-float Debian Wheezy or available on the download page. If you want to run the daemon with the Oracle JDK then you need soft-float Debian. Some parts of the freenet documentation recommend Oracle JDK but I am not sure if that information is outdated. Personally I prefer openjdk. Note that the Debian image from 2012-08-08 won't boot on some raspberries; to fix this replace start.elf with one of the other start* files on the boot partition.

Starting with a new installation of Debian or Raspbian, run the commands given below as root.

# Initial update and setup
apt-get update
apt-get install raspi-config raspberrypi-bootloader screen lynx
raspi-config # set overclocking, memory, etc.

# Download and install prefered JDK, you can skip this if you are ok with the default (openjdk-6)
# for Oracle JDK, download and extract e.g. to /opt
# for openjdk-7, run: apt-get install openjdk-7-jdk

# Set JAVA_HOME and PATH, make sure this is set every time you do a build
# can also be set permanently in /etc/environment
# for openjdk-7 on Raspbian (make sure the path exists)
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-armhf/
# or for Oracle JDK (again make sure the path exists)
export JAVA_HOME=/opt/jdk1.7.0_10/
# then
export PATH=$JAVA_HOME/bin:$PATH

If you use Oracle JDK you should probably set /usr/bin/java and javac to the Oracle version. Run e.g.:

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_10/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_10/bin/javac 100
update-alternatives --set java /opt/jdk1.7.0_10/bin/java
update-alternatives --set javac /opt/jdk1.7.0_10/bin/javac

To download the rest of the required build tools run:

apt-get install git
apt-get install maven2 ant-contrib
apt-get install libgmp-dev # for NativeBigInteger

For the rest of the commands I recommend to mount a reasonably fast partition on which to build freenet. An average USB stick will do for building freenet, but you probably need something faster, like a hdd, to run the daemon (see my previous post).
Change into a directory on that partition where you want to build freenet. The following commands will download all source code, build it and install it below this directory. You can later move the installed files somewhere else (e.g. to /opt, but make sure the datastore is on a fast device).

# Create build directory
mkdir -p freenet/freenet-{build,src,install}
cd freenet

# Prepare installation directory
mkdir -p freenet-install/{bin,etc,logs,lib/java} # wrapper segfaults without logs directory ?!

# Download bc crypto, seed nodes ref file
cd ../freenet-src
wget ... on-147.jar
wget ... nodes.fref

# Download fred, contrib
cd ../freenet-build
git clone git://
git clone git://

# Add to fred-staging/, copy bc crypto
echo "lib.contrib.dir = ../contrib-staging/freenet-ext/dist" > fred-staging/
cp -a ../freenet-src/bcprov-jdk15on-147.jar fred-staging/lib/bcprov.jar

# Build contrib-staging
cd contrib-staging/freenet-ext
ant -Dtest.skip=true -Ddoc.skip=true 2>&1 | tee "../../contrib-staging-`date +%y-%m-%d-%T`.log"
cd ../..

# Build freenet-staging
cd fred-staging
ant -Dtest.skip=true -Ddoc.skip=true 2>&1 | tee "../fred-staging-`date +%y-%m-%d-%T`.log"
cd ..

### Add files for arm architecture

# Build NativeThread library
cd contrib-staging/NativeThread
export CLASSPATH=../../fred-staging/build/main/
cp lib/freenet/support/io/
cd ../..

# Build wrapper
cd contrib-staging/wrapper
cp -a src/c/Makefile-linux-{x86,arm}-32.make
ant -Dbits=32
cd ../..

# Build NativeBigInteger (link with system libgmp.a)
cd contrib-staging/NativeBigInteger
mkdir -p bin/arm/.libs -p
cd bin/arm

ln -svf /usr/lib/arm-linux-gnueabihf/libgmp.a .libs/
# or for soft float Debian Wheezy
#ln -svf /usr/lib/arm-linux-gnueabi/libgmp.a .libs/

../../ static
cp -a ../../lib/net/i2p/util/
cd ../../../..

# Build onion-fec
cd contrib-staging/onion-fec/src/csrc
mkdir -p ../../bin/lib/linux-arm
cp -a ../../bin/lib/linux-arm/
cd ../../../..

### Install

cd freenet/freenet-build/
cp -a contrib-staging/freenet-ext/dist/* ../freenet-install/lib/java
cp -a fred-staging/dist/* ../freenet-install/lib/java
cp -a ../freenet-src/bcprov-jdk15on-147.jar ../freenet-install/lib/java
cp -a ../freenet-src/seednodes.fref ../freenet-install

# Install NativeThread library
jar -uvf ../freenet-install/lib/java/freenet-ext.jar -C contrib-staging/NativeThread/lib freenet/support/io/

# Install wrapper
cp -a contrib-staging/wrapper/lib/ ../freenet-install/lib
cp -a contrib-staging/wrapper/bin/wrapper ../freenet-install/bin/

# Install NativeBigInteger
jar -uvf ../freenet-install/lib/java/freenet-ext.jar -C contrib-staging/NativeBigInteger/lib net/i2p/util/

# Install Onion-fec
jar -uvf ../freenet-install/lib/java/freenet-ext.jar -C contrib-staging/onion-fec/bin/ lib/linux-arm

# Add freenet-install/etc/wrapper.conf, the following lines should be sufficient to start freenet*.jar
# Maximum amount of memory Freenet will use in megabytes.
# Note that Java will use some, and the datastore bloom filters will use some, above this limit.
# Note also that setting this too high may prevent Freenet from starting up on some windows systems.
# You might want to set the following line if you have changed java.maxmemory
wrapper.console.title=Freenet 0.7

### Start node with

cd ../freenet-install/
./bin/wrapper ../etc/wrapper.conf

# Setup & test node with
apt-get install lynx
lynx localhost:8888

Re: Tests wanted: Tor, Freenet & I2P

Posted: Sun Dec 30, 2012 12:41 am
by superhamster
I forgot to mention that the inital datastore size was 2 GB, I've changed it to 32 GB after the node has been running stable for about a day and also increased the output limit to 64 KB, maximum memory to 384 MB and thread limit to 300. The resize took a couple of hours to finish during which the node remains operational, although somewhat slower than usual. With the new settings there are now 28 connections, but it is too early to tell if the average input and output will increase above 40 KB.

I also mixed up the security settings: only if the physical threat level is set to none the disk encryption is turned off, but for my test node it is set to low. Protection against strangers is set to normal, not low.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Tue Jan 01, 2013 3:07 pm
by superhamster
I did some tests with OpenJDK 6 and 7 on Raspbian but it seems their performance is not good enough to run the Freenet daemon; it will start but fail to create stable connections as the latency appears to be too high and other nodes soon disconnect again. Results with openjdk 6 jamvm were only slightly better but not usable either as far as I can tell.

There are also some benchmarks in this thread which show that Oracle JDK is a lot faster than openjdk: ... =34&t=6369 There are also some other options mentioned that might be worth trying out, like Avian and GCJ, but for now I'll use Oracle JDK again.

On the Freenet IRC channel I got the hint to add a Java option which reduces the stack size and thus memory usage; you can add it to the wrapper.conf like this: # see ... hreads_oom

I also noticed the wrapper restarting the daemon because a timeout occurs after some of the store cleaner threads finish. Setting the timeout in the wrapper.conf to something higher, like 600, seems to prevent this.

Re: Tests wanted: Tor, Freenet & I2P

Posted: Wed Jan 02, 2013 12:23 am
by superhamster
To prevent the wrapper from restarting the daemon with the message "JVM appears hung: Timed out waiting for signal from JVM." you actually need to use this setting in wrapper.conf, which defaults to 30 s: # see ... ing.html#9

Re: Tests wanted: Tor, Freenet & I2P

Posted: Mon Jan 07, 2013 4:23 am
by unclejed613
i found that i had too much trouble setting up TOR on a PI if i just installed TOR. so after that experiment ran into difficulties, i un-installed the standalone TOR package, and installed vidalia (which includes TOR) this is a much simpler package to work with, since it automates the configuration of torrc. i also installed TorChat, since i already have a Pidgin TorChat plugin running on my main computer. after installing vidalia, i was able to easily set up a hidden service on port 80 for Apache. TorChat also is easy to use, as it comes with it's own instance of TOR.

after running TOR for about a week, and not only using it to serve a web page through a hidden service, as well as using it with midori web browser :

Code: Select all

torify midori

i also decided to try running TOR as a relay, which was easily accomplished through vidalia.

one question i have, and this is something i have noticed whether vidalia is operating as a relay, or as just a client, why does vidalia occasionally suck up all the available CPU time for about 3-5 minutes about once or twice an hour? is it refreshing something like the node or relay lists? otherwise, vidalia/tor and torchat have been very trouble-free, even with the Pi being used for other things, like an XMPP chat server, running a VNC server so i can work with stuff on the Pi remotely, and playing movies served from my main computer through a DLNA share.

i have done somewhat of a tutorial how to install vidalia and torchat here: ... -node.html

Re: Tests wanted: Tor, Freenet & I2P

Posted: Tue Jan 08, 2013 4:45 am
by unclejed613
so i installed tor-arm on the pi, and took the torrc from vidalia, and copied it over to my .tor directory (which was there from the abortive attempt at running tor as a standalone). i started tor, then started arm, and i like arm a whole lot more than vidalia. for one thing, there are no more 5 minutes of vidalia soaking up 80% of the CPU time. second, there's a whole lot more useful info available in arm (but i do like vidalia's connection map... reminds me of movies like "The Net")... plus i don't have to run top all the time to see how much CPU time tor and (originally vidalia) arm is eating... i was also noticing that vidalia wasn't reliable on getting circuits established. as i'd start vidalia, and it might not connect tor at all, and tor would just be sitting there with no circuits. this doesn't seem to be a problem with arm... i'll keep vidalia on the machine to make config changes until i get a better feel for how arm works.

Freenet compiling error

Posted: Sat Sep 28, 2013 9:18 pm
by Apeman
Hi superhamster, thanks for your tutorial. Unfortunately the quoted command doesn't work.
superhamster wrote: # Build contrib-staging
cd contrib-staging/freenet-ext
ant -Dtest.skip=true -Ddoc.skip=true 2>&1 | tee "../../contrib-staging-`date +%y-%m-%d-%T`.log"
cd ../..
The compiler runs for a while but then stops with the following error message:
/home/pi/freenet/freenet-build/contrib-staging/freenet-ext/build.xml:89: The following error occurred while executing this line:
/home/pi/freenet/freenet-build/contrib-staging/freenet-ext/build.xml:286: The following error occurred while executing this line:
/home/pi/freenet/freenet-build/contrib-staging/freenet-ext/build.xml:287: Warning: Could not find file /home/pi/freenet/freenet-build/contrib-staging/commons-compress/target/commons-compress-1.4.1.jar to copy.
I'm running a fresh installation of 2013-09-25-wheezy-raspbian and have oracle java 7 installed from the packages with:
sudo apt-get install oracle-java7-jdk
Do you have any suggestions, how to solve my problem and properly compile freenet?

Thanks in advance!

Re: Tests wanted: Tor, Freenet & I2P

Posted: Tue Oct 01, 2013 1:39 am
by unclejed613
from what i've seen Java and Pi don't play nice together..... maybe somebody else can fill in the blanks....

Re: Tests wanted: Tor, Freenet & I2P

Posted: Thu Oct 17, 2013 7:37 pm
by Bellab
I really wonder why this topic isn't gaining more traction.

Where there other successful builds of Freenet? Is superhamster still around? :mrgreen:

Re: Tests wanted: Tor, Freenet & I2P

Posted: Mon Oct 21, 2013 2:49 am
by unclejed613
i just saw this this, hope it helps: ... -home.html