install DELUGE in a jail

GALLO

Cadet
Joined
Dec 18, 2016
Messages
1
Can multiple instances of deluge be ran from a single jail?

on an Ubuntu local box I've copied
.config/deluge to .config/deluge1 ..deluge2..delugeA

Editing ~/.config/deluge?/core.conf port number for each ~/.config/deluge? and editing crontab -e so that all 17 daemon instances load at boot.

can I do the same or similar to achieve the same goal in FreeNAS?
 

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
I tried some stuff again and came up with a super simple guide.

Assuming the dataset you want to use for downloads it the 'media' dataset is owned by a group named 'media' with group ID 2000
Assuming you are only installing the no-gtk version in the jail, so you are going to use the GTK client and/or the web version.
  • Create the jail (and add the 'media' dataset as storage, mounted at /mnt/media), and in that jail, do this:
  • pkg update
  • pkg upgrade
  • pkg install deluge-cli
  • pw useradd -n deluge -u 1001 -c "Deluge BitTorrent Client" -s /sbin/nologin -w no
  • echo 'deluged_enable="YES"' >> /etc/rc.conf
  • echo 'deluged_user="deluge"' >> /etc/rc.conf
  • mkdir -p /home/deluge/.config/deluge
  • chown -R deluge:deluge /home/deluge/
  • ee /etc/group
    • in that file, add or modify the line to make the deluge user member of the media group:
      • media:*:2000:deluge
      • [Esc], [a], [a] to save and close the file
  • /usr/local/etc/rc.d/deluged start
  • /usr/local/etc/rc.d/deluged stop
  • If you want to use the gtk-client:
    • ee /home/deluge/.config/deluge/core.conf
      • in that file, change the line:
        • “allow_remote”: true
        • [Esc], [a], [a] to save and close the file
    • echo "[username]:[password]:10" >> /home/deluge/.config/deluge/auth
      (of course replace [username] and [password] with your credentials.
    • chmod 555 /home/deluge/.config/deluge/auth
  • If you want to use the web version:
    • echo 'deluge-web_enable="YES"' >> /etc/rc.conf
  • /usr/local/etc/rc.d/deluged start
That's it. Everything is working again :)

Connect with your Deluge gtk client application to hostname <your jail ip>, port 58846, and your user credentials
Or if you use the web version: Go with your web browser to: http://<your jail ip>:8112 (default pw is "deluge" without the quotes)

Rilo, what version of the jail template are you using? I'm still on a 9.3 system (with 9.3 jails) and deluge-cli doesn't seem to be in the ports or pkg repos for 9.3. Either that or something else is messed up (could be...).

Everything had been working nicely for months, but then I did some security updates to the jail, and rasterbar/deluge had some kind of issue so I'm trying to fix it this way. Maybe just need to reinstall deluge as the CLI doesn't seem to be avail...
 
Joined
Mar 6, 2014
Messages
686
I followed this guide step by step and getting the following error:
root@deluge:/home/deluge/.config/deluge # service deluged start
/etc/rc.conf: deluge-web_enable=YES: not found
/etc/rc.conf: deluge-web_enable=YES: not found
Starting deluged.
root@deluge:/home/deluge/.config/deluge # /usr/local/lib/python2.7/site-packages/deluge/_libtorrent.py:59: RuntimeWarning: to-Python converter for boost::shared_ptr<libtorrent::alert> already registered; second conversion method ignored.
import libtorrent as lt

Any ideas?
Freenas 9.10 latest
Brand new jail deluge
I get that last message too, but everything seems to work just fine.
For deluge-web errors, my guess is that you can't use deluge-cli, but instead must use deluge:
Code:
root@mdl:/ # pkg search deluge
deluge-1.3.13_1,1		  Bittorrent client using Python, GTK2, and libtorrent-rasterbar
deluge-cli-1.3.13		  CLI part of bittorrent client using Python and libtorrent-rasterbar
 
Last edited:
Joined
Mar 6, 2014
Messages
686
Rilo, what version of the jail template are you using? I'm still on a 9.3 system (with 9.3 jails) and deluge-cli doesn't seem to be in the ports or pkg repos for 9.3. Either that or something else is messed up (could be...).

Everything had been working nicely for months, but then I did some security updates to the jail, and rasterbar/deluge had some kind of issue so I'm trying to fix it this way. Maybe just need to reinstall deluge as the CLI doesn't seem to be avail...
Last night i destroyed (deleted) the complete jails dataset and recreated my jails from scratch. I'm on FreeNAS version 9.10.2 and the jail template is version 10.3
 
Joined
Mar 6, 2014
Messages
686
Can multiple instances of deluge be ran from a single jail?

on an Ubuntu local box I've copied
.config/deluge to .config/deluge1 ..deluge2..delugeA

Editing ~/.config/deluge?/core.conf port number for each ~/.config/deluge? and editing crontab -e so that all 17 daemon instances load at boot.

can I do the same or similar to achieve the same goal in FreeNAS?
Only one way to find out. Create a new jail en try it out ;)
 

Toxic Waste

Dabbler
Joined
Dec 9, 2015
Messages
12
I have gotten Deluge working on my freenas box, but one thing I can not seem to get working is the scheduler.. It is in the gui, I can put settings in it, deluge just seems to ignore them for some reason, anyone ran into this or knows a way to make it work? Without it is kind of a dealbreaker..
 
Joined
Mar 6, 2014
Messages
686
I have gotten Deluge working on my freenas box, but one thing I can not seem to get working is the scheduler.. It is in the gui, I can put settings in it, deluge just seems to ignore them for some reason, anyone ran into this or knows a way to make it work? Without it is kind of a dealbreaker..
Isn't the scheduler a separate plugin that you have to install?
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Nice guide.
What are the advantages over using the transmission plugin with Transmission Remote GUI?
 
Joined
Mar 6, 2014
Messages
686
Nice guide.
What are the advantages over using the transmission plugin with Transmission Remote GUI?
Transmission is banned on some really good trackers (especially latest versions).
Besides that, i like to use my own jail and installation, so i can control exactly what happens in there. For example, I have also configured OpenVPN and the firewall in that jail, so it only connects via the VPN and drops communication (outside my own network) if the VPN connection drops.
 
Last edited:

Darin W

Cadet
Joined
Jan 27, 2017
Messages
3
I have tried numerous time to install Deluge into the jail,
It always fails at Step 10
Code:
root@deluge:/usr/ports/net-p2p/deluge # service deluged start
deluged does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
root@deluge:/usr/ports/net-p2p/deluge #

I have looked in the /etc/rc.d file and there is no deluge files listed where are these located? do I have to make one because there is no info on this step
 
Joined
Mar 6, 2014
Messages
686
I have tried numerous time to install Deluge into the jail,
It always fails at Step 10
Code:
root@deluge:/usr/ports/net-p2p/deluge # service deluged start
deluged does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d)
root@deluge:/usr/ports/net-p2p/deluge #

I have looked in the /etc/rc.d file and there is no deluge files listed where are these located? do I have to make one because there is no info on this step
Looks like you missed step 9.
But besides that, you can look up a simpler version of this guide i posted a few replies earlier.
 

Darin W

Cadet
Joined
Jan 27, 2017
Messages
3
Looks like you missed step 9.
But besides that, you can look up a simpler version of this guide i posted a few replies earlier.
No, I have done #9 but I finally got deluge working. I ended up using a part from another post located here https://forums.freenas.org/index.php?threads/humble-request-installation-guide-for-deluge-in-a-jail-on-9-10-current-stable-build.44369/
Installed the Full deluge pkg
Then finished up the steps from this post then added PIA vpn to it.
The downloads are much faster
only issue I have now is I can't get any open ports they are all closed.
Does anyone know how to get into deluge from outside the local network?
 
Joined
Mar 6, 2014
Messages
686
only issue I have now is I can't get any open ports they are all closed.
Does anyone know how to get into deluge from outside the local network?
That is something you should do in your firewall/router/gateway. Open and forward the port you chose for Deluge to the ip of your Deluge jail. However, you have to check PIA how to use open ports / forwarding when connected through their vpn.
 

LGSONE

Dabbler
Joined
Mar 8, 2014
Messages
19
Coming back from Corral to 9.10.2. Followed this and not getting it to start. Any insight on a fresh install of freenas. Got the Plex up with no issue but this is just a no go.. Did as Rilo said and started from scratch with the 10.3 and updated all and nothing..
Is there an update guide? Had it running great in my old jails and then in docker but now.. ...
 

i3luefire

Explorer
Joined
Jan 4, 2014
Messages
69
i have not tried this recently but i think you can just create a jail and do the following inside the jail.
Code:
pkg update
pkg upgrade
pkg install deluge-cli

That gives you the exact same thing the original thread was about but with much less trouble.
 
Last edited:

i3luefire

Explorer
Joined
Jan 4, 2014
Messages
69
for the installation methot with pkg instead of port
Second but, I contacted the maintainer of the package and I hope he can produce a new deluge-cli package that would be what we need : a simple pkg install command and no X11 !!
this would make this guide completely useless, which is a good thing !
This has been done. Please update your guide to reflect the fact that deluge-cli has been created in the pkg repo.
 

swess

Cadet
Joined
May 12, 2016
Messages
6
That is something you should do in your firewall/router/gateway. Open and forward the port you chose for Deluge to the ip of your Deluge jail. However, you have to check PIA how to use open ports / forwarding when connected through their vpn.

hey again. had to remove my old jail and redo it with new freenas update and it worked but now the webui doesn't start :/
/etc/rc.conf: deluge-web_enable=YES: not found

do you happen to know what happend?
 

snickasaurus

Dabbler
Joined
Feb 19, 2012
Messages
18
/etc/rc.conf: deluge-web_enable=YES: not found

Having the same issue as you.

deluge-web_enable=YES

is most definitely in /etc/rc.conf.
 
Joined
Mar 6, 2014
Messages
686
Did you install deluge-cli? Tha one doesn't install the web version i think
 
Joined
Mar 6, 2014
Messages
686
Last edited:
Top