RuTorrent on AsusWRT router through Entware

RuTorrent is a file sharing program.

When you run a torrent, its data will be made available to others by means of upload.

Any content you share is your sole responsibility.

This version works on all supported routers: RT-N16, RT-N66U, RT-AC66U, RT-AC56U, RT-AC68U, RT-AC87U,  RT-AC88U,  RT-AC3200,  RT-AC5300...

1 - Install Entware-NG from here (should be a clean install if you installed lighttpd or rutorrent previously)

2 - Install RuTorrent with this super easy installer script

opkg install rtorrent-easy-install
#### Welcome to rtorrent easy installation script!
We assuming no lighttpd/rtorrent/rutorrent was installed before!
Please, answer a few question to configure torrent client.
Default aswers given in [brackets], just hit Enter to accept it.

Type "username:password" if you want to protect Web UI or hit Enter to leave password protection disabled []:
yourusername:yourpassword ENTER
Which port should be used by web interface? [81]: ENTER (it's better to leave it 81)
Enter (maximal) download speed in KB/s [2048]: ENTER or 0 (zero) for unlimited download speed
Enter (maximal) upload speed in KB/s [2048]: ENTER or 0 (zero) for unlimited upload speed
Enter folder name on USB drive where torrent content should be stored [/opt/torrents]: /mnt/sda1/rutorrent ENTER (change sda1 with your disk label)
Done! You may open 51411-51412 TCP/UDP ports on your router to facilitate uploading/donwloading. It's not necessary but recommended.
Rutorrent web UI will be available at following URL: http://router-ip-address:81/rutorrent
Do you wish to start torrent client? [y]: ENTER
Starting lighttpd... done.
Starting rtorrent... done.
admin@RT-AC66U:/tmp/home/root#

 3 - Go to 192.168.1.1:81/rutorrent and input username & password you choose previously

Happy downloading


ACCESS FROM WAN

• If you want to access rutorrent from WAN like work, school, smartphone, tablet or some other device we need to open the port 81 but the firmware doesn't allow port forwarding to the router himself, for that we will use the scripts on /jffs partition:

Create firewall rules

nano /jffs/scripts/firewall-start

Paste this lines in terminal

#!/bin/sh

iptables -I INPUT -p tcp --destination-port 81 -j ACCEPT
iptables -I INPUT -p tcp --destination-port 51411 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51411 -j ACCEPT
iptables -I INPUT -p udp --destination-port 51412 -j ACCEPT

 

Save with CTRL-O / Enter / and exit with CTRL-X
 Make scripts executable and apply rules
chmod a+rx /jffs/scripts/*
sh /jffs/scripts/firewall-start

Now go to yourwanipaddress/rutorrent


PLUGINS

/opt/etc/init.d/S85rtorrent stop
/opt/etc/init.d/S80lighttpd stop

Install necessary packages

opkg install curl php5-mod-json php5-cli

 

Search for available plugins on entware repository
opkg find rutorrent-plugin*
admin@RT-AC66U:/tmp/home/root# opkg find rutorrent-plugin*
rutorrent-plugin-_getdir - 3.6-2 - This is a _getdir Rutorrent plugin.
rutorrent-plugin-_noty - 3.6-2 - This is a _noty Rutorrent plugin.
rutorrent-plugin-_task - 3.6-2 - This is a _task Rutorrent plugin.
rutorrent-plugin-autotools - 3.6-2 - This is a autotools Rutorrent plugin.
rutorrent-plugin-check_port - 3.6-2 - This is a check_port Rutorrent plugin.
rutorrent-plugin-chunks - 3.6-2 - This is a chunks Rutorrent plugin.
rutorrent-plugin-cookies - 3.6-2 - This is a cookies Rutorrent plugin.
rutorrent-plugin-cpuload - 3.6-2 - This is a cpuload Rutorrent plugin.
rutorrent-plugin-create - 3.6-2 - This is a create Rutorrent plugin.
rutorrent-plugin-data - 3.6-2 - This is a data Rutorrent plugin.
rutorrent-plugin-datadir - 3.6-2 - This is a datadir Rutorrent plugin.
rutorrent-plugin-diskspace - 3.6-2 - This is a diskspace Rutorrent plugin.
rutorrent-plugin-edit - 3.6-2 - This is a edit Rutorrent plugin.
rutorrent-plugin-erasedata - 3.6-2 - This is a erasedata Rutorrent plugin.
rutorrent-plugin-extratio - 3.6-2 - This is a extratio Rutorrent plugin.
rutorrent-plugin-extsearch - 3.6-2 - This is a extsearch Rutorrent plugin.
rutorrent-plugin-feeds - 3.6-2 - This is a feeds Rutorrent plugin.
rutorrent-plugin-filedrop - 3.6-2 - This is a filedrop Rutorrent plugin.
rutorrent-plugin-geoip - 3.6-2 - This is a geoip Rutorrent plugin.
rutorrent-plugin-history - 3.6-2 - This is a history Rutorrent plugin.
rutorrent-plugin-httprpc - 3.6-2 - This is a httprpc Rutorrent plugin.
rutorrent-plugin-ipad - 3.6-2 - This is a ipad Rutorrent plugin.
rutorrent-plugin-loginmgr - 3.6-2 - This is a loginmgr Rutorrent plugin.
rutorrent-plugin-lookat - 3.6-2 - This is a lookat Rutorrent plugin.
rutorrent-plugin-mediainfo - 3.6-2 - This is a mediainfo Rutorrent plugin.
rutorrent-plugin-ratio - 3.6-2 - This is a ratio Rutorrent plugin.
rutorrent-plugin-retrackers - 3.6-2 - This is a retrackers Rutorrent plugin.
rutorrent-plugin-rpc - 3.6-2 - This is a rpc Rutorrent plugin.
rutorrent-plugin-rss - 3.6-2 - This is a rss Rutorrent plugin.
rutorrent-plugin-rssurlrewrite - 3.6-2 - This is a rssurlrewrite Rutorrent plugin.
rutorrent-plugin-rutracker_check - 3.6-2 - This is a rutracker_check Rutorrent plugin.
rutorrent-plugin-scheduler - 3.6-2 - This is a scheduler Rutorrent plugin.
rutorrent-plugin-screenshots - 3.6-2 - This is a screenshots Rutorrent plugin.
rutorrent-plugin-seedingtime - 3.6-2 - This is a seedingtime Rutorrent plugin.
rutorrent-plugin-show_peers_like_wtorrent - 3.6-2 - This is a show_peers_like_wtorrent Rutorrent plugin.
rutorrent-plugin-source - 3.6-2 - This is a source Rutorrent plugin.
rutorrent-plugin-theme - 3.6-2 - This is a theme Rutorrent plugin.
rutorrent-plugin-throttle - 3.6-2 - This is a throttle Rutorrent plugin.
rutorrent-plugin-tracklabels - 3.6-2 - This is a tracklabels Rutorrent plugin.
rutorrent-plugin-trafic - 3.6-2 - This is a trafic Rutorrent plugin.
rutorrent-plugin-unpack - 3.6-2 - This is a unpack Rutorrent plugin.
admin@RT-AC66U:/tmp/home/root#

Install desired plugin, I choose RSS for now

opkg install rutorrent-plugin-rss

Start RuTorrent

/opt/etc/init.d/S80lighttpd start
/opt/etc/init.d/S85rtorrent start

Go to 192.168.1.1:81/rutorrent and add some feeds

rutorrent-rss


 

 

TROUBLESHOOTING

If you have difficulties with installation process or usage, copy paste from terminal the next commands and post here followed by issue details:

uname -a
mount
df
free

 

Source http://forums.smallnetbuilder.com
Thanks @netware5 & @ryzhov_al

  • Guido

    Hi! I have installed in my Asus WRT Merlin the rutorrent. I used with
    out problem about more than 6 month. In some time I have the message:
    "Torrent list not available, connection to rTorrent not established"
    when appear I restart the services lighttp and rtorrent I go live. But
    now I can not see the torrent list, seeding or anything.

    Here I put the result of command:

    [code]elrengo@RT-AC3100:/tmp/home/root# uname -a
    Linux RT-AC3100 2.6.36.4brcmarm #2 SMP PREEMPT Fri Nov 11 16:55:21 EST 2016 armv7l GNU/Linux
    elrengo@RT-AC3100:/tmp/home/root#
    elrengo@RT-AC3100:/tmp/home/root# mount
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro,relatime)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=257508k,nr_inodes=64377,mode=755)
    proc on /proc type proc (rw,relatime)
    tmpfs on /tmp type tmpfs (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    devpts on /dev/pts type devpts (rw,relatime,mode=600)
    /dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
    usbfs on /proc/bus/usb type usbfs (rw,relatime)
    /dev/sda2 on /tmp/mnt/entware type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
    134134192.168.1.30134Seagate_Expansion_Drive on /cifs2 type cifs (rw,mand,relatime,unc=\192.168.1.30Seagate_Expansion_Drive,username=elrengo,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.30,posixpaths,serverino,acl,rsize=16384,wsize=57344)
    nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
    elrengo@RT-AC3100:/tmp/home/root#
    elrengo@RT-AC3100:/tmp/home/root# df -h
    Filesystem Size Used Available Use% Mounted on
    /dev/root 42.0M 42.0M 0 100% /
    devtmpfs 251.5M 0 251.5M 0% /dev
    tmpfs 251.6M 1.0M 250.6M 0% /tmp
    /dev/mtdblock4 64.0M 1.8M 62.2M 3% /jffs
    /dev/sda2 915.9G 410.2G 459.2G 47% /tmp/mnt/entware
    134134192.168.1.30134Seagate_Expansion_Drive
    3.6T 2.9T 780.3G 79% /cifs2
    elrengo@RT-AC3100:/tmp/home/root# free
    total used free shared buffers
    Mem: 515308 413376 101932 0 752
    -/+ buffers: 412624 102684
    Swap: 1048572 0 1048572
    elrengo@RT-AC3100:/tmp/home/root#
    elrengo@RT-AC3100:/tmp/home/root# free -h
    total used free shared buffers
    Mem: 515308 374196 141112 0 608
    -/+ buffers: 373588 141720
    Swap: 1048572 0 1048572
    elrengo@RT-AC3100:/tmp/home/root#
    [/code]

    • opkg update
      opkg upgrade
      reboot

      • Guido

        Thanks for you quick reply!
        But that not works. Where must be the torrent list I have these message:

        "Torrent list not yet available, connection to rTorrent not established"

        And where is the log tab:

        [01.04.2017 10:14:38] WebUI started.
        [01.04.2017 10:14:39] Bad response from server: (500 [error,getplugins])

      • Guido
      • No ideea, install all from scratch, I just did it and works fine

      • Guido

        Thanks! I need to install from scratch Entware-ng and Rutorrent or only rutorrent?

      • Both

      • Guido

        Hi! I think that the problem became because I have a lot of Torrents Active. After time to looking for a solution, I try to connect to rTorrent trought console. Because if I go to tracker website I cand see that my rTorrent is Active and sharing. But I can not connect to my Web front end.

        rTorrent is runing in a SCREEN. I run screen -ls to see the active screen term. Then I ran screen screnn XXXX.rTorrent to enter at rTorrent to conosole. Now I can see all my torrents active, after use Ctrl +D Twice in each torrent the torrent is delete from rTorrent. Then reboot the router to see if the quantity of torrent deleted was the necesary or need to start again the procees.

      • Guido

        Hi! After clean all torrent the webgui do not works. I reinstalled all from scratch.

        Here are the actual information:

        elrengo@RT-AC3100:/tmp/home/root# uname -a
        Linux RT-AC3100 2.6.36.4brcmarm #1 SMP PREEMPT Wed Mar 29 00:50:09 EDT 2017 armv7l ASUSWRT-Merlin
        elrengo@RT-AC3100:/tmp/home/root#
        elrengo@RT-AC3100:/tmp/home/root# mount
        rootfs on / type rootfs (rw)
        /dev/root on / type squashfs (ro,relatime)
        devtmpfs on /dev type devtmpfs (rw,relatime,size=257508k,nr_inodes=64377,mode=755)
        proc on /proc type proc (rw,relatime)
        tmpfs on /tmp type tmpfs (rw,relatime)
        sysfs on /sys type sysfs (rw,relatime)
        devpts on /dev/pts type devpts (rw,relatime,mode=600)
        /dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
        usbfs on /proc/bus/usb type usbfs (rw,relatime)
        /dev/sda2 on /tmp/mnt/entwareNG type ext4 (rw,nodev,relatime,user_xattr,barrier=1,data=ordered)
        134134192.168.1.30134Seagate_Expansion_Drive on /cifs2 type cifs (rw,relatime,unc=\192.168.1.30Seagate_Expansion_Drive,username=elrengo,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.30,posixpaths,serverino,acl,rsize=16384,wsize=57344)
        134134192.168.1.30134My_Book on /cifs1 type cifs (rw,relatime,unc=\192.168.1.30My_Book,username=elrengo,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.30,posixpaths,serverino,acl,rsize=16384,wsize=57344)
        nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
        elrengo@RT-AC3100:/tmp/home/root#
        elrengo@RT-AC3100:/tmp/home/root#
        elrengo@RT-AC3100:/tmp/home/root# df -h
        Filesystem Size Used Available Use% Mounted on
        /dev/root 32.9M 32.9M 0 100% /
        devtmpfs 251.5M 0 251.5M 0% /dev
        tmpfs 251.6M 968.0K 250.7M 0% /tmp
        /dev/mtdblock4 64.0M 1.7M 62.3M 3% /jffs
        /dev/sda2 915.9G 240.6M 869.1G 0% /tmp/mnt/entwareNG
        134134192.168.1.30134Seagate_Expansion_Drive
        3.6T 2.5T 1.2T 68% /cifs2
        134134192.168.1.30134My_Book
        1.8T 1.5T 285.5G 85% /cifs1
        elrengo@RT-AC3100:/tmp/home/root#
        elrengo@RT-AC3100:/tmp/home/root#
        elrengo@RT-AC3100:/tmp/home/root# free -h
        total used free shared buffers cached
        Mem: 515308 125932 389376 0 1668 12900
        -/+ buffers/cache: 111364 403944
        Swap: 1048572 0 1048572
        elrengo@RT-AC3100:/tmp/home/root#

        The lighthttp do not want to start:

        elrengo@RT-AC3100:/tmp/home/root# ps -w | grep lighttpd
        1342 elrengo 1396 S grep lighttpd
        elrengo@RT-AC3100:/tmp/home/root# /opt/etc/init.d/S80lighttpd start
        Starting lighttpd... done.
        elrengo@RT-AC3100:/tmp/home/root# ps -w | grep lighttpd
        1368 elrengo 1396 S grep lighttpd
        elrengo@RT-AC3100:/tmp/home/root#

        elrengo@RT-AC3100:/tmp/home/root# netstat -na | grep 81
        unix 2 [ ACC ] STREAM LISTENING 2881 /var/nmbd/unexpected
        elrengo@RT-AC3100:/tmp/home/root# lsof
        -sh: lsof: not found
        elrengo@RT-AC3100:/tmp/home/root#

      • Guido

        To work need to do some steps:

        1. after run from /opt/sbin the ./lighttpd -f /opt/etc/lighttpd/lighttpd.conf I found some errors.
        2. go to "/opt/etc/lighttpd/conf.d" and then rename all conf to bkp exept one 99 and result is there:

        elrengo@RT-AC3100:/opt/etc/lighttpd/conf.d# ls -l
        -rw-r--r-- 1 elrengo root 935 Apr 19 09:03 20-auth.conf.bkp
        -rw-r--r-- 1 elrengo root 39 Apr 19 09:03 20-authn_file.conf
        -rw-r--r-- 1 elrengo root 4363 Apr 19 09:03 30-fastcgi.conf.bkp
        -rw-r--r-- 1 elrengo root 1349 Apr 19 09:03 30-scgi.conf.bkp
        -rw-rw-rw- 1 elrengo root 814 Apr 30 15:11 99-rtorrent-fastcgi-scgi-auth.conf

        3. When I run again I found these error:

        elrengo@RT-AC3100:/opt/sbin# ./lighttpd -f /opt/etc/lighttpd/lighttpd.conf
        2017-05-11 17:55:20: (plugin.c.227) dlopen() failed for: /opt/lib/lighttpd/mod_authn_file.so /opt/lib/lighttpd/mod_authn_file.so: cannot open shared object file: No such file or directory

        4. Then install these package: opkg install lighttpd-mod-authn_file
        5. The lighttp go on. :)

      • Guido

        I restart the Rtorrent service but does not work.

        elrengo@RT-AC3100:/tmp/mnt/entware/entware-ng.arm/etc/rtorrent# cat rtorrent.conf
        max_uploads = 8
        session = /opt/etc/rtorrent/session
        schedule = watch_directory,5,5,load_start=/opt/etc/rtorrent/watchdir/*.torrent
        schedule = untied_directory,5,5,stop_untied=
        schedule = low_diskspace,5,60,close_low_diskspace=100M
        bind = 0.0.0.0
        port_range = 51411-51411
        check_hash = yes
        use_udp_trackers = yes
        encryption = allow_incoming,enable_retry,prefer_plaintext
        dht = auto
        dht_port = 51412
        peer_exchange = yes
        scgi_local = /opt/var/rpc.socket
        encoding_list = UTF-8
        max_uploads_global = 32
        max_downloads_global = 64
        download_rate = 2048
        upload_rate = 2048
        directory = /mnt/entware/rutorrent

      • Guido

        I have arroud 55 torrents. But the information about torrent site the

        rtorrent still seeding. But I can not see it or add more torrent. I read about memory. I put the memory limit in php.ini in 50mb but do not work.

        elrengo@RT-AC3100:/tmp/mnt/entware/entware-ng.arm/etc# cat php.ini | grep 8M
        memory_limit = 8M ; Maximum amount of memory a script may consume.
        post_max_size = 8M
        ;opcache.memory_consumption=8 ; 8M is the allowed minimum

        I do not found how to expand it on rutorrent.conf.

        Thanks in advance!

  • Alby

    Hi. i followed the tutorial and install rutorrent, all went ok, the only big problem is that i can't access to the web interface at all, i just get a connection denied from the browser when i try to connect to the ip:81/rutorrent
    how could i fix it?
    thanks!

    • This guide it's for "old" entware and is not updated anymore, also you must install the easy way on a clean entware installation, if not, some scripts for lighttpd server will be in conflict.

      1) Install entware-ng from here https://www.hqt.ro/how-to-install-new-generation-entware/
      2) Run in terminal: opkg install rtorrent-easy-install

      I just did this steps and starting fine

      • Alby

        yes i had followed the updated guide and i had installed the updated entware.. but still when i try to connect to that url it just doesn't let me in , from the terminal the service rutorrent is running.

        any clues how could i find what's the problem?

        my router is asus RT-AC68U and i'm using a flash drive formatted in EXT3

      • I did this tutorial for mipsel devices, didn't tested on arm like yours, should be the same but who knows.

      • Alby

        for some reasons it seems it's a common problem ( i was reading that more than 4 users in the forum got my same problem) , I had to give up and install asus download manager.. not that fast it seems but at least i can access to that webgui. thanks for your help! probably it's some hardware incompatibility because my router is brand new , i had just upgraded to merlin firmware

      • dg33k

        Just so you know, I just installed rutorrent using Entware-NG on an EXT3 pen drive attached to my AC68U (Merlin 378.56_2) and the web login page is working fine. I think it is best that you start from scratch because something is messed up.

      • Alby
      • Csaba Benesch

        I get the following error message on entware-ng rutorrent : " Hash check on download completion found bad chunks, consider using "safe_sync"." If I enable safe_sync then the same issue. Router is AC87U with 380.57.2_HGG-FINAL firmware.

        Any idea?

      • Csaba Benesch

        reported

  • Dellas

    My rutorrent was working fine with rtorrent but after I did that php install (opkg install curl php5-mod-json php5-cli) it broke down. Rutorrent webui says connection to rtorrent not established. Also log says:
    Bad response from server: (0 [error,getplugins])
    Bad response from server: (0 [error,getuisettings])

    I have checked the /opt/share/www/rutorrent/conf/config.php and it is exactly as in this manual. Already checked that rtorrent is running and removed php5-mod-json php5-cli but that did not help. Installing those changed some configurations.

    • Reinstall from scratch and should work

      • Dellas

        Yes, I had to format jffs, restore factory settings and reinstall entware to get rutorrent to work again. It would be nice to get plugins to work though.

      • Plugins should work too

  • Rasmus

    i would like to know how to enable Forced Encryption in Rutorrent
    i know that this line has to be added but where i dont know
    encryption
    = require,allow_incoming,require_RC4

    • Should be in /etc/rtorrent.conf but stop rtorrent when editing conf file or will be overwritten

      • Rasmus

        when i add it there Rtorrent does not start again, Rutorrent page says check
        $scgi_port' and '$scgi_host'

  • Try to ask ryzhov_al on smallnetbuilders forum, see source on bottom page.

    • sam

      Ok i will do that.

      Thank you for your reply and this awesome site.

      • Good luck, thanks for your nice words.

  • Sam

    How to use GeoIp plugin?

      • Sam

        it requires some php geoip extension to work, where to find that?
        I do not have knowledge or skill to compile them.
        Thank you.

      • Do you get some error when installing plugin or will not show in installed plugins?

      • sam

        No error in rutorrent web ui log.
        Geoip plugin loads and enabled, but no extra column for country in peer list.

      • Joe

        I have the same problem. gave up

      • TeHashX

        I will take a look

  • sohun

    when i installed some plugin, i cant run my rtorrent via webui :

    [26.11.2014 17:04:14] WebUI started.
    [26.11.2014 17:04:15] Bad response from server: (0 [error,getplugins])
    [26.11.2014 17:04:15] Bad response from server: (0 [error,getuisettings])

SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Nginx Web Server with PHP Support through Optware-NG
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm
NetData System Monitor Entware

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...