toxcore/other/bootstrap_daemon
2014-08-17 15:59:37 -04:00
..
Makefile.inc Renamed files for less confusion 2014-08-17 01:58:24 -04:00
README.md Renamed files for less confusion 2014-08-17 01:58:24 -04:00
tox-bootstrapd Fixed daemon taking long time to stop 2014-08-17 02:17:03 -04:00
tox-bootstrapd.c Fixed some warnings 2014-08-17 15:59:37 -04:00
tox-bootstrapd.conf Renamed files for less confusion 2014-08-17 01:58:24 -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 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.

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

Place tox-bootstrapd init file at /etc/init.d/tox-bootstrapd.

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.