[HOWTO] Deluge Daemon + WebUI Installation on Debian/Ubuntu Server
Register

We are the best invite forum on the internet! Here you will find free invites, free seedboxes, free bonuses, and much more. Our members know the true meaning of sharing and have created a truly global bittorent community! Our site has the most up to date information on all private trackers and our members will guide you and introduce you to this truly secretive and enlightened club. Ready to get started? Register now!


Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
Like Tree3Likes

Thread: [HOWTO] Deluge Daemon + WebUI Installation on Debian/Ubuntu Server

  1. #1

    Join Date
    Jul 2009
    Location
    CA
    Posts
    274

    Default [HOWTO] Deluge Daemon + WebUI Installation on Debian/Ubuntu Server

    [ INTRO ]

    This brief tutorial will guide you through installation of Deluge Daemon with WebUI. The Deluge daemon(deluged) is the main program that runs in the background and processes all torrent related information. While the WebUI(deluge-web) is the front-end where you manipulate the daemon.


    [ SECURITY CONSIDERATIONS ]

    At the end of this tutorial, do not forget to change the default listen port of both the daemon and webui. Also, you need to change the default webui password.


    [ INSTALLATION ]

    We begin by installing Deluge dependencies.

    Run the command below as root:
    *** If you are using Ubuntu, add 'sudo' at every command line that requires privileged access eg: $ sudo apt-get update.
    # apt-get update && apt-get -y install g++ make gettext subversion python-all-dev python-all python-twisted python-twisted-web python-pyopenssl python-simplejson python-setuptools python-xdg python-chardet python-mako libssl-dev zlib1g-dev libboost-dev libasio-dev libboost-python-dev libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev
    Next, we download Deluge 1.3.1 source code.
    Note: Check the download page if they have a more recent version: http://download.deluge-torrent.org/source/?C=M;O=D
    # wget http://download.deluge-torrent.org/source/deluge-1.3.1.tar.gz
    Untar the package
    # tar xvzf deluge-1.3.1.tar.gz
    Now we're ready to build and install. Note: Building Deluge may take a few minutes to finish.
    # cd deluge-1.3.1
    # python setup.py build
    # python setup.py install
    # ldconfig
    You should now have 'deluged' and 'deluge-web' in your /usr/bin directory.


    [ INVOCATION ]

    Let's run both the daemon and webui:
    If you are using Debian, you need to 'su' to the user we want to run the program as.
    # su - username_here
    $ deluged
    $ screen -fa -d -m -S deluge-web deluge-web
    The second line will invoke the daemon while the third line attaches the deluge-web program to screen.




    [ TESTING ]

    Fire up your browser and connect to http://IP_ADDRESS_OF_SERVER:8112/
    Note: 8112 is the default port Deluge listens to.

    Type the default password: 'deluge' when you see the authentication dialog. You will then be asked to change your password since this is your first time to log in. Please change your password in the 'Preferences'.
    The connection manager dialog should also appear asking you to select the Deluge daemon host/ip you want to connect to. In this case we only have one, so highlight the host/ip and press the Connect button.

    Now, make changes to the 'Preferences' to suit your needs. Don't forget to change the Port for both daemon and webui, and also the password.

    We need to restart both processes after making changes to the 'Preferences'.
    Kill both deluged and deluge-web processes:
    $ kill -9 $(pgrep -u $USER deluge)
    Then respawn:
    $ deluged
    $ screen -fa -d -S deluge-web -m deluge-web
    [ POST INSTALLATION]

    If you want Deluge to resolve IP to Country in the Peers tab, you need to download and install a GeoIP .dat file.
    # wget http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
    # gzip -d GeoIPv6.dat.gz
    # mkdir -p /usr/share/geoip
    # mv GeoIPv6.dat /usr/share/geoip/
    Now go back to Preferences->Other Categories->GeoIP Database Location. Type '/usr/share/geoip/GeoIPv6.dat'.

    Finally, if you want deluged and deluge-web to run during linux bootup, add the following lines to /etc/rc.local

    ### ADD BELOW LINES IN /etc/rc.local just before 'exit 0', if there's one. ###
    ### DOn't forget to replace USER_NAME_HERE with the username you want to run deluged and delugeweb as ###
    PHP Code:
    if [ -/usr/bin/deluged ] && [ -/usr/bin/deluge-web ]; then
       su 
    -c deluged USER_NAME_HERE
       su 
    -"screen -fa -d -S USER_NAME_HERE -m deluge-web" USER_NAME_HERE
    fi 
    [ SOURCES ]

    Installation section: Deluge 1.3.1 README file
    Last edited by scoobie; December 9th, 2010 at 09:28 AM. Reason: Additional Info
    darkknight7, Enon and pgmoney like this.


  2. To remove ads become VIP. Inquire about advertising here.
  3. #2

    Join Date
    Oct 2010
    Location
    In a Dungeon
    Posts
    339

    Default

    Very good work scoobie. Deluge is very hot and popular the past days as i can see from the number of the lately posts about how to install it.I guess your tutorial will be very popular too.Thanks for your time and your effort.

  4. #3

    Join Date
    Aug 2009
    Location
    United States
    Posts
    521

    Default

    Nice job.

    If only it were this easy to install on OS X. I spent a better part of two hours trying to install Deluge on Snow Leopard, near impossible. If the Deluge team were to make a simple .dmg installer, Deluge would be the #1 mac client for sure.
    Last edited by okgg; December 2nd, 2010 at 04:53 PM.

  5. #4

    Join Date
    Jul 2009
    Location
    CA
    Posts
    274

    Default

    Bash script that will check if deluged and deluge-web are running. If either or both are not running, script will attempt to run them.

    Save it in your root (/root) directory and change the permission:
    # chmod 700 /root/check-deluge
    Then, execute following line to create an entry in /etc/crontab:
    This will make the script run every 10 minutes.
    # echo "*/10 * * * * root /root/check-deluge >> /dev/null 2>&1" >> /etc/crontab
    And here's the script:
    It creates a log file /root/.check-deluge.log that you can monitor for errors. Please let me know if you find any bugs. Thanks.

    PHP Code:
    #!/bin/bash -e

    log() {

       
    local log_msg="$1"
       
    local log_file=.check-deluge.log
       local log_separator
    ="---------------------------------------------"

       
    if [ ! -f $log_file ]; then
          touch $log_file
       fi

       
    if [ "$log_msg" == "_date" ]; then
          
    echo $log_separator >> $log_file
          
    echo $(date) >> $log_file
          
    echo >> $log_file
       
    else
          echo 
    $log_msg >> $log_file
       fi


       
    return

    }

       
    deluge_path=.config/deluge
       user_name
    =($(awk -F'/10[0-9][0-9]/ {print $1}' /etc/passwd))
       
    user_home=($(awk -F'/10[0-9][0-9]/ {print $6}' /etc/passwd))
       
    NUM=${#user_name[@]}

       
    log "_date"

       
    for ((i=0i<NUMi++))
       do
          
    dpid=$(su -"top -n 1 -u ${user_name[i]} | grep -w deluged | cut -d' ' -f2" ${user_name[i]})
          
    dpid_file=${user_home[i]}/${deluge_path}/deluged.pid

          
    if [ -n $dpid ] && [ -f $dpid_file ]; then
             
    (kill -0 $dpid > /dev/null 2>&1)
                if [ $? -
    ne 0 ]; then
                   log 
    "Info: ${user_name[i]}'s deluged is not running"
                   
    log "Info: Attempting to run ${user_name[i]}'s deluged"
                   
    if [ -/usr/bin/deluged ]; then
                      
    (su -c deluged ${user_name[i]})
                         if [ $? -
    ne 0 ]; then
                            log 
    "Error: An attempt to run ${user_name[i]}'s deluged failed!"
                         
    else
                            
    log "Info: Successfully initiated ${user_name[i]}'s deluged"
                         
    fi
                   
    else
                      
    log "Error: deluged not found!"
                      
    exit 1
                   fi
                
    else
                   
    log "Info: ${user_name[i]}'s deluged is running"
                
    fi

                dwpid
    =$(su -"top -n 1 -u ${user_name[i]} | grep -w deluge-web | cut -d' ' -f2" ${user_name[i]})

                if [ -
    n $dwpid ]; then
                   
    (kill -0 $dwpid > /dev/null 2>&1)
                      if [ $? -
    ne 0 ]; then
                        log 
    "Info: ${user_name[i]}'s deluge-web is not running"
                        
    log "Info: Attempting to run ${user_name[i]}'s deluge-web"

                         
    if [ -/usr/bin/deluge-web ]; then
                            su 
    -"screen -fa -d -S ${user_name[i]}.deluge-web -m deluge-web" ${user_name[i]}
                               if [ $? -
    ne 0 ]; then
                                  log 
    "Error: An attempt to run ${user_name[i]}'s deluge-web failed!"
                               
    else
                                  
    log "Info: Successfully initiated ${user_name[i]}'s deluge-web"
                               
    fi
                         
    else
                            
    log "Error: deluge-web not found!"
                            
    exit 1
                         fi
                      
    else
                         
    log "Info: ${user_name[i]}'s deluge-web is running"
                      
    fi
                fi

          
    else
             
    log "Warning: Skipping ${user_name[i]}"
          
    fi

       done

    exit 

  6. #5

    Join Date
    Jun 2010
    Posts
    54

    Default

    libbost-thread-dev
    Hey scoobie, I believe we need to add a double "o" in libbost? because I couldn't download it until I added the extra o.

    Sorry for being pain in da ass again but I'm wondering if its possible to have a multiple user with deluge on server?

    Thanks once again

    ------------------------Post auto merged------------------------

    Sorry I'm stuck with this error when I give command:

    $ deluged

    Traceback (most recent call last):
    File "/usr/bin/deluged", line 8, in <module>
    load_entry_point('deluge==1.3.1', 'console_scripts', 'deluged')()
    File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
    File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2179, in load_entry_point
    return ep.load()
    File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    File "/usr/lib/python2.5/site-packages/deluge-1.3.1-py2.5-linux-x86_64.egg/deluge/main.py", line 47, in <module>
    import deluge.common
    File "/usr/lib/python2.5/site-packages/deluge-1.3.1-py2.5-linux-x86_64.egg/deluge/common.py", line 44, in <module>
    import chardet
    ImportError: No module named chardet
    Last edited by iSMAEL; December 3rd, 2010 at 09:32 AM.

  7. #6

    Join Date
    Jul 2009
    Location
    CA
    Posts
    274

    Default

    Hey, nice catch!

    I'm not sure if it's possible to create multiple users in deluge-web. But you can create individual users on your server and have each one run deluged/deluge-web.

    You must have skipped the installation of python-chardet for some reason
    # apt-get -y install python-chardet
    # ldconfig

  8. #7

    Join Date
    Jun 2010
    Posts
    54

    Default

    Thank you once again, it worked.

    ------------------------Post auto merged------------------------

    Sorry again scoobie,

    I just can't start the deamon and I'm not sure if I did something wrong by changing in the connection manager to my ip and a different port and also when I change the preference settings I just can't save it.

    When I do:

    $ kill -9 $(top -n 1 -u $USER | grep -w deluged | cut -d ' ' -f 2)
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    seeduser@sbs330:~$ kill -9 $(top -n 1 -u $USER | grep -w deluge-web | cut -d ' ' -f2)
    -su: kill: seeduser: arguments must be process or job IDs

    Sorry for being stupid but this is my first time ever with deluge please help.
    Last edited by iSMAEL; December 3rd, 2010 at 11:32 AM.

  9. #8

    Join Date
    Jul 2009
    Location
    CA
    Posts
    274

    Default

    Quote Originally Posted by iSMAEL View Post
    Thank you once again, it worked.

    ------------------------Post auto merged------------------------

    Sorry again scoobie,

    I just can't start the deamon and I'm not sure if I did something wrong by changing in the connection manager to my ip and a different port and also when I change the preference settings I just can't save it.

    When I do:

    $ kill -9 $(top -n 1 -u $USER | grep -w deluged | cut -d ' ' -f 2)
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    seeduser@sbs330:~$ kill -9 $(top -n 1 -u $USER | grep -w deluge-web | cut -d ' ' -f2)
    -su: kill: seeduser: arguments must be process or job IDs

    Sorry for being stupid but this is my first time ever with deluge please help.

    There has to be no space between '-f' and '2'.

    Are there any errors when you start the daemon?

  10. #9

    Join Date
    Jun 2010
    Posts
    54

    Default

    I'm not sure how to start it, in the deluge webi it says i'm not connected and I still get this:

    kill -9 $(top -n 1 -u $USER | grep -w deluged | cut -d ' ' -f2)
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    seeduser@sbs330:~$ kill -9 $(top -n 1 -u $USER | grep -w deluge-web | cut -d ' ' -f2)
    -sh: kill: seeduser: arguments must be process or job IDs

  11. #10

    Join Date
    Jul 2009
    Location
    CA
    Posts
    274

    Default

    check if deluged and deluge-web are running:
    $ ps ux

    Kill the user deluged and deluge-web processes:
    $ kill -9 deluged_processID
    $ kill -9 deluge-web_processID

    The deluged_processID and deluge-web_processID are in the PID column when you run $ ps ux

    To run deluged:
    $ deluged

    To run deluge-web:
    $ screen -fa -d -S deluge-web.username -m deluge-web

    It shouldn't give any output messages when lauched successfully.

    If you want to deluged to default to its original port and password, delete the directory ~/.config/deluge of the user you want to run deluge with. Then run deluged + deluge-web.

    Btw, the configuration files are not gonna be saved until you load a .torrent file in deluge-web.
    Last edited by scoobie; December 3rd, 2010 at 05:41 PM.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Debian/Ubuntu Dedicated Server Setup
    By MikeD in forum Seedbox Tutorials
    Replies: 385
    Last Post: 6 Days Ago, 11:08 AM
  2. running a utorrent installation on 2 user profiles (vista)
    By elhedgehog in forum BitTorrent Discussion
    Replies: 2
    Last Post: July 3rd, 2010, 01:22 AM
  3. Replies: 6
    Last Post: December 1st, 2009, 10:44 AM
  4. Rutorrent on Debian Linux 5 lenny
    By PreMaster in forum Help
    Replies: 1
    Last Post: October 17th, 2009, 07:21 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •