NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Etz
Mar 21, 2012Aspirant
ruTorrent 3.3 + rTorrent by WhoCares
Can someone explain, how to configure download directories and other settings?
It always defaults back to factory settings if you reboot ReadyNAS or restart addon.
It`s a known behaviour of ruTorrent GUI: http://forums.rutorrent.org/index.php?topic=570.0
Also I couldnt find corresponding rtorrent.rc file anywhere in my unit, so where are the default settings actually kept? :roll:
Basically my problem is, that it always defaults download directory to /c/media , which I have deleted because I use different share names... (Downloads for example) :?
It always defaults back to factory settings if you reboot ReadyNAS or restart addon.
It`s a known behaviour of ruTorrent GUI: http://forums.rutorrent.org/index.php?topic=570.0
Also I couldnt find corresponding rtorrent.rc file anywhere in my unit, so where are the default settings actually kept? :roll:
Basically my problem is, that it always defaults download directory to /c/media , which I have deleted because I use different share names... (Downloads for example) :?
34 Replies
Replies have been turned off for this discussion
- invader980Aspirantare u attempting to make the settings permanent ?.... im kind of confused as to what your trying to do ...i assume u found the options to change the directory on rutorrent it's self ...
the setting files r in a hidden folder on ur nas ( dont recommend messing with it to much or at all lol but).. "\c\.rutorrent" a hidden directory is the root of the app..
if u have any success with making the settings carry over please post ... id love to play with it also - EtzAspirantYes I want to make some of the settings permanent...
Unfortunately I cannot find any trace of rtorrent config file... :?
RuTorrent is only WebGUI frontend, my question is about rtorrent config...
EDIT: OK, it wasnt the addon issue at all.
Basically I had a strange problem, where Downloads share wasnt writable to that addon.
Changed share owner to nobody, and all began to work as expected.
Still would like to know where are rtorrent default settings are kept... :P - invader980Aspirant
Etz wrote: Yes I want to make some of the settings permanent...
Unfortunately I cannot find any trace of rtorrent config file... :?
RuTorrent is only WebGUI frontend, my question is about rtorrent config...
EDIT: OK, it wasnt the addon issue at all.
Basically I had a strange problem, where Downloads share wasnt writable to that addon.
Changed share owner to nobody, and all began to work as expected.
Still would like to know where are rtorrent default settings are kept... :P
i miss understood .. i get u now ,Ran into a similar issue my self and same solution lol .
as far as the rtorrent config ... im not exactly sure were it is either, did some searching my self with no luck . i assume if u really wanted to find it u could ssh into ur box and find the dir.... but u really dont interface with rtorrent at all with rutorrent running ... i assume anything ur trying to set in the rotrrent.rc u could have set by rutorrent (editing php files) for u as the webgui will load up with it anyway ... only limitation would be that rutorrent would have to be up and going .
then again it would be alot easier to just edit the file to ur liking .... gives u the ability to cause more harm then good im guessing tho lol
this app kicks arse ... cant live with out it - ludwichAspirantI have the same issue. When i restart my nas all the settings are from scratch=( all the torrents that where seeding is missing and so on. How do i cange the settings permanent ?
- Dewdman42VirtuosoI have some answers, but not solutions (yet).
It appears they are starting up the rtorrent deamon with the -n option:/usr/bin/rtorrent -n -d /c/media -o scgi_local=/tmp/rutorrent.sock -o port_range=${PORTRANGE}
That option does this according to rtorrent help: "Don't try to load ~/.rtorrent.rc on startup"
I think normally that .rtorrent.rc is where these kinds of settings would be. I kind of agree that its lame that ruTorrent is not able to push settings changes into the rc file, or really I guess rtorrent is probably to blame for not having a way to push changes of the session back into the rc file. so the GUI is mostly useless for a lot of the settings other than temporary basis, it would appear.
I'm not sure at all where to put the settings you want if not going to load the rc file or whether there is a systemside default rc file that can be read, I'm looking into it.
As for as /c/media always being the default location, this is also hard coded into the startup script with the -d option (see above), so edit that script to change the default download location to something else you want or remove it altogether. - Dewdman42VirtuosoWell first thanks a lot to WhoCares for putting this addon together. I would not have tried rtorrent without it.
That being said, here are some tweaks I have done in order to make it really work as it should. Perhaps future addon release may incorporate some of these fixes, but in the meantime it may help some of you that are having problems with it.
First I will list high level summary of what was tweaked and then some details. Lastly I will list some future things I want to look into for later. Brace yourself this is a lot to read, but if you're serious about using rtorrent I think you'll find this useful. I have discovered rtorrent to be extremely powerful. I'm removing both utorrent and transmission (if I can figure out how to remove transmission) from my machine.
Summary- rtorrent.rc was excluded from the addon. Include it so that various configuration options can be used, which are not possible without it.
- session was not configured. Configured for use of session. A configured session dir allows you to stop and restart rtorrent and have it remember all the torrents you had loaded.
- Changed some things in the frontview startup scripts
- Configured file permission umask of downloaded files so that I can access from share without being admin user.
- Set up watch folders, more to do here, this is very powerful feature.
- configured encryption
- .rtorrent.rc is per user, there is no way to override this with rtorrent. Since this addon is configured to run rtorrent as admin, simply create the following file:
~admin/.rtorrent.rc
You can search the web and find tons of examples for what to put into this file. It turns out that rtorrent is quite more powerful then I realized, with the ability to create event driven scripts. I'm still learning. Due to the size of it, I put my version of the file at the end of this post. - In order to enable the .rtorrent.rc file, the startup script has to be modified, to exclude the -n option. That script is found in:
/etc/frontview/addons/bin/RUTORRENT/RUTORRENT_service
- Once you have rtorrent picking up the rc file for config, you can move several other configuration items into there instead of from the command line at startup. The startup script has the download dir hardoded to /c/media, for example. It also has the port range specified here, though its configurable through frontview. I moved everything into the rc file, my RUTORRENT_service file now looks like this:
#!/bin/bash
Note - I also added the line to remove the sock file since I found that sometimes during testing this file got left hanging around and made it impossible to start rtorrent again. Maybe there is a better approach for that.
. /etc/default/services
. /etc/frontview/addons/ui/RUTORRENT/rutorrent.config
rm /tmp/rutorrent.sock
/usr/bin/rtorrent -o scgi_local=/tmp/rutorrent.sock - The following lines have to be added to ~admin/.rtorrent.rc in order to provide what was previously in the RUTORRENT_service cmd line. Use whatever dir and ports you want
# Default directory to save the downloaded torrents.
There are more things in that file to configure, see my example at the end. But those two entries accomplish what was previously done in the startup script.
directory = /c/raid/extra/partial
# Port range to use for listening.
port_range = 31667-31767 - The session concept is used to remember torrents you want loaded when you stop and start rtorrent. In order to use a session, create a directory somewhere for it and then add a line to .rtorrent.rc. Mine is this:
session = /c/.rtorrent/session
- Files downloaded with rtorrent are owned by admin.admin and not writeable by everyone. You can add the following line to .rtorrent.rc which will chmod all downloads to rwxrwxrwx:
# chmod rwx for everybody
system.umask.set = 0000 - I want encryption turned on always. This is configured with the following line in .rtorrent.rc
encryption = require
- rtorrent has powerful watch folder capability, I am just barely scratching the surface. You can add the following bit to .rtorrent.rc. What this accomplishes is that when you drop a .torrent file into the specified watch dir, it will detect it, add the torrent to the session and start downloading to the default download dir(specified above). However, when its complete, it will move the downloaded file to the final destination folder specified. So in this case, the torrents will download into the partial folder and when they are complete will move to downloads.
note, you can create more than one of these, I created two here so you can see, but you can create as many as you want. So that you drop your torrents into one of several different watch folders, which will determine where the final completed download will end up# Schedules to watch folders
schedule = watch_directory_1,11,20,"load_start=/c/raid/extra/rtorrent/watch/*.torrent,d.set_custom1=/c/raid/extra/downloads/"
schedule = watch_directory_2,12,20,"load_start=/c/raid/extra/rtorrent/watch/music/*.torrent,d.set_custom1=/c/raid/extra/music/"
# Move completed downloads to preset target
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1=;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
Note also the system.method line added. This is an event driven script which does the moving of the final file. Google around to learn more about what rtorrent can do. - There are several other parameters in .rtorrent.rc which I uncommented and configured, see my complete file below.
- There are ways to also have the .torrent files moved when the torrent is started and/or when its completed. I want to trick that out also so that when I drop a torrent file into a watch dir, rtorrent will pick it up, add it to the session and then move the torrent file someplace else for safe keeping.
- There are some interesting options only available through patches and recompile of rtorrent. The most important one is ipfilter capability. Another one is the ability to preallocate downloads to their full size. A third one is related to the next item.
- By adding the "equal" patch and compiling rtorrent, its possible to reseed things using the watch folders. This is complicated to explain but basically the watch drop folder trick mentioned above only works for new torrents. if you want to reseed something you downloaded a long time ago, then if you try to drop it into watch its going to either re-download it, or if you move the downloaded content to the default download dir and try to drop the torrent file into the watch folder, it will see its finished, but will not move it back and continue seeding. There is a solution I found, https://wiki.archlinux.org/index.php/Rtorrent#Manage_completed_files but it requires the "equal" patch.
- I would like to see if I can run rtorrent as myself instead of admin, since I own all dirs where torrents might end up. I have found that if I create a folder through my NAS sharing as myself and then try to point rtorrent to download there, it will fail unless I also made sure to chmod that dir 777. If rtorrent was running as me it would never have this problem. However, when I tried to change the startup script to run as me, it didn't quite work with ruTorrent correctly. This is probably fixable, but I didn't have time to figure it out.
- rtorrent has the ability to auto create labels somehow, I need to figure that out.
- I would like to configure rtorrent to make sure it never consumes more than X amount of ram memory. I can see the parameter in the ruTorrent gui, but not sure where to configure that in .rtorrent.rc yet.
- I modified the startup.sh script to execute rtorrent with a nicelevel set to lower priority. This is entirely optional. The file in question is
/etc/frontview/addons/bin/RUTORRENT/start.sh
and I added --nicelevel 19 just before -x. So the final file looks like this:#!/bin/bash
#
# This should contain necessary code to start the service
screen -dmS "rtorrent" start-stop-daemon -S -m --pidfile /var/run/RUTORRENT.pid -c admin:admin -q --nicelevel 19 -x /etc/frontview/addons/bin/RUTORRENT/RUTORRENT_service
RTOR=`ps ax | grep rtorrent | grep -v SCREEN | grep -v grep | awk '{ print $1 }'`
if [ "$RTOR" != "" ]; then
echo $RTOR > /var/run/RUTORRENT.pid
fi - Here is my full .rtorrent.rc as of now
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# 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 = 10
#max_peers_seed = 50
# Maximum number of simultanious uploads per torrent.
#max_uploads = 15
# Global upload and download rate in KiB. "0" for unlimited.
#download_rate = 0
#upload_rate = 0
# Default directory to save the downloaded torrents.
directory = /c/raid/extra/partial
# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = /c/.rtorrent/session
# Watch a directory for new torrents, and stop those that have been
# deleted.
#schedule = watch_directory,5,5,load_start=./watch/*.torrent
#schedule = untied_directory,5,5,stop_untied=
# Close torrents when diskspace is low.
#schedule = low_diskspace,5,60,close_low_diskspace=100M
# The ip address reported to the tracker.
#ip = 127.0.0.1
# 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 = 31667-31767
# 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 whetever 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 = require,enable_retry,prefer_plaintext
encryption = require
# 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 = yes
# chmod rwx for everybody
system.umask.set = 0000
# Schedules to watch folders
schedule = watch_directory_1,11,20,"load_start=/c/raid/extra/rtorrent/watch/*.torrent,d.set_custom1=/c/raid/extra/downloads/"
schedule = watch_directory_2,12,20,"load_start=/c/raid/extra/rtorrent/watch/music/*.torrent,d.set_custom1=/c/raid/extra/music/"
# Move completed downloads to preset target
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1=;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
#
# Do not modify the following parameters unless you know what you're doing.
#
# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10
# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100
# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10
Details
Future
Notes - rtorrent.rc was excluded from the addon. Include it so that various configuration options can be used, which are not possible without it.
- invader980AspirantNice little tut ... helping me alot , most of these tweaks r ones ive been trying to add my self with limited linux experience lol ( as u can imagine .... no luck) thanks for taking the time to post this .
i plan on attempting all this later this week lol ( need time to prepare for worse case lol) i had a few questions :
1) watch dir can be configed threw the autotools plugin (gui) do u have to modify it command line because of the new sessions setup , or can it just be configured once u have the session up and running threw autotools ?
2) encryption meaning data & connection encryption ? ( assuming so but i didnt think rtorrent had such a feature)
3) ive tryed to my hearts content .....but there is a new autotools update for rutorrent 3.4 which includes copy + re-link files features for the watch function . i cannot integrate it in rutorrent 3.3 it causes many errors im not equipt to fix lol . ive also tryed updating to rutorrent3.4 ( again not equipt) im hoping u have to knowledge needed to make this happen .... i would kiss u if u could :D ( promise im a good kisser) lol
again thanks for sharing the info and making it understandable for us linux noobs ive learned so much sense purchasing my readynas makes u wonder what else ur missing with all this new tech comming out :slap: - Dewdman42Virtuosoi did not try to use the autotools feature because so far it looked to have less control then what I can do directly with rtorrent. Maybe later I will come back to that.
bit torrent can allow or force encryption of the data stream so that your ISP can't detect you're doing torrents more or less. Some ISP's will throttle your bandwidth if they figure out you're torrenting. Utorrent and most torrent clients provide this. Google around. - invader980Aspirantrtorrent: Error in option file: ~/.rtorrent.rc:1: Invalid start of command name. <<< my first attempt at this mods lol .... :( rutorrent wont open addon error "service failed to load" i thouhgt i followed the directions pretty step by step ... ill give it another try when i get home from work
- Dewdman42Virtuososend a copy of your rctorrent.rc file
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!