Article 5PF6P Installing and Running rTorrent

Installing and Running rTorrent

by
ramsforums
from LinuxQuestions.org on (#5PF6P)
I am trying to download some learning material/manuals. I have a seedbox running with 80GB Disk space and 128 MB Ram on Ubuntu 18.04

I have installed rtorrent as per the below link
https://rtorrent-docs.readthedocs.io...torrent-basics

now my config files .rtorrent.rc location ( ~/.rtorrent.rc) as follows
Quote:
#############################################################################
# A minimal rTorrent configuration that provides the basic features
# you want to have in addition to the built-in defaults.
#
# See https://github.com/rakshasa/rtorrent...ONFIG-Template
# for an up-to-date version.
#############################################################################

## Instance layout (base paths)
method.insert = cfg.basedir, private|const|string, (cat,"/home/nova21/rtorrent/")
method.insert = cfg.download, private|const|string, (cat,(cfg.basedir),"download/")
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log")
method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/")
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/")

## Create instance directories
execute.throw = sh, -c, (cat,\
"mkdir -p "",(cfg.download),"" ",\
""",(cfg.logs),"" ",\
""",(cfg.session),"" ",\
""",(cfg.watch),"/load" ",\
""",(cfg.watch),"/start" ")

## Listening port for incoming peer traffic (fixed; you can also randomize it)
network.port_range.set = 50000-50000
network.port_random.set = no

## Tracker-less torrent and UDP tracker support
## (conservative settings for 'private' trackers, change for 'public')
dht.mode.set = disable
protocol.pex.set = no

trackers.use_udp.set = no

## Peer settings
throttle.max_uploads.set = 100
throttle.max_uploads.global.set = 250

throttle.min_peers.normal.set = 20
throttle.max_peers.normal.set = 60
throttle.min_peers.seed.set = 30
throttle.max_peers.seed.set = 80
trackers.numwant.set = 80

protocol.encryption.set = allow_incoming,try_outgoing,enable_retry

## Limits for file handle resources, this is optimized for
## an `ulimit` of 1024 (a common default). You MUST leave
## a ceiling of handles reserved for rTorrent's internal needs!
network.http.max_open.set = 50
network.max_open_files.set = 600
network.max_open_sockets.set = 300

## Memory resource usage (increase if you have a large number of items loaded,
## and/or the available resources to spend)
pieces.memory.max.set = 1800M
network.xmlrpc.size_limit.set = 4M

## Basic operational settings (no need to change these)
session.path.set = (cat, (cfg.session))
directory.default.set = (cat, (cfg.download))
log.execute = (cat, (cfg.logs), "execute.log")
#log.xmlrpc = (cat, (cfg.logs), "xmlrpc.log")
execute.nothrow = sh, -c, (cat, "echo >",\
(session.path), "rtorrent.pid", " ",(system.pid))

## Other operational settings (check & adapt)
encoding.add = utf8
system.umask.set = 0027
system.cwd.set = (directory.default)
network.http.dns_cache_timeout.set = 25
schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace, 1000M))
#pieces.hash.on_completion.set = no
#view.sort_current = seeding, greater=d.ratio=
#keys.layout.set = qwerty
#network.http.capath.set = "/etc/ssl/certs"
#network.http.ssl_verify_peer.set = 0
#network.http.ssl_verify_host.set = 0

## Some additional values and commands
method.insert = system.startup_time, value|const, (system.time)
method.insert = d.data_path, simple,\
"if=(d.is_multi_file),\
(cat, (d.directory), /),\
(cat, (d.directory), /, (d.name))"
method.insert = d.session_file, simple, "cat=(session.path), (d.hash), .torrent"

## Watch directories (add more as you like, but use unique schedule names)
## Add torrent
schedule2 = watch_load, 11, 10, ((load.verbose, (cat, (cfg.watch), "load/*.torrent")))
## Add & download straight away
schedule2 = watch_start, 10, 10, ((load.start_verbose, (cat, (cfg.watch), "start/*.torrent")))

## Run the rTorrent process as a daemon in the background
## (and control via XMLRPC sockets)
#system.daemon.set = true
#network.scgi.open_local = (cat,(session.path),rpc.socket)
#execute.nothrow = chmod,770,(cat,(session.path),rpc.socket)

## Logging:
## Levels = critical error warn notice info debug
## Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
print = (cat, "Logging to ", (cfg.logfile))
log.open_file = "log", (cfg.logfile)
log.add_output = "info", "log"
#log.add_output = "tracker_debug", "log"

### END of rtorrent.rc ###

To start the rtorrent I am running following script
Quote:
#! /bin/bash
#
# rTorrent startup script
#
umask 0027
cd $(dirname "$0")

# Check for running process
export RT_SOCKET=$PWD/.scgi_local
test -S $RT_SOCKET && lsof $RT_SOCKET >/dev/null \
&& { echo "rTorrent already running"; exit 1; }
test ! -e $RT_SOCKET || rm $RT_SOCKET

# Clean up after rTorrent ends
_at_exit() {
stty sane
test ! -e $RT_SOCKET || rm $RT_SOCKET
}
trap _at_exit INT TERM EXIT

# Start rTorrent (optionally with configuration loaded
# from the directory this script is stored in)
rtorrent -D -I # -n -o import=$PWD/rtorrent.rc

If I look at the watch directory I have the following two folders

/home/nova21/rtorrent//watch/load
/home/nova21/rtorrent/watch/start


1) Where should I place .torrent file?
2) Will it start downloading automatically once I place .torrent file?
3) After downloading will it seed automatically?
4) I want to run this script in startup mode. I came across this following.
Quote:
You can call it in a simple shell prompt first, but for normal operation it must be launched in a tmux session, like so:
tmux -2u new -n rTorrent -s rtorrent "~/rtorrent/start; exec bash"
Since it is seedbox in terminal mode, I can not access UI if it is executed during start. I want to seed as well as download torrent automatically when a file is placed in appropriate directory. What I need to do?

Thank youlatest?d=yIl2AUoC8zA latest?i=Xh1sxKT7zLk:FVMUkeO9UP8:F7zBnMy latest?i=Xh1sxKT7zLk:FVMUkeO9UP8:V_sGLiP latest?d=qj6IDK7rITs latest?i=Xh1sxKT7zLk:FVMUkeO9UP8:gIN9vFwXh1sxKT7zLk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments