Tutorial: GNUnet on Archlinux/Pi

Welcome to this GNUnet tutorial for Archlinux on a Raspberry Pi 3. If you want to run a GNUnet node on a separte system, permanently online, with low energy consumption, this might be the thing for you. This tutorial shows you how to install, run, and operate it.

Requirements

First you need the hardware. This tutorial works with a Raspberry Pi 3. The other Pi versions I haven't tested, but they should probably work, too. To install Archlinux on the Pi3, follow the instructions from archlinuxarm.org.

That was easy, right? Our goal now is to build GNUnet from source. So, let's install the tools for building new software.

> sudo pacman -S base-devel

Now we can continue to install the following Archlinux dependencies to compile GNUnet on our Pi.

$ pacman -Su libmicrohttpd libgcrypt gnurl libunistring gnutls libidn libextractor openssl libltdl sqlite texinfo which gettext zlib pkg-config git miniupnpc libextractor jansson nim

Get the Source Code

We are getting closer. Download the GNUnet source code which we will build in the next step:

> git clone https://gnunet.org/git/gnunet.git

Now it's time to compile GNUnet.

> cd gnunet
> ./bootstrap # Run this to generate the configure files.
> ./configure # Use --help to see the various flags available to you.
> make -j$(nproc || echo -n 1)
> sudo make install

Congrats! GNUnet is now installed!

Run

By default GNUnet looks in our home directory for the file ~/.config/gnunet.conf. We can start with an empty file for now:

> touch ~/.config/gnunet.conf


It's reccomended that you increase your bandwidth restrictions from the acutely low defaults. The example below sets the WAN and LAN limits to the value "unlimited".


$ gnunet-config -s ats -o WAN_QUOTA_IN -V unlimited
$ gnunet-config -s ats -o WAN_QUOTA_OUT -V unlimited
$ gnunet-config -s ats -o LAN_QUOTA_IN -V unlimited
$ gnunet-config -s ats -o LAN_QUOTA_OUT -V unlimited

Now we can start it with the commandline tool gnunet-arm (Automatic Restart Manager).

> gnunet-arm -s

It starts the default GNUnet services. We can list them with the -I option:

> gnunet-arm -I
Running services:
ats (gnunet-service-ats)
revocation (gnunet-service-revocation)
set (gnunet-service-set)
nat (gnunet-service-nat)
transport (gnunet-service-transport)
peerstore (gnunet-service-peerstore)
hostlist (gnunet-daemon-hostlist)
identity (gnunet-service-identity)
namecache (gnunet-service-namecache)
peerinfo (gnunet-service-peerinfo)
datastore (gnunet-service-datastore)
zonemaster (gnunet-service-zonemaster)
zonemaster-monitor (gnunet-service-zonemaster-monitor)
nse (gnunet-service-nse)
cadet (gnunet-service-cadet)
dht (gnunet-service-dht)
core (gnunet-service-core)
gns (gnunet-service-gns)
statistics (gnunet-service-statistics)
topology (gnunet-daemon-topology)
fs (gnunet-service-fs)
namestore (gnunet-service-namestore)
vpn (gnunet-service-vpn)

For stopping GNUnet again we can use the -e option.

> gnunet-arm -e

Make sure, it works!

Please head over here: Use!