Latest

Torrent Guide – Install Deluge Seedbox to CentOS/RHEL VPS

Share on Facebook0Tweet about this on TwitterShare on Google+0Share on StumbleUpon0Share on Reddit0Digg this

Deluge_icon

This guide assumes you have already found a VPS provider and chosen and installed CentOS or other RHEL distro.

Deluge BitTorrent Client

Downloading!

Deluge is a popular multi-platform bittorrent client often used to provide torrenting / seedbox functionality on Linux servers. Although it is not as popular as ruTorrent it still has a solid place in the seedbox community and provides some functionality not found (or properly implemented) elsewhere such as SOCKS5 proxy support.

If you are a complete beginner to Linux then Deluge makes a great starting point due to the ease of install compared to rTorrent.

Installing Deluge to CentOS 6.5

For my guide I am using the latest updated CentOS 6.5. I believe other RHEL based distro’s should work as well, but for compatibility with this guide, CentOS 6 is suggested.

Please ensure you are logged in as root before we begin. If your root account is disabled please sudo commands as needed.

Install Deluge from repositories.

Deluge is not part of the standard repositories the same way it is for Ubuntu, but there are third party repositories we can add which will make this installation is extremely simple and pain free and not require the compilation of any source code.

First off we will add the Linux-Tech distro to our system:

nano /etc/yum.repos.d/linuxtech.repo

And paste the following:

[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

Now we can install deluge and all necessities with Yum:

yum install deluge

Run Deluge via the Deluge-Daemon and start up the Web Interface using –fork argument to start a new background process. We are just testing for now so don’t worry about the fact that we are running as root:

deluged
deluge-web --fork

We will additionally want to prep some folders for our downloads. On my box I have a user called “seedbox” which is being shared with an rtorrent process. I will just have the files go into these existing folders. Adjust accordingly for your environment.

cd /home/seedbox
mkdir files
mkdir .temp
mkdir watch
chown -R seedbox:seedbox /home/seedbox

Test and Configure Deluge Install

Deluge is now running and ready for us to login for the first time!

The install port will have defaulted to 8112 (ie: http://host.example.com:8112/).  The Web UI requires a password to login which will have defaulted to “deluge” and will need to be changed on login.

Additionally when you login for the first time you will need to connect to your daemon process. This will hook the Web UI into the torrent server, and allows you to potentially run multiple copies of Deluge at one time.

There are some settings to setup here such as changing our password and setting up our directories. However, we are currently running as root so let’s wait till after the next step when we get our daemon processes setup correctly and come back to configure this.

If you want to go ahead and run a test file through, you can do so now. Add a torrent via the green “+” and either select the torrent from your computer or enter the url of the torrent off the network. If everything is setup correctly it should download and end up in your set folders afterwards.

Run Deluge and Web UI On Startup

We’ll want Deluge to startup with the server on boot and run as our “seedbox” user.

We can do this through rc.local script.

nano /etc/rc.local

Add the following (before Exit 0!):

su seedbox -c "deluged"
su seedbox -c "deluge-web --fork"

We can now reboot the server, finish setting up our directories in the UI and we are ready to go.

Share on Facebook0Tweet about this on TwitterShare on Google+0Share on StumbleUpon0Share on Reddit0Digg this

3 Comments on Torrent Guide – Install Deluge Seedbox to CentOS/RHEL VPS

  1. root@server1 [~]# deluged
    root@server1 [~]# deluge-web –fork
    root@server1 [~]# cd /home/seedbox
    -bash: cd: /home/seedbox: No such file or directory
    root@server1 [~]# deluge
    Traceback (most recent call last):
    File “/usr/bin/deluge”, line 9, in
    load_entry_point(‘deluge==1.3.5’, ‘gui_scripts’, ‘deluge’)()
    File “/usr/lib/python2.6/site-packages/deluge/main.py”, line 132, in start_ui
    UI(options, args, options.args)
    File “/usr/lib/python2.6/site-packages/deluge/ui/ui.py”, line 149, in __init__
    from deluge.ui.gtkui.gtkui import GtkUI
    File “/usr/lib/python2.6/site-packages/deluge/ui/gtkui/__init__.py”, line 1, i n
    from gtkui import start
    File “/usr/lib/python2.6/site-packages/deluge/ui/gtkui/gtkui.py”, line 42, in
    reactor = gtk2reactor.install()
    File “/usr/lib/python2.6/site-packages/twisted/internet/gtk2reactor.py”, line 280, in install
    reactor = Gtk2Reactor(useGtk)
    File “/usr/lib/python2.6/site-packages/twisted/internet/gtk2reactor.py”, line 94, in __init__
    import gtk
    File “/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py”, line 64, in
    _init()
    File “/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py”, line 52, in _ init
    _gtk.init_check()
    RuntimeError: could not open display
    root@server1 [~]# yum install deluge
    Loaded plugins: fastestmirror, refresh-packagekit
    Loading mirror speeds from cached hostfile
    * base: bay.uchicago.edu
    * extras: mirrors.usinternet.com
    * updates: mirror.wiredtree.com
    Setting up Install Process
    Package deluge-1.3.5-1.el6.noarch already installed and latest version
    Nothing to do
    root@server1 [~]# deluged
    root@server1 [~]# deluge
    Traceback (most recent call last):
    File “/usr/bin/deluge”, line 9, in
    load_entry_point(‘deluge==1.3.5’, ‘gui_scripts’, ‘deluge’)()
    File “/usr/lib/python2.6/site-packages/deluge/main.py”, line 132, in start_ui
    UI(options, args, options.args)
    File “/usr/lib/python2.6/site-packages/deluge/ui/ui.py”, line 149, in __init__
    from deluge.ui.gtkui.gtkui import GtkUI
    File “/usr/lib/python2.6/site-packages/deluge/ui/gtkui/__init__.py”, line 1, i n
    from gtkui import start
    File “/usr/lib/python2.6/site-packages/deluge/ui/gtkui/gtkui.py”, line 42, in
    reactor = gtk2reactor.install()
    File “/usr/lib/python2.6/site-packages/twisted/internet/gtk2reactor.py”, line 280, in install
    reactor = Gtk2Reactor(useGtk)
    File “/usr/lib/python2.6/site-packages/twisted/internet/gtk2reactor.py”, line 94, in __init__
    import gtk
    File “/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py”, line 64, in
    _init()
    File “/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py”, line 52, in _ init
    _gtk.init_check()
    RuntimeError: could not open display
    root@server1 [~]# deluge-web –fork
    root@server1 [~]# Traceback (most recent call last):
    File “/usr/bin/deluge-web”, line 9, in
    load_entry_point(‘deluge==1.3.5’, ‘console_scripts’, ‘deluge-web’)()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/web.py”, line 138, in sta rt
    web.start()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/web.py”, line 125, in sta rt
    self.server.start()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/server.py”, line 665, in start
    self.start_normal()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/server.py”, line 673, in start_normal
    self.socket = reactor.listenTCP(self.port, self.site)
    File “/usr/lib/python2.6/site-packages/twisted/internet/posixbase.py”, line 35 6, in listenTCP
    p.startListening()
    File “/usr/lib/python2.6/site-packages/twisted/internet/tcp.py”, line 858, in startListening
    raise CannotListenError, (self.interface, self.port, le)
    twisted.internet.error.CannotListenError: Couldn’t listen on any:8112: [Errno 98 ] Address already in use.
    cd /home/seedbox
    -bash: cd: /home/seedbox: No such file or directory
    root@server1 [~]# deluge-web –fork
    root@server1 [~]# Traceback (most recent call last):
    File “/usr/bin/deluge-web”, line 9, in
    load_entry_point(‘deluge==1.3.5’, ‘console_scripts’, ‘deluge-web’)()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/web.py”, line 138, in start
    web.start()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/web.py”, line 125, in start
    self.server.start()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/server.py”, line 665, in start
    self.start_normal()
    File “/usr/lib/python2.6/site-packages/deluge/ui/web/server.py”, line 673, in start_normal
    self.socket = reactor.listenTCP(self.port, self.site)
    File “/usr/lib/python2.6/site-packages/twisted/internet/posixbase.py”, line 356, in listenTCP
    p.startListening()
    File “/usr/lib/python2.6/site-packages/twisted/internet/tcp.py”, line 858, in startListening
    raise CannotListenError, (self.interface, self.port, le)
    twisted.internet.error.CannotListenError: Couldn’t listen on any:8112: [Errno 98] Address already in use.

    • 1 – The guide suggests installing VestaCP and then creating a user called “Seedbox”. If you haven’t done that, then the /home/seedbox folder doesn’t exist so that will fail. You don’t really need VestaCP it just makes life easier, you could look up a guide for adding a user in linux, it’s fairly simple.

      2 – There is no need to run “deluge” again after running “deluged”. deluged means “Deluge Daemon” which means it runs deluge as a background process. When you try to run it again it errors out because it’s already running and using port 8112.

      3 – The command is deluge-web –fork, 2 dashes not 1.

  2. Works fine! Thank you.

Leave a comment

Your email address will not be published.


*