Install headless Deluge torrent server in a jail.

1. Introduction

Deluge is a cross platform bittorrent client licensed in 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 features and you can extend them, thanks to it's plugins ecosystem.

2. Tested






3. Preparations



ip address of the deluge server


FreeBSD's unpriviledged user that start the deluge daemon

deluge - ID 1001

ip address of the deluge jail


jail system user for deluge

deluge - ID 1001

admin user in deluge


your server hostname


4. Install FreeBSD

Standard installation of freeBSD

5. Create an unpriviledged user

The method is described in the handbook at the chapter Users and Basic Account Management

# 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   : <disabled>
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

Specify the deluge user

# sysrc deluged_user="deluge"

6. Install Deluge

Thanks to the port maintainer, since October 2016 the port includes a version without the GTK environment !

Install Deluge

pkg install deluge-cli

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

7. Sources

8. To do

9. Credits

Original howto written by David Stievenard


DavidStievenard/HowTo/DelugeHeadless (last edited 2017-08-09T11:06:09+0000 by DavidStievenard)