Skip to main content

Tox Bootstrap Node on Debian 11

These steps have been tested on Debian 11

References:

Install Dependencies:

sudo apt update
sudo apt install git libnacl-dev libc6-dev cmake libconfig-dev libsodium-dev

Clone latest Git repository & submodules:

From your home directory or wherever you prefer to do compilation work:

git clone https://github.com/TokTok/c-toxcore.git
cd c-toxcore
git submodule update --init

Compile libtoxcore and tox-bootstrapd:

From inside the c-toxcore directory (you might be in it from the previous step):

mkdir _build
cd _build
cmake ..
make
make install

Did it Compile OK?

Make sure the output text from make is all green and tox-bootstrapd was built:

[100%] Linking C executable tox-bootstrapd
[100%] Built target tox-bootstrapd

Create a tox-bootstrapd User & Restricted Home Directory:

sudo useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd
sudo chmod 700 /var/lib/tox-bootstrapd

Service & Configuration Files:

From the c-toxcore directory (cd .. if you're still in _build), copy the service and conf files to the system locations.  Keep in mind there is a directory structure under c-toxcore that is similar to the structure under _build, but the service and conf files are found under c-toxcore/other/bootstrap_daemon/ and the executable is found under c-toxcore/_build/other/bootstrap_daemon/.

Copy the service file to /etc/systemd/system/:
sudo cp other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/
Copy the configuration file to /etc/:
sudo cp other/bootstrap_daemon/tox-bootstrapd.conf /etc/tox-bootstrapd.conf

Customize Configuration Settings:

Use nano or your favorite editor to edit /etc/tox-bootstrapd.conf:

sudo nano /etc/tox-bootstrapd.conf

At a minimum, edit your MOTD, other bootstrap nodes, and probably also your ports.  A current list of public bootstrap nodes is displayed at https://nodes.tox.chat/.

port = 33445

keys_file_path = "/var/lib/tox-bootstrapd/keys"

pid_file_path = "/var/run/tox-bootstrapd/tox-bootstrapd.pid"

enable_ipv6 = true

enable_ipv4_fallback = true

enable_lan_discovery = true

enable_tcp_relay = true

tcp_relay_ports = [3389, 33445, 43334]

enable_motd = true

motd = "Write Your Custom MOTD Here! (up to 255 chars)"

bootstrap_nodes = (
  { // Tony (he's awesome)
    address = "tox.abilinski.com"
    port = 33445
    public_key = "10C00EB250C3233E343E2AEBA07115A5C28920E9C8D29492F6D00B29049EDC7E"
  },
  { // Cody (he's awesome too)
    address = "198.199.98.108"
    port = 33445
    public_key = "BEF0CFB37AF874BD17B9A8F9FE64C75521DB95A37D33C5BDB00E9CF58659C04F"
  },
  { // Gabe (he's just a geek)
    address = "104.225.141.59"
    port = 43334
    public_key = "933BA20B2E258B4C0D475B6DECE90C7E827FE83EFA9655414E7841251B19A72C"
  }
)