Andrew's picture

I'm running rutorrent as part of TurnKey Linux Torrent Server. I created a rtorrent.rc file and placed it in the server and it doesn't seem to be reading the file. At first I placed it in /home/myuser/ and then I tried just /home/ but didn't seem to work, then I tried /usr/bin/. Which is where I did a program search and found rtorrent program stored there. I restarted rutorrent once again and I got the error rutorrent not running. So I deleted the rtorrent.lock file and edited the session directory to default which is /var/lib/rtorrent/.session/ but the setting in the rtorrent.rc file are not applying. 

Also what do I need to put to only accept encrypted connections?

Forum: 
Jeremy Davis's picture

I had a bit of a look (FWIW "find / -name .rtorrent.rc") and it's here: /var/lib/rtorrent/.rtorrent.rc

For ruTorrent to work I imagine that it needs to be owned by the rtorrent user. So editing should be fine but if you replace it (overwrite) then you may need to fix ownership (needs to be rtorrent:rtorrent).

As for encrypted connections. This is pretty old but says this should work:

echo "encryption = require,allow_incoming,require_RC4" \
    >> /var/lib/rtorrent/.rtorrent.rc
service rtorrent restart
Andrew's picture

Thanks jeremy

I get an error Check $scgi_port and $scgi_host settings in config.php and scgi_port in rTorrent configuration file.

# 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 = 1
max_peers = 90

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 1
max_peers_seed = 50

# Maximum number of uploads single torrent may use
max_uploads = 5

# Maximum number of simultaneous downloads
max_downloads_global = 2
# Maximum number of simultaneous uploads
max_uploads_global = 5

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 76

# Default directory to save the downloaded torrents.
directory = /home/toruser/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 = /var/lib/rtorrent/.session/

# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory,5,5,load_start=./home/toruser/torrents/*.torrent
schedule = tied_directory,6,5,start_tied=
schedule = untied_directory,7,5,stop_untied=

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=2000M

# Periodically save session data
schedule = session_save,240,300,session_save=

# Enable the default ratio group.
ratio.enable=
# Change the limits, the defaults should be sufficient.
# Upload to a minimum ratio of 4.0
ratio.min.set=400
# Upload to a maximum ratio of 20.0
ratio.max.set=2000
# Upload a minimum of 250 MB
ratio.upload.set=250M

# When seeding ratio is reached close the torrent
system.method.set = group.seeding.ratio.command, d.close=

# Move files to ./unsorted when download completes
#system.method.set_key = event.download.finished,move_complete,"execute=mv,-n,$d.get_base_path=,./unsorted/;d.set_directory=./unsorted/"

# Port range to use for listening.
port_range = 51777-51780

# Start opening ports at a random position within the port range.
port_random = yes

# 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 ,require, require_RC4

# Sort the main view by ratio
view.sort_current = main,greater=d.get_ratio=
view.sort_new = main,less=d.get_ratio=
view.sort = main

# Sort the seeding view by the upload rate and only show torrents with peers
view.sort_current = seeding,greater=d.get_up_rate=
view.filter = seeding,"and=d.get_complete=,d.get_peers_connected="
view.sort_new = seeding,less=d.get_up_rate=
view.sort = seeding

# Sort the leeching view by name
view.sort_current = leeching,greater=d.get_name=
view.sort_new = leeching,greater=d.get_name=
view.sort = leeching

# Filter the active view by connected peers
view.sort_current = active,less=d.get_name=
view.sort_new = leeching,less=d.get_name=
view.filter = active,d.get_peers_connected=
view.sort = active

schedule = sort_main,11,5,view.sort=main
schedule = sort_seeding,12,5,view.sort=seeding
schedule = sort_leeching,13,5,view.sort=leeching
schedule = sort_active,14,5,view.sort=active

# 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 = off

# UDP port to use for DHT. 

#dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
peer_exchange = no

 

This is the other one I tried based on the one I found in the directory and just changed a few things...

bind = 0.0.0.0min_peers = 1max_peers = 90min_peers_seed = 1max_peers_seed = 50max_downloads_global = 2max_uploads_global = 7port_range = 51777-51780port_random = yesdownload_rate = 0upload_rate = 76scgi_local = /var/run/rtorrent/rpc.socket

directory = /home/toruser/downloadssession = /var/lib/rtorrent/.sessionencoding_list    = UTF-8

encryption       = allow_incoming ,require, require_RC4use_udp_trackers = yes
tracker_numwant  = 250dht = off
dht_port         = 6881peer_exchange    = noschedule         = low_diskspace,5,60,close_low_diskspace=100M

check_hash       = yes

system.method.set_key = event.download.finished,clamav_scan,"execute=/usr/local/bin/clamav-scan,$d.get_base_path=$d.get_name="

Be easy on me... I'm new. :)

Jeremy Davis's picture

Sorry about the late post but I missed your reply.

Did you get this working how you wanted?

Jeremy Davis's picture

Thanks for the confirmation! :)

Add new comment