This is an old revision of the document!


Installation

Assuming that Toxcore has already been built, cd to

/$USER/toxcore/build

and run

./DHT_bootstrap ADDRESS PORT KEY

Change ADDRESS, PORT, and KEY to that of any active DHT node.

Daemonized version

Toxcore also has a daemonized version of the bootstrap node code wish can be used on SystemV init or systemd init systems.

You first need to configure tox to build the bootstrap node executable. Run the configure script with

--enable-daemon

as an argument. The tox_bootstrap_daemon executable will be placed in

build/.lib

, so grab a copy from there and place it where you want the daemon to run from.

Configuring Daemon script

Note that the following instructions might be out of date and it's preferable to read the README.md file maintained by the daemon developer.

Next we need to configure

other/bootstrap_daemon/tox_bootstrap_daemon.sh

Set the NAME, USER, CFG, PIDFILE and SCRIPTNAME arguments as per your installation.

OptionDescription
NAME Name of the executable (default is the tox_bootstrap_daemon)
USER Name of the user the daemon will run as (e.g. tox)
CFG Location of configuration file
PIDFILE Where to create the pid file for the daemon
SCRIPTNAME Path to the tox_bootstrap_daemon.sh (used to change name of the script)

There are a few other options generated by a combination of these items, and you may wish to customize them for your needs.

Configuring the daemon itself

Now we need to configure the conf file that the daemon uses, located in

other/bootstrap_daemon

At minimum you need to set the keys_file_path, pid_file_path and add some bootstrap nodes.

OptionDescription
keys_file_path The path to your keys file that will store the keypair for your daemon
pid_file_path The path to the pid file and should be set based on what you chose for PIDFILE earlier

To get the bootstrap nodes, you can either grab them from here or use an updater script - some options here: issue

Generate the service

Place the daemon script in

/etc/init.d

and rebuild the service list.

Finally, start the service!

Troubleshooting

The daemon outputs to syslog, so if you have the appropriate permissions:

tail -f /var/log/syslog | grep "tox_bootstrap_daemon"

will give you a nice debug output (NB: if you change the name edit the grep appropriately)

Print/export