Running your peer

Your GNUnet peer is the set of background services that connect your computer to the GNUnet network and that applications such as GNS rely on. This page explains how to start and stop it, how to keep it running, and how to check that it is healthy.

Starting and stopping

$ gnunet-arm -s        # start the peer
$ gnunet-arm -e        # stop it
$ gnunet-arm -r        # restart it

gnunet-arm (the Automatic Restart Manager) starts the services your peer needs and restarts them if they crash. It needs no configuration file; settings you change with gnunet-config are written to ~/.config/gnunet.conf.

To see which services are running, use gnunet-arm -I. Optional services, such as the DNS bridge for GNS, are started and stopped individually:

$ gnunet-arm -i dns2gns     # start a service
$ gnunet-arm -k dns2gns     # stop it

To start an optional service together with the peer every time, set IMMEDIATE_START = YES in its configuration section, for example gnunet-config -s dns2gns -o IMMEDIATE_START -V YES.

Starting your peer automatically

Your peer is most useful, to you and to others, when it runs all the time.

  • If your distribution’s package ships a systemd user unit (Fedora’s does, for example), enable it with systemctl --user enable --now gnunet.

  • Otherwise, add this line to your crontab (crontab -e):

    @reboot gnunet-arm -s
    

Checking that it works

Your peer’s identity in the network:

$ gnunet-pils --once
49MAZRCX4ZH5QMXTT73GQGNVDK8QHTQXAMP8BEVYKHC1M2RMM1EG

The peers you are currently connected to (one per line; give it a few minutes after starting):

$ gnunet-core -s

The estimated size of the network:

$ gnunet-nse

If gnunet-core -s lists no peers after several minutes, your peer cannot reach the network. The most common reasons are a firewall or NAT that blocks incoming and outgoing connections, and a failure to download the list of initial peers. See Configuring NAT and Configuring the hostlist to bootstrap. Names in your own zones keep working without a connection; only lookups in other people’s zones need the network.

Where GNUnet keeps its files

~/.config/gnunet.conf

Your configuration, if you have changed any settings. See Advanced Configuration.

~/.local/share/gnunet/

Persistent data: the peer’s key, your zones’ keys, and the databases. See Backing up for what to back up.

~/.cache/gnunet/

Log files, one per day. Look here first when something goes wrong.

If the XDG_CONFIG_HOME, XDG_DATA_HOME or XDG_CACHE_HOME environment variables are set, these directories are used instead of ~/.config, ~/.local/share and ~/.cache.

System-wide installations

Some distribution packages, and administrators who follow The Multi-User Setup, run part of GNUnet as a system service: the system services run once per machine as the user gnunet and use /etc/gnunet.conf, while every user who wants to use GNUnet runs their own user services with gnunet-arm -s as above. For this to work, your user must be a member of the gnunet group. The system services are started by the system’s init system, not by you.

Getting help