Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
  • Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x
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 12
  1. #1

    Join Date
    Oct 2013
    Location
    United States
    Posts
    149

    Default Rtorrent + Rutorrent 2017 Seedbox Setup Guide Debian 8.x / Ubuntu 16.x

    rTorrent and ruTorrent are a powerful combination coupling the stability and performance of the rtorrent CLI client and the usability and feature-set of ruTorrent's web-based GUI. Getting both applications functioning properly and communicating with each other can be tricky with so many dependencies and configuration adjustments required. This guide will walk you through a comprehensive and customized setup of your server.

    Distributions

    Installation and configuration of these applications for different distributions of Linux is largely the same, but this guide is written specifically for Debian 8.x and Ubuntu 16.x.

    Preparation

    Start by updating and upgrading the operating system:
    Code:
    apt-get update && apt-get upgrade
    Secure Your Environment

    You likely know you shouldn't operate as root, whether you know why or not. If you want to know more, there are lots of resources. If you're starting from scratch, and this machine will be principally dedicated to rTorrent and ruTorrent, having a security hardened system likely isn't a major concern. But, if you're learning, you may as well learn with best practices in mind.

    Create a new user:
    Code:
    adduser username
    Install sudo:
    Code:
    apt-get install sudo
    Install nano (may already be installed):
    Code:
    apt-get update && apt-get install nano
    Open the super users list:
    Code:
    EDITOR=nano visudo
    Add your username to grant yourself super user privileges:
    Code:
    # User privilege specification
    root    ALL=(ALL:ALL) ALL
    username    ALL=(ALL:ALL) ALL
    Open SSH configuration for editing:
    Code:
    nano /etc/ssh/sshd_config
    Let's edit the SSH configuration to make your server a little more secure. The following adjustments will...
    • Change the default SSH port to make it more difficult for attackers to access.
    • Disallow root login while only allowing your user account to login via SSH. An attacker would now have to guess the port and username.
    • Turn off x11 forwarding and DNS for added security.


    Modify the following lines in sshd_config (change Port to your customized number):
    Code:
    Port 8462
    PermitRootLogin no
    X11Forwarding no
    Add the following lines to the bottom of sshd_config:
    Code:
    UseDNS no
    AllowUsers username
    Restart SSH daemon:
    Code:
    service ssh reload
    Open a new terminal and test logging in with your newly created user + modified SSH port. If it works, close the root session and continue with your new user account, if not, check settings in previous steps with the root terminal.

    From now on, we will prepend sudo to many commands. This will execute the command with super user privileges, a requisite for modifying any files not owned by your user account.

    rTorrent + LibTorrent + XML-RPC

    Install Dependencies

    Paste this entire line into the terminal to install each dependency.
    Code:
    sudo apt-get install -y build-essential subversion autoconf screen g++ gcc ntp curl comerr-dev pkg-config cfv libtool libssl-dev libncurses5-dev ncurses-term libsigc++-2.0-dev libcppunit-dev libcurl3 libcurl4-openssl-dev git
    * -y makes the operation assume "yes" as answer to all prompts and run non-interactively.

    Install XML-RPC

    From the project homepage:
    XML-RPC is a quick-and-easy way to make procedure calls over the Internet. It converts the procedure call into an XML document, sends it to a remote server using HTTP, and gets back the response as XML.
    XML-RPC is required for communication between rTorrent and ruTorrent.

    Code:
    svn co -q https://svn.code.sf.net/p/xmlrpc-c/code/stable /tmp/xmlrpc-c
    cd /tmp/xmlrpc-c
    ./configure --disable-libwww-client --disable-wininet-client --disable-abyss-server --disable-cgi-server
    make -j2
    sudo make install
    * Each of these commands should be executed individually. (Don't copy and paste the entire block; input them line by line.)

    In the commands above we've...
    • downloaded and unpacked XML-RPC into its own temporary directory.
    • configured XML-RPC while disabling features that we don't need for rtorrent/rutorrent.
    • used the -j2 modifier for make, forcing it to recompile using two threads. If you have a dual- or quad-core CPU, you can increase this number to speed up the compiling process (to a degree).


    Install LibTorrent

    LibTorrent is the library on which the rTorrent client runs.

    Before beginning this section, navigate to Rtorrent by rakshasa in your browser to find the latest version of the library. Update the filename in the commands below to account for the version of LibTorrent you'd like to use. Make sure any communities you belong to have the torrent client you choose to use whitelisted.

    Code:
    cd /tmp
    curl http://rtorrent.net/downloads/libtorrent-0.13.6.tar.gz | tar xz
    cd libtorrent-0.13.6
    ./autogen.sh
    ./configure
    make -j2
    sudo make install
    Install rTorrent

    Just as with the previous section, navigate to Rtorrent by rakshasa in your browser to find the latest version of the client. Update the filename in the commands below to account for the version of rTorrent you'd like to use. Make sure any communities you belong to have the torrent client you choose to use whitelisted.

    Code:
    cd /tmp
    curl http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz | tar xz
    cd rtorrent-0.9.6
    ./autogen.sh
    ./configure --with-xmlrpc-c
    make -j2
    sudo make install
    sudo ldconfig
    Make rTorrent directories and change their owner:
    Code:
    sudo mkdir -p /home/downloads/{.session,~watch}
    sudo chown -R username:username /home/downloads
    • The -p flag makes nested directories. I.e., it will create the directory downloads and nest .session and ~watch within it.
    • The -R flag recursively applies chown to the target's subfolders.


    Configure rTorrent

    To configure rTorrent, you need to modify the file ~/.rtorrent.rc. You can either modify each line individually, or paste the preconfigured file provided below.

    Copy and Paste Preconfigured .rtorrent.rc File

    Create the file in your home directory:

    Code:
    nano ~/.rtorrent.rc
    Paste the contents of following file into the .rtorrent.rc file you just created in Nano.

    Code:
    # Maximum and minimum number of peers to connect to per torrent.
    min_peers = 40
    max_peers = 100
    
    # Same as above but for seeding completed torrents (-1 = same as downloading)
    min_peers_seed = 25
    max_peers_seed = 60
    
    # Maximum number of simultaneous uploads per torrent.
    max_uploads = 30
    
    # Global upload and download rate in KiB. "0" for unlimited.
    #download_rate = 0
    #upload_rate = 0
    
    # Default directory to save the downloaded torrents.
    directory = /home/downloads
    
    # Default session directory. Make sure you don't run multiple instance
    # of rtorrent using the same session directory. Perhaps using a
    # relative path?
    session = /home/downloads/.session
    
    # Watch a directory for new torrents, and stop those that have been
    # deleted.
    schedule = watch_directory,5,5,load_start=/home/downloads/.watch/*.torrent
    
    # Close torrents when diskspace is low.
    schedule = low_diskspace,5,60,close_low_diskspace=10240M
    
    # The ip address reported to the tracker.
    #ip = 127.0.0.1
    #ip = rakshasa.no
    
    # The ip address the listening socket and outgoing connections is
    # bound to.
    #bind = 127.0.0.1
    #bind = rakshasa.no
    
    # Port range to use for listening.
    port_range = 55950-56000
    
    # Start opening ports at a random position within the port range.
    port_random = yes
    
    # Check hash for finished torrents. Might be usefull until the bug is
    # fixed that causes lack of diskspace not to be properly reported.
    check_hash = yes
    
    # Set whether the client should try to connect to UDP trackers.
    use_udp_trackers = yes
    
    # Alternative calls to bind and ip that should handle dynamic ip's.
    #schedule = ip_tick,0,1800,ip=rakshasa
    #schedule = bind_tick,0,1800,bind=rakshasa
    
    # Encryption options, set to none (default) or any combination of the following:
    # allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
    #
    # The example value allows incoming encrypted connections, starts unencrypted
    # outgoing connections but retries with encryption if they fail, preferring
    # plaintext to RC4 encryption after the encrypted handshake
    #
    encryption = allow_incoming,enable_retry,prefer_plaintext
    
    # Enable DHT support for trackerless torrents or when all trackers are down.
    # May be set to "disable" (completely disable DHT), "off" (do not start DHT),
    # "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
    # The default is "off". For DHT to work, a session directory must be defined.
    #
    dht = disable
    
    # UDP port to use for DHT.
    #
    # dht_port = 6881
    
    # Enable peer exchange (for torrents not marked private)
    #
    peer_exchange = no
    
    scgi_port = 127.0.0.1:5000
    Modify these values as you see fit. Of note, these lines...
    • Define the default downloads directory as /home/downloads.
    • Tell rTorrent where to 'watch' for new torrent files that are uploaded to the server, and to not add them if there is less than 10GB of disk space available.
    • Disable DHT and peer exchange, which is a requirement of most private trackers.
    • Define the scgi port for rTorrent


    Let's check to make sure rTorrent starts.
    Code:
    rtorrent
    You won't anything interesting; if it opens, we're good to go.
    Close rTorrent by pressing Ctrl+Q.

    Next, we'll start rTorrent in a screen session that will allow it to continue running in the background.
    Code:
    screen -S rtorrent -fa -d -m rtorrent
    What do those modifiers mean?
    • -S rtorrent Screen session name: rtorrent
    • -d -m Start screen in detached mode; exit if session terminates
    • -fa Flow control: automatic


    Automatically Start rTorrent on System Boot

    It's inconvenient to have to start rTorrent manually every time the server restarts. We can make it start automatically upon reboot by using a bash script.
    Code:
    sudo nano /etc/init.d/rtorrent
    Paste the contents of this file into the terminal. Many thanks to Greg Methvin for the original script, and Max Power for the fork designed to work specifically with ruTorrent and XML-RPC.
    Code:
    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides:          rtorrent
    # Required-Start:    $local_fs $remote_fs $network $syslog
    # Required-Stop:     $local_fs $remote_fs $network $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start/stop rtorrent daemon
    ### END INIT INFO
    
    # ------------------------------------------------------------------------------
    # /etc/init.d/rtorrent
    #
    # This script is an init script to run rtorrent in the background, using a
    # screen. The script was designed and tested for Debian systems, but may work on
    # other systems. On Debian, enable it by moving the script to
    # "/etc/init.d/rtorrent" and issuing the command
    # "update-rc.d rtorrent defaults 99"
    #    ____                _ _
    #   / ___|  ___  ___  __| | |__   _____  __
    #   \___ \ / _ \/ _ \/ _` | '_ \ / _ \ \/ /
    #    ___) |  __/  __/ (_| | |_) | (_) >  <
    #   |____/ \___|\___|\__,_|_.__/ \___/_/\_\
    #
    #  @See  http://methvin.net/scripts/rtorrent
    #  @See  Advanced Bash-Scripting Guide
    # ------------------------------------------------------------------------------
    
    ## Username to run rtorrent under, make sure you have a .rtorrent.rc in the
    ## home directory of this user!
    USER="username"
    
    ## Absolute path to the rtorrent binary.
    ## run "which rtorrent"
    RTORRENT="/usr/local/bin/rtorrent"
    
    ## Absolute path to the screen binary.
    SCREEN="/usr/bin/screen"
    
    ## Name of the screen session, you can then "screen -r rtorrent" to get it back
    ## to the foreground and work with it on your shell.
    SCREEN_NAME="rtorrent"
    
    ## Absolute path to rtorrent's PID file.
    PIDFILE="/var/run/rtorrent.pid"
    
    ## Absolute path to rtorrent's XMLRPC socket.
    SOCKET="/var/run/rtorrent/rpc.socket"
    
    ## Check if the socket exists and if it exists delete it.
    delete_socket() {
    if [[ -e $SOCKET ]]; then
    rm -f $SOCKET
    fi
    }
    
    case "$1" in
    ## Start rtorrent in the background.
    start)
    echo "Starting rtorrent."
    delete_socket
    start-stop-daemon --start --background --oknodo \
    --pidfile "$PIDFILE" --make-pidfile \
    --chuid $USER \
    --exec $SCREEN -- -DmUS $SCREEN_NAME $RTORRENT
    if [[ $? -ne 0 ]]; then
    echo "Error: rtorrent failed to start."
    exit 1
    fi
    echo "rtorrent started successfully."
    ;;
    
    ## Stop rtorrent.
    stop)
    echo "Stopping rtorrent."
    start-stop-daemon --stop --oknodo --pidfile "$PIDFILE"
    if [[ $? -ne 0 ]]; then
    echo "Error: failed to stop rtorrent process."
    exit 1
    fi
    delete_socket
    echo "rtorrent stopped successfully."
    ;;
    
    ## Restart rtorrent.
    restart)
    "$0" stop
    sleep 1
    "$0" start || exit 1
    ;;
    
    ## Print usage information if the user gives an invalid option.
    *)
    echo "Usage: $0 [start|stop|restart]"
    exit 1
    ;;
    
    esac
    Set permissions and install the init script.
    Code:
    sudo chmod +x /etc/init.d/rtorrent
    sudo update-rc.d rtorrent defaults 99
    Apache + PHP + SSL

    Install Web Server Dependencies

    For Ubuntu 16.4 LTS:
    Code:
    sudo apt-get install apache2 apache2-utils libapache2-mod-php
    For Debian 8:
    Code:
    sudo apt-get install apache2 apache2-utils libapache2-mod-php5
    Configure Apache

    Enable auth_digest module for ruTorrent authentication, SSL, and reqtimeout.
    Code:
    sudo a2enmod auth_digest ssl reqtimeout
    Open apache2.conf
    Code:
    sudo nano /etc/apache2/apache2.conf
    Edit or add the following lines:
    Code:
    Timeout 30
    ServerSignature Off
    ServerTokens Prod
    ServerTokens Prod will prevent Apache from reporting its version number, and ServerSignature Off will disable the server signature displayed in Apache error messages. Small steps to harden your system.

    Restart Apache
    Code:
    sudo service apache2 restart
    Now, let's confirm that Apache and PHP are working.
    Code:
    echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php
    The previous command created a file called info.php in the web root containing the function phpinfo(), which, if everything is functioning properly, should print a large table of information detailing your server's PHP settings.

    Open your browser and navigate to 123.123.123.123/info.php
    ** Replace 123.123.123.123 with your actual servers IP address.

    After confirming that PHP and Apache are working, remove info.php to avoid unnecessarily exposing information about your system.
    Code:
    sudo rm /var/www/html/info.php
    Create an SSL Certificate

    We'll create a self-signed SSL certificate that will allow you to access ruTorrent via the https:// protocol and will expire in 10 years.
    Code:
    sudo mkdir /etc/apache2/ssl
    sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.pem -out /etc/apache2/ssl/apache.pem
    Fill in the fields as prompted, or leave them blank (excepting the CN field). Be sure to input something for the CN (Common Name) field. Typically this is your server's hostname, but if you have a domain pointed to your server, you may use that instead.

    Now, change the permissions for the newly created certificate, as some programs will refuse to load these certificates if permissions are set wrong.
    Code:
    sudo chmod 600 /etc/apache2/ssl/apache.pem
    Configure Apache Access

    Open Apache's default configuration:
    Code:
    sudo nano /etc/apache2/sites-available/000-default.conf
    Modify as follows, or replace the whole document, to enable SSL on port 443 and to setup Auth Digest for the rutorrent directory:
    Code:
    <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    
    DocumentRoot /var/www/html
    <Directory />
      Options FollowSymLinks
      AllowOverride All
    </Directory>
    <Directory /var/www/html/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
    </Directory>
    
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    
    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn
    
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    <Location /rutorrent>
      AuthType Digest
      AuthName "rutorrent"
      AuthDigestDomain /var/www/html/rutorrent/ http://123.123.123.123/rutorrent
      AuthDigestProvider file
      AuthUserFile /etc/apache2/.htpasswd
      Require valid-user
      SetEnv R_ENV "/var/www/html/rutorrent"
    </Location>
    </VirtualHost>
    
    <VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName 123.123.123.123:443
    
    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    
    DocumentRoot /var/www/html/
    <Directory />
      Options FollowSymLinks
      AllowOverride All
    </Directory>
    <Directory /var/www/html/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Order allow,deny
      allow from all
    </Directory>
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    
    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel warn
    
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    
    <Location /rutorrent>
      AuthType Digest
      AuthName "rutorrent"
      AuthDigestDomain /var/www/html/rutorrent/ http://123.123.123.123/rutorrent
      AuthDigestProvider file
      AuthUserFile /etc/apache2/.htpasswd
      Require valid-user
      SetEnv R_ENV "/var/www/html/rutorrent"
    </Location>
    </VirtualHost>
    Enable SSL for your site:
    Code:
    sudo a2ensite default-ssl
    Restart Apache
    Code:
    sudo service apache2 restart
    Confirm that Apache and SSL are working by navigating to your server in a browser with the https:// prefix: https://123.123.123.123

    You will likely receive a warning from your browser suggesting that the site is insecure. This is because of our self-signed certificate; ignore it and proceed.

    You should see a page containing the text, "It works!" Or with new versions of Ubuntu, you'll see the "Apache2 Ubuntu Default Page."

    Optional: Modify PHP Settings

    If you ever find yourself uploading one or two dozen torrents at a time, you may want to adjust the PHP settings to allow for larger file uploads.

    First, create a new phpinfo() file. There are other, quicker ways to find the active php.ini file, but this is a surefire method that won't leave you editing one of the inactive files.
    Code:
    echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php
    Go to 123.123.123.123/info.php in your browser.

    Find the line that says Loaded Configuration file and then copy and paste its location in the following command, replacing the underlined string:
    Code:
    sudo nano /etc/php5/apache2/php.ini
    Use Ctrl+W in Nano to find and modify the following lines:
    Code:
    upload_max_filesize = 64M
    max_file_uploads = 200
    post_max_size = 128M
    * You may set these values to whatever you like.

    Remove the file info.php to reduce security risks.
    Code:
    sudo rm /var/www/html/info.php
    Restart Apache
    Code:
    sudo service apache2 restart
    ruTorrent

    Install ruTorrent Dependencies

    Ubuntu 16.4 LTS:
    Code:
    sudo apt-get install zip unzip zlib1g-dev ffmpeg mediainfo
    sudo apt-get install unrar rar
    Debian 8:

    For Debian 8, you must add an additional repository:
    Code:
    sudo nano /etc/apt/sources.list
    Add the following line:
    Code:
    deb http://ftp.us.debian.org/debian jessie-backports main contrib non-free
    Run the following command to install FFMPEG.
    Code:
    sudo apt update && sudo apt install -t jessie-backports ffmpeg
    * If installation of rar and unrar packages fails, you'll need to add the non-free repositories to your operating system.

    Download ruTorrent

    Download ruTorrent from the project's Github repository, remove the packaged plugins directory, then replace it with the plugins from the repository. The following commands will download the latest versions of ruTorrent and plugins. No need to find the latest versions like in previous steps.
    Code:
    cd /var/www/html
    sudo git clone https://github.com/Novik/ruTorrent.git rutorrent
    sudo rm -r rutorrent/plugins
    sudo svn checkout https://github.com/Novik/ruTorrent/trunk/plugins rutorrent/plugins
    Configure ruTorrent

    Transfer ownership of rutorrent files to webserver so that they are accessible:
    Code:
    sudo chown -R www-data:www-data rutorrent
    sudo chmod -R 755 rutorrent
    Edit the ruTorrent configuration file:
    Code:
    sudo nano rutorrent/conf/config.php
    Code:
    $log_file = '/tmp/rutorrent_errors.log';
        $topDirectory = '/home/downloads/';
        $pathToExternals = array(
            "php" => '/usr/bin/php',
            "curl" => '/usr/bin/curl',
            "gzip" => '/bin/gzip',
            "id" => '/usr/bin/id',
            "stat" => '/usr/bin/stat',
        );
    Those modifications...
    • Changed the error log filename to differentiate it from other error logs.
    • Restricted the ruTorrent interface to /home/downloads.
    • Defined the paths to ruTorrent dependencies.


    Configure ruTorrent Plugins

    ruTorrent has extended functionality beyond basic interface with rTorrent via a robust set of plugins. The plugins.ini file allows you to either hardcode an on/off state for individual plugins, or set them as user-defined, which allows you to determine their state within the ruTorrent web GUI.

    This alphabetized version of plugins.ini enables all of the (subjectively) most useful plugins, and the additional optional plugins you can choose to install later in this guide. Enable/disable plugins as you see fit (the more plugins enabled, the longer ruTorrent will take to load), and if you don't know what something does, leave it set as user-defined, and explore the features in the web GUI.
    Code:
    sudo rm -f /var/www/html/rutorrent/conf/plugins.ini
    sudo nano /var/www/html/rutorrent/conf/plugins.ini
    Code:
    ;; Plugins permissions.
    ;; If flag is not found in plugin section, corresponding flag from "default" section is used.
    ;; If flag is not found in "default" section, it is assumed to be "yes".
    ;;
    ;; For setting individual plugin permissions you must write something like that:
    ;;
    ;; [ratio]
    ;; enabled = yes ;; also may be "user-defined", in this case user can control plugins state from UI
    ;; canChangeToolbar = yes
    ;; canChangeMenu = yes
    ;; canChangeOptions = no
    ;; canChangeTabs = yes
    ;; canChangeColumns = yes
    ;; canChangeStatusBar = yes
    ;; canChangeCategory = yes
    ;; canBeShutdowned = yes
    
    [default]
    enabled = user-defined
    canChangeToolbar = yes
    canChangeMenu = yes
    canChangeOptions = yes
    canChangeTabs = yes
    canChangeColumns = yes
    canChangeStatusBar = yes
    canChangeCategory = yes
    canBeShutdowned = yes
    
    
    
    [_getdir]
    enabled = yes
    
    [_task]
    enabled = yes
    
    [autotools]
    enabled = user-defined
    
    [chat]
    enabled = no
    
    [check_port]
    enabled = no
    
    [chunks]
    enabled = user-defined
    
    [cookies]
    enabled = user-defined
    
    [cpuload]
    enabled = user-defined
    
    [create]
    enabled = user-defined
    
    [data]
    enabled = user-defined
    
    [datadir]
    enabled = yes
    
    [diskspace]
    enabled = user-defined
    
    [edit]
    enabled = user-defined
    
    [erasedata]
    enabled = user-defined
    
    [extratio]
    enabled = user-defined
    
    [extsearch]
    enabled = user-defined
    
    [feeds]
    enabled = no
    
    [filedrop]
    enabled = user-defined
    
    [filemanager]
    enabled = yes
    
    [fileshare]
    enabled = yes
    
    [geoip]
    enabled = user-defined
    
    [history]
    enabled = no
    
    [httprpc]
    canBeShutdowned = no
    
    [instantsearch]
    enabled = no
    
    [ipad]
    enabled = user-defined
    
    [logoff]
    enabled = yes
    
    [loginmgr]
    enabled = no
    
    [mediainfo]
    enabled = yes
    
    [mediastream]
    enabled = yes
    
    [pausewebui]
    enabled = yes
    
    [ratio]
    enabled = user-defined
    
    [ratiocolor]
    enabled = user-defined
    
    [retrackers]
    enabled = no
    
    [rpc]
    enabled = no
    
    [rss]
    enabled = user-defined
    
    [rssurlrewrite]
    enabled = no
    
    [rutracker_check]
    enabled = no
    
    [scheduler]
    enabled = user-defined
    
    [screenshots]
    enabled = yes
    
    [seedingtime]
    enabled = yes
    
    [show_peers_like_wtorrent]
    enabled = user-defined
    
    [source]
    enabled = yes
    
    [theme]
    enabled = yes
    
    [throttle]
    enabled = user-defined
    
    [titlebar]
    enabled = user-defined
    
    [tracklabels]
    enabled = user-defined
    
    [trafic]
    enabled = user-defined
    
    [unpack]
    enabled = user-defined
    Create ruTorrent Credentials

    Now let's create a username/password for ruTorrent. This is a different set of credentials than the SSH user account we created at the beginning of this process. It's more secure to pick different credentials than those you chose previously, but less convenient. It's your choice.
    Code:
    sudo htdigest -c /etc/apache2/.htpasswd rutorrent username
    Status Report

    You've now completed all the steps to run rTorrent and ruTorrent on your server. You can stop here, or add additional functionality to ruTorrent or to your server, like the ability to stream media to your local devices, and automatically download torrents that match custom filter rules.

    Before we go any further, verify that everything is working as expected. It's easier to fix problems now with fewer components to troubleshoot.

    Navigate to https://123.123.123.123/rutorrent

    Make sure the GUI loads, and then try adding a torrent.

    Troubleshooting

    Apache Error Logs

    Debian/Ubuntu: /var/log/apache2/error.log

    CentOS: /var/log/httpd/error_log

    rTorrent won't start after reboot

    If you find that rtorrent will not start on reboot, try to start rtorrent manually:
    Code:
    rtorrent
    You'll likely get the following error:
    Code:
    rtorrent: Could not lock session directory: "/home/downloads/.session/", held by "123.123.123.123:+XXXX".
    This can happen if your system crashes, or if you run out of disk space. To resolve the issue, delete rtorrent.lock from the session directory.
    Code:
    sudo rm -f /home/downloads/.session/rtorrent.lock
    Now rtorrent should start, and you can reboot or start a new screen session for rtorrent:
    Code:
    screen -S rtorrent -fa -d -m rtorrent
    ruTorrent Plugins

    There are a handful of advanced plugins that don't come packaged with ruTorrent but can be very useful. These plugins are developed by third-parties and are not as well supported as ruTorrent, but if you have issues, please consult the plugin's respective forum thread referenced in each section.

    This section has been mostly deprecated as the many of the advanced plugins listed here are no longer available. Visit the 3rd Party Plugins section on Github to find additional plugins.

    Tadd-labels Plugin

    The tadd-labels and sort-labels plugin is a "label management suite" that expands the functionality of the labeling system built into ruTorrent.

    Install tadd-labels & sort-labels:
    Code:
    cd /tmp
    wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/rutorrent-tadd-labels/lbll-suite_0.8.1.tar.gz
    tar zxvf lbll-suite_0.8.1.tar.gz
    sudo mv lbll-suite /var/www/html/rutorrent/plugins
    ruTorrent Style

    ruTorrent comes with several themes out of the box, one of which we can make a few adjustments to before we even leave the gate.

    Theme: Oblivion

    One of the most popular themes is a dark theme called "Oblivion." Let's set it as the default:
    Code:
    sudo perl -pi -e "s/\$defaultTheme \= \"\"\;/\$defaultTheme \= \"Oblivion\"\;/g" /var/www/html/rutorrent/plugins/theme/conf.php
    The current version of ruTorrent (v3.6) and earlier ship with stock, unstyled scrollbars that clash with "Oblivion" and use too much screen real estate. If you use a Webkit browser, we can style them elegantly to match:
    Code:
    sudo nano /var/www/html/rutorrent/css/style.css
    Add the following lines of CSS to the very bottom (or anywhere, really) of style.css:
    Code:
    ::-webkit-scrollbar { width:12px; height:12px; padding:0px; margin:0px; }
    Autodl-irssi

    "[Autodl-irssi is a] plugin for Irssi which monitors torrent IRC announce channels, downloads torrent files based on a user-defined filter, and then sends the torrent files to a local or remote torrent client."
    Autodl-irssi was redeveloped as a community project after the original developer abandoned the project. We'll be using the community version hosted on Github instead of the original project from Sourceforge.

    Autodl-irssi has an automated install script, but it requires you to uninstall the web server you currently have installed so it can be reconfigured. We don't want to do that because we've already gone through a bit of trouble to get Apache configured how we want it.

    Install Dependencies
    Code:
    sudo apt-get -y install irssi libarchive-zip-perl libnet-ssleay-perl libhtml-parser-perl libxml-libxml-perl libdigest-sha-perl libjson-perl libjson-xs-perl libxml-libxslt-perl php-xml
    Install Autodl-irssi
    Code:
    mkdir -p ~/.irssi/scripts/autorun
    cd ~/.irssi/scripts
    curl -sL http://git.io/vlcND | grep -Po '(?<="browser_download_url": ")(.*-v[\d.]+.zip)' | xargs wget --quiet -O autodl-irssi.zip
    unzip -o autodl-irssi.zip
    rm autodl-irssi.zip
    cp autodl-irssi.pl autorun/
    mkdir -p ~/.autodl
    touch ~/.autodl/autodl.cfg
    Install ruTorrent Plugin
    Code:
    cd /var/www/html/rutorrent/plugins
    sudo rm -rf autodl-irssi
    sudo git clone https://github.com/autodl-community/autodl-rutorrent.git autodl-irssi
    sudo cp autodl-irssi/_conf.php autodl-irssi/conf.php
    sudo chown -R www-data:www-data autodl-irssi
    Configure Autodl-irssi

    Edit plugin configuration:
    Code:
    sudo nano autodl-irssi/conf.php
    • Choose any port between 20000-65535 that you have not used previously.
    • Generate a random password. It will never be used again, so it doesn't have to be memorable.

    The following password has been randomly generated for you, and will change each time this page reloads.

    Input this information into autodl-irssi/conf.php.
    Code:
    $autodlPort = 50000;
    $autodlPassword = "84974153a4bd9e7c";
    Optional: Autodl-irssi filters allow you to specify a download location for each rule, but if by default you don't want your auto-downloaded files to mix with the manually added downloads, create a dedicated directory for them:
    Code:
    sudo mkdir /home/downloads/auto
    Modify ~/.autodl/autodl.cfg to include the same port/password:
    Code:
    nano ~/.autodl/autodl.cfg
    Code:
    [options]
    gui-server-port = 50000
    gui-server-password = 84974153a4bd9e7c
    upload-type = rtorrent
    rt-dir = /home/downloads/auto
    rt-label = Auto
    This [options] header...
    • gives Autodl-irssi the port and password you've chosen
    • sets the default upload type to rtorrent
    • sets default directory to /home/downloads/auto
    • sets default label for auto-downloaded torrents to "Auto"


    All of these settings can be managed on a per-filter basis, excepting the server port and password. These are just defaults to fall back on in the event that you do not modify them in the filter rules.

    Create ~/.autodl/autodl2.cfg and input rtorrent address. This should be the same address that you input in ~/.rtorrent.rc earlier in the installation process.
    Code:
    nano ~/.autodl/autodl2.cfg
    Code:
    [options]
    rt-address = 127.0.0.1:5000
    This options header containing rt-address must be saved in autodl2.cfg instead of autodl.cfg.

    Details of all available options can be found here. You may adjust these settings manually in autodl.cfg, but you may find it easier to work within the plugin's GUI inside ruTorrent, which offers all the same customization options.

    Create and detach a screen named "autodl" that will run the program "irssi":
    Code:
    screen -S autodl -fa -d -m irssi
    Open ruTorrent. You'll find a new tab for Autodl-irssi next to the log, and a button in the top toolbar. In the tab, click Reload Trackers to update the tracker list. Modify your preferences and create filters using the button in the top toolbar.

    From here, you're on your own. Search individual trackers' forums for information on how to create filters for whatever you're after. The process for each tracker can be different, so we won't get into that here.

    If you'd like to monitor what autodl-irssi is doing, watch its tab in ruTorrent, or open the active screen session:
    Code:
    screen -r autodl
    Detach from the screen by pressing ctrl+a, and then d.

    Errors

    If you see the following error within the ruTorrent log:
    Code:
    AutodlIrssiTab._getNewLines: Exception info: name = TypeError; message = Cannot read property 'msie' of undefined;
    Make the following adjustment.
    Code:
    sudo nano /var/www/html/rutorrent/plugins/autodl-irssi/AutodlFilesDownloader.js
    On line 28, change:
    Code:
    if ($.browser.msie)
    to:
    Code:
    if ($.browser={ msie: ( navigator.appName == 'Microsoft Internet Explorer') ? true : false })
    Plex Media Server

    Plex Media Server is an awesome media management utility that organizes your media and allows you to stream directly from your server to any Plex Home Theater client. Plex clients are available for PC/Mac/Linux, Android/iOS/Windows Phone, and several set-top boxes. You can also stream in a web browser through the Plex Media Server web app. This is a much more elegant and effective way to streaming than using the mediastream plugin for ruTorrent.

    In many circumstances, especially when using a remote server, Plex Media Server uses the host server's processor to transcode video and audio before streaming. This is a CPU intensive process that can interfere with the stability of the server if not enough resources are available. It's not recommended to use Plex Media Server in a shared or virtual environment with limited resources. View Plex's minimum hardware requirements recommendations.
    Plex Media Server for Debian 8.x and Ubuntu 16.x

    Download the latest version of Plex Media Server from Plex.tv and if necessary replace the code below with the link to the updated installer.
    Code:
    wget https://downloads.plex.tv/plex-media-server/1.2.7.2987-1bef33a/plexmediaserver_1.2.7.2987-1bef33a_amd64.deb
    sudo dpkg -i plexmediaserver_1.2.7.2987-1bef33a_amd64.deb
    netstat -ntp
    Run netstat -ntp to make sure Plex Media Server is running and that is listening on port 32400.

    You should see something similar to this:
    Code:
    tcp        0        0 127.0.0.1:32400        127.0.0.1:*            LISTEN
    Next, create a directory for Plex media:
    Code:
    sudo mkdir -p /var/plex/media
    Change the ownership of the directory
    Code:
    sudo chown plex:plex -R /var/plex/media
    Upload media files to this new directory:
    Code:
    /var/plex/media
    Accessing Plex

    If you you don't have a desktop environment and VNC installed, to access the Plex web interface we'll have to first create an SSH tunnel from your computer to the server. This only needs to be done once.

    Windows
    1. Open PuTTY or another SSH client that can tunnel.
    2. Create a new connection (remember to update the port), or select the existing one for your server.
    3. In the left navigation pane, goto Connection > SSH > Tunnels
      • Source Port: 8888
      • Destination: localhost:32400
      • add

    4. Now open the connection and login. You're tunneled.
    5. Navigate to http://localhost:8888/web in your browser.


    OS X or Linux
    1. Open a new terminal window.
    2. ssh 123.123.123.123 -L 8888:localhost:32400
    3. Navigate to http://localhost:8888/web in your browser.


    In the Plex Media Server settings, connect the server to your Plex account. You can now access your media from anywhere in the world by browsing to Sign In to your Plex Account | Plex Media Server
    Last edited by jryan375; March 25th, 2018 at 06:06 PM.

  2. #2

    Default

    Good guide, tested with ubuntu 16.04 worked without any issues!

    There is one thing, directly after "install rtorrent" it says this
    cd /tmp
    curl http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz | tar xzcd rtorrent-0.9.6
    ./autogen.sh

    should be:

    cd /tmp
    curl http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz | tar xz
    cd rtorrent-0.9.6
    ./autogen.sh

    Can confuse inexperienced users.

  3. #3

    Join Date
    Oct 2013
    Location
    United States
    Posts
    149

    Default

    Yea I just noticed that too. Thank you for pointing that out

    Original post updated :)

  4. #4

    Join Date
    Apr 2009
    Location
    North-Est TheLastFrontier
    Posts
    247

    Default

    @jryan375

    This link appears to be broken:
    Code:
    https://rutorrent-tadd-labels.googlecode.com/files/lbll-suite_0.8.1.tar.gz
    Free 4 All & All 4 Free

  5. #5

    Join Date
    Oct 2013
    Location
    United States
    Posts
    149

    Default

    Good find!

    Original post updated!

  6. #6

    Default help seedbox setup

    Hello all are some one here who can help me to setup my seedbox and root access ?

  7. #7

    Join Date
    Oct 2013
    Location
    United States
    Posts
    149

    Default

    Quote Originally Posted by smartmedia View Post
    Hello all are some one here who can help me to setup my seedbox and root access ?
    If you still need help, send me a message and I will help you set it up.

  8. #8

    Default

    Howdy, thanks for this superb guide. If I have an existing (broken) installation of libtorrent/rtorrent/rutorrent, do I have to remove that first? If so, how?

  9. #9

    Join Date
    Oct 2013
    Location
    United States
    Posts
    149

    Default

    Quote Originally Posted by remnant24 View Post
    Howdy, thanks for this superb guide. If I have an existing (broken) installation of libtorrent/rtorrent/rutorrent, do I have to remove that first? If so, how?
    Hey thanks :) in all honesty, my guide is best for fresh installations. It will be much easier to use this guide on a clean server.


  10. #10

    Default

    Well I tried anyway because starting fresh was not an option. I got all the way to "Status Report" without fail, and rutorrent loaded, but not without some JS errors that made it unusable. Turns out I needed an additional package called php7.0-mbstring, so I undid everything, started over and added that to the Apache install line. All working great now.

    Some additional observations:
    - Loading the IP address in the browser displayed neither "It works!" nor "Apache2 Ubuntu Default Page", but a listing of the contents of /var/www/html/.
    - At the /etc/apache2/sites-available/000-default.conf edit step, you may want to make it clear that all occurrences of 123.123.123.123 have to be replaced with the server's actual IP address. Could be confusing for beginners.
    Last edited by remnant24; March 25th, 2018 at 02:05 PM.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 37
    Last Post: October 27th, 2014, 02:37 AM
  2. Ubuntu Seedbox with rtorrent/rutorrent and security
    By Deatherage in forum Operating Systems
    Replies: 11
    Last Post: July 7th, 2013, 05:24 PM
  3. Ubuntu 11.10 x86/x64 rtorrent/rutorrent setup
    By Deatherage in forum Seedbox Tutorials
    Replies: 44
    Last Post: February 4th, 2012, 09:46 PM
  4. Replies: 0
    Last Post: August 20th, 2011, 02:16 PM
  5. Seedbox - The Guide !
    By pangare in forum Seedbox Tutorials
    Replies: 12
    Last Post: March 31st, 2009, 11:50 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
  •