Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

install DELUGE in a jail

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
Thanks for your post. You may want to take out the part where you tell them to enable deluge_web if it does not work with the deluge-cli pkg or at least note that they will need the other pkg for deluge_web.
I have corrected that, thanks.
 

dasti

Member
Joined
Jun 11, 2014
Messages
69
This has been done. Please update your guide to reflect the fact that deluge-cli has been created in the pkg repo.
indeed,
Actually writing documentation in a forum is not very convenient (for many reasons).

I'm pushing an small idea to have a nice place to write this kind of tutorials, I'll get back here with more news asap.
 

swess

Neophyte
Joined
May 12, 2016
Messages
6
I have corrected that, thanks.
I tried again but with no luck. Now I can't get into the gtk even. if i want both the web and gtk, should i do "pkg install deluge" instead of deluge-cli. I did that but it screwed up, doesn't work :/
 

Astrodonkey

Member
Joined
Jul 18, 2017
Messages
45
echo 'deluge-web_enable="YES"' >> /etc/rc.conf
This is a typo, you need to use deluge_web_enable (note underscore instead of hypen).

Also for the web version:
* echo 'deluge_web_user="deluge"' >> /etc/rc.conf

And to start it:
* /usr/local/etc/rc.d/deluge_web start
 

icsy7867

Member
Joined
Dec 31, 2015
Messages
159
I tried again but with no luck. Now I can't get into the gtk even. if i want both the web and gtk, should i do "pkg install deluge" instead of deluge-cli. I did that but it screwed up, doesn't work :/
pkg install deluge installs the web client files, but the deluge-cli does not.

Additionally, the original post here required the modification of two files in /usr/local/etc/rc.d (deluged and delugew) which I had to also do before getting the webUI to work properly.

You can find the contents of those files here:
http://dev.deluge-torrent.org/wiki/UserGuide/Service/FreeBSD

I also just installed the deluge clients using "pkg install deluge"
I now have the webclient and thinclients working. Thanks!
 

JKman

Member
Joined
Mar 23, 2014
Messages
52
I tried some stuff again and came up with a super simple guide.

Assuming the dataset you want to use for downloads is the 'media' dataset and 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 --> see remark at the bottom of this post).
  • 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 (this doesn't include web version --> see bottom of this post for different package to use for web version)
  • 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
  • /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

If you want to use the web version, then instead of installing deluge-cli, you have to install the deluge package in step 4, since it is not included in the cli version. To enable the web version, also run this command once after installation:
  • echo 'deluge-web_enable="YES"' >> /etc/rc.conf
Then go with your web browser to: http://<your jail ip>:8112 (default pw is "deluge" without the quotes)

Edit: adjusted for web version
suggest you make that chmod 600 instead. for both core.conf and auth files. keeps your passwords secure.
also suggest going into ~/.cshrc and changing umask from 22 to 2. this allows other groups, e.g. media, to read-write files. you'll probably need to restart jail after this change.
 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
suggest you make that chmod 600 instead. for both core.conf and auth files. keeps your passwords secure.
also suggest going into ~/.cshrc and changing umask from 22 to 2. this allows other groups, e.g. media, to read-write files. you'll probably need to restart jail after this change.
If you have secured SSH already, I don't see the need to do that, but yes, it's a bit safer. The second part is not needed if the media group is already owner of the dataset. Or maybe i'm missing a point here...?
 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
This is a typo, you need to use deluge_web_enable (note underscore instead of hypen).

Also for the web version:
* echo 'deluge_web_user="deluge"' >> /etc/rc.conf

And to start it:
* /usr/local/etc/rc.d/deluge_web start
Thaks, I updated the rc.conf lines and the command to start deluge-web to the guide.

Are you sure about that typo? All the guides i've seen state deluge-web and not deluge_web. Even on the Deluge website itself. I have not tested this yet.
 
Last edited:

JKman

Member
Joined
Mar 23, 2014
Messages
52
If you have secured SSH already, I don't see the need to do that, but yes, it's a bit safer. The second part is not needed if the media group is already owner of the dataset. Or maybe i'm missing a point here...?
it is needed if you have other users needing access to the dataset who are members of the media group. not especially needed in your setup case, but this is the way that i have it. i like to maintain full user/group permissions separation.
 

JKman

Member
Joined
Mar 23, 2014
Messages
52
Thaks, I updated the rc.conf lines and the command to start deluge-web to the guide.

Are you sure about that typo? All the guides i've seen state deluge-web and not deluge_web. Even on the Deluge website itself. I have not tested this yet.
random question. can you have both deluge-web and deluge-cli running at the same time? i just haven't tried but would be nice to see deluge-web from the phone when i am on the couch and deluge-cli when i am at the computer.
 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
random question. can you have both deluge-web and deluge-cli running at the same time? i just haven't tried but would be nice to see deluge-web from the phone when i am on the couch and deluge-cli when i am at the computer.
If you install the deluge pachage instead of the deluge-cli package, you will have both (if you enable them both of course)
 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
it is needed if you have other users needing access to the dataset who are members of the media group. not especially needed in your setup case, but this is the way that i have it. i like to maintain full user/group permissions separation.
Assuming the dataset you want to use for downloads is the 'media' dataset and is owned by a group named 'media' with group ID 2000
That means every user that is a member of the media group has read access by default. For example a Plex user which I put in the 'media' group. My own user is the owner of the dataset, which is the only user I want to give write access.

I did update the guide with your info, since it might be useful for others. Thanks!
 
Last edited:

Charlie86

Member
Joined
Sep 28, 2017
Messages
70
Hi,

I am haveing problems installing deluge in step

service deluged start
service deluged stop

I am getting error

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), or is not executable
root@deluge:/usr/ports/net-p2p/deluge # service deluged stop
deluged does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable



I asume, I make some mistake on step:

Code:
step 8 - install deluge

When you'll be prompted, make sure that GTK2 option is NOT installed, for the other compilations options, I just leave everything by default


I can not find option to disable GTK2 on installation. Also I am not shure if I must do anything on step or just leave it and go to next step?
Code:
not necessary anymore step 10 - replace the port's startup scripts with the ones from deluge website
 

icsy7867

Member
Joined
Dec 31, 2015
Messages
159
Hi,

I am haveing problems installing deluge in step

service deluged start
service deluged stop

I am getting error

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), or is not executable
root@deluge:/usr/ports/net-p2p/deluge # service deluged stop
deluged does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable

Do you have a deluged rc.d file?

Navigate to:
/usr/local/etc/rc.d

run
ls

See if the file exists. If it does open it with whatever editor you prefer (I like nano personally).
nano deluged

I replaced everything in here with the one from the deluge website:
http://dev.deluge-torrent.org/wiki/UserGuide/Service/FreeBSD
(In nano ctrl + k will remove a line at a time, use ctrl - o to save"

I also did this for the web version as well to get it to work.
 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
Do you have a deluged rc.d file?

Navigate to:
/usr/local/etc/rc.d

run
ls

See if the file exists. If it does open it with whatever editor you prefer (I like nano personally).
nano deluged

I replaced everything in here with the one from the deluge website:
http://dev.deluge-torrent.org/wiki/UserGuide/Service/FreeBSD
(In nano ctrl + k will remove a line at a time, use ctrl - o to save"

I also did this for the web version as well to get it to work.
You don't need to do that for current versions. If you use my guide here https://forums.freenas.org/index.php?threads/install-deluge-in-a-jail.28778/page-3#post-324869 everything should work just fine. I redid my jail last week, doing exactly what's mentioned in there.
 

Primož

Member
Joined
Feb 5, 2015
Messages
25
So, going through this guide, step 8, so command:
"cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes install clean"
gives me an error "Ports collection support for your FreeBSD version has ended, and no ports are guaranteed to build on this system. Please upgrade to a supported version."

It also told me i could silence the error by adding "ALLOW_UNSUPPORTED_SYSTEM=yes", which i did by issuing a command
"cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes ALLOW_UNSUPPORTED_SYSTEM=yes install clean"

It is installing now, but is constantly giving errors about unsupported version. I'm running FreeNAS 11.1.

EDIT: make errored out in this fashion (starting at make[17]):
"
make[5]: stopped in /usr/ports/x11/xcb-util-renderutil
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/py-cairo
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/py-gobject
*** Error code 1

Stop.
make: stopped in /usr/ports/net-p2p/deluge
"
 
Last edited:

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
So, going through this guide, step 8, so command:
"cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes install clean"
gives me an error "Ports collection support for your FreeBSD version has ended, and no ports are guaranteed to build on this system. Please upgrade to a supported version."

It also told me i could silence the error by adding "ALLOW_UNSUPPORTED_SYSTEM=yes", which i did by issuing a command
"cd /usr/ports/net-p2p/deluge && make WITHOUT_X11=yes ALLOW_UNSUPPORTED_SYSTEM=yes install clean"

It is installing now, but is constantly giving errors about unsupported version. I'm running FreeNAS 11.1.

EDIT: make errored out in this fashion (starting at make[17]):
"
make[5]: stopped in /usr/ports/x11/xcb-util-renderutil
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/py-cairo
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/py-gobject
*** Error code 1

Stop.
make: stopped in /usr/ports/net-p2p/deluge
"
Use this guide instead https://forums.freenas.org/index.php?threads/install-deluge-in-a-jail.28778/page-3#post-324869
 

Makaveli6103

Member
Joined
Mar 18, 2012
Messages
103
I have had Deluge installed for months and today it stopped working. It will not pull an IP address and will not pull up the web GUI. I SSH to the jail and start/stop the services but nothing. I try to update the packages but gives me the error below. I have other jails running with no problems. What am I missing?

Code:
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
pkg: http://pkg.FreeBSD.org/freebsd:11:x86:64/latest/meta.txz: No address record
repository FreeBSD has no meta file, using default settings
pkg: http://pkg.FreeBSD.org/freebsd:11:x86:64/latest/packagesite.txz: No address record
Unable to update repository FreeBSD
Error updating repositories!

 

Rilo Ravestein

Neophyte Sage
Joined
Mar 6, 2014
Messages
685
Top