Install headless Deluge torrent server in a jail. ====== Introduction ====== [[http://dev.deluge-torrent.org/|Deluge]] is a cross platform bittorrent client licensed in [[http://www.gnu.org/licenses/gpl.html|GNU gpl v3]]. It can be installed in standalone mode with a graphical environment but also in client/server mode which support remote control with graphical (GTK), web or console user interfaces. It utilises the libtorrent library and it's [[http://libtorrent.org/features.html|features]] and you can extend them, thanks to it's [[http://dev.deluge-torrent.org/wiki/Plugins|plugins]] ecosystem. ====== Tested ====== 2017/08/09 | %%FreeBSD%% | 11.1 | | Deluge | 15 | ====== Preparations ====== | //Topics// | //Values// | | ip address of the deluge server | ''%%ip_of_the_server%%'' | | %%FreeBSD%%'s unpriviledged user that start the deluge daemon | ''%%deluge - ID 1001%%'' | | ip address of the deluge jail | ''%%glpi_db_user_password%%'' | | jail system user for deluge | ''%%deluge - ID 1001%%'' | | admin user in deluge | ''%%delugeadmin%%'' | | your server hostname | ''%%your_hostname%%'' | ====== Install FreeBSD ====== /* Link to a standard installation of freebsd to create here */ Standard installation of freeBSD ====== Create an unpriviledged user ====== The method is described in the handbook at the chapter [[https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/users-synopsis.html|Users and Basic Account Management]] /* put in bold characters each choices */ /* explain why each choices */ # adduser Username: deluge Full name: deluge Uid (Leave empty for default): Login group [deluge]: Login group is deluge. Invite deluge into other groups? []: Login class [default]: Shell (sh csh tcsh nologin) [sh]: nologin Home directory [/home/deluge]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: no Lock out the account after creation? [no]: no Username : deluge Password : Full Name : deluge Uid : 1001 Class : Groups : deluge Home : /home/deluge Home Mode : Shell : /usr/sbin/nologin Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (deluge) to the user database. Add another user? (yes/no): no Goodbye! An alternative method to create a user is to use the command [[https://www.freebsd.org/cgi/man.cgi?query=pw&manpath=FreeBSD+11.1-RELEASE+and+Ports|pw]] pw useradd -n deluge -u [ID] -G wheel -m -c "Deluge BitTorrent Client" -s /sbin/nologin -w no You can check that the user has been created with the command ''%%# cat /etc/passwd%%'' Specify the deluge user # sysrc deluged_user="deluge" Note : you can check the result of this command in the rc.conf configuration file with the command ''%%cat /etc/rc.conf%%'' ====== Install Deluge ====== Thanks to the port maintainer rm@freebsd.org, since October 2016 the port includes a version without the GTK environment ! Install Deluge pkg install deluge-cli Note that you can search for the available ports with the command ''%%pkg search deluge%%'' Make sure that deluge will start at boot sysrc deluged_enable="YES" ====== configuration file ====== create de default directory to contain configs files mkdir -p /home/deluge/.config/deluge chown -R deluge:deluge /home/deluge/ Start/stop the deluge daemon to generate config files # service deluge start # service deluge stop ====== Sources ====== ====== To do ====== * * ====== Credits ====== Original howto written by David Stievenard ---- {{tag>HowTo}}