toxcore/other/bootstrap_daemon
2014-10-15 20:01:43 -04:00
..
Makefile.inc Added .sh ending to bootstrapd's init script 2014-08-18 22:24:42 -04:00
README.md Fixed a typo 2014-10-13 01:10:36 -04:00
tox-bootstrapd.c Merge branch 'tox-bootstrapd-network-error-handling' of https://github.com/nurupo/InsertProjectNameHere 2014-10-15 20:01:43 -04:00
tox-bootstrapd.conf Added IPv4 fallback, made IPv6 and IPv4 fallback enabled by default 2014-10-12 23:22:25 -04:00
tox-bootstrapd.sh Don't fail when the binary is not found 2014-10-14 14:14:06 -04:00

##Instructions for Debian

For security reasons we run the daemon under its own user. Create a new user by executing the following:

sudo useradd --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd

Create a directory where the daemon will store its keys:

sudo mkdir /var/lib/tox-bootstrapd/

Restrain other users from accessing the directory:

sudo chown tox-bootstrapd:tox-bootstrapd /var/lib/tox-bootstrapd/
sudo chmod 700 /var/lib/tox-bootstrapd/

Look at the variable declarations in the beginning of tox-bootstrapd.sh init script to see if you need to change anything for it to work for you. The default values must be fine for most users and we assume that you use those next.

Go over everything in tox-bootstrapd.conf. Make sure pid_file_path matches PIDFILE from tox-bootstrapd.sh.

Place tox-bootstrapd.conf file to where CFGFILE variable from tox-bootstrapd.sh tells. By default it's /etc/tox-bootstrapd.conf.

Place tox-bootstrapd.sh init file at /etc/init.d/tox-bootstrapd (note the disappearance of ".sh" ending).

Set permissions for the init system to run the script:

sudo chmod 755 /etc/init.d/tox-bootstrapd

Make the init system aware of the script:

sudo update-rc.d tox-bootstrapd defaults

Start the daemon:

sudo service tox-bootstrapd start

Verify it's running:

sudo service tox-bootstrapd status

Get your public key and check that the daemon initialized correctly:

sudo grep "tox-bootstrapd" /var/log/syslog

###Troubleshooting:

  • Check daemon's status:
sudo service tox-bootstrapd status
  • Check the log for errors:
sudo grep "tox-bootstrapd" /var/log/syslog
  • Check that variables in the beginning of /etc/init.d/tox-bootstrapd are valid.

  • Make sure pid_file_path in /etc/tox-bootstrapd.conf matches PIDFILE from /etc/init.d/tox-bootstrapd.

  • Make sure you have write permission for keys and pid files.

  • Make sure you have read permission for the config file.