libTorrent at Wikia [edit]

rTorrent      [edit]


This is a list of commands supported by rTorrent. Under each command, its parameters are listed, where Bold means it is required and italic that it is optional. Commands that are italic are nor available through XMLRPC.

See for a complete list.



Returns a list of all available commands.



Returns the client or library version.

Returns the process id.


Returns the hostname.


system.set_cwd, cwd = directory

Change the current working directory using the chdir system call.

system.set_umask = numask

Set the process's file mode creation mask to numask through the umask system call.


download_list = view

Select the view to use. An empty string equals "default".

Returns a list of the info-hashes of downloads in view, encoded in capital letter hexadecimal. </i>

execute_log = log_file

Log the output of commands called by "execute" to log_file. If no parameter is passed, then logging is disabled.

load, load_verbose, load_raw, load_raw_start, load_raw_verbose, load_start, load_start_verbose = [uri|file|data], …

A string either representing an URI, file path including '*' as wildcards, or raw torrent data.
Any number of download commands to be called upon successful creation of the torrent. These will be called before the torrent is started.

Load a torrent and call download commands once done. Creation of the torrent is done lazily, thus no download is created during this call.

  • verbose Print error messages to the log.
  • raw The argument passed is the raw torrent data to be loaded.
  • start Start the torrent.

close_on_ratio = min_ratio, min_upload, max_ratio, …

stop_on_ratio = min_ratio, min_upload, max_ratio, …

Any number of commands to be executed on the stopped/closed torrent.

Stop/Close torrents when they reach the given upload ratio min_ratio in percent. If the optional min_upload is given, require a total upload amount of this many bytes as well. If the optional max_ratio is given, stop the torrent when reaching this ratio regardless of the total upload amount. Exclude certain torrent by pressing Shift+I in the downlist list. Intended for use with the schedule option.

stop_on_ratio = 100, 20M, 300, d.erase=


set_check_hash, check_hash = true

Perform hash check on torrents that have finished downloading.


set_directory, directory = "./"

Set the default download directory for newly loaded torrents.


set_name = "session name"

Name of this rtorrent session, for display in the main title or XMLRPC clients.


set_session, session = ""

Session management will be enabled and the torrent files for all open downloads will be stored in this directory. Only one instance of rtorrent can be used per session directory. An empty string will disable the session directory.


encryption = …

Set how rtorrent should deal with encrypted Bittorrent connections. By default, encryption is disabled, equivalent to specifying the option none. Alternatively, any number of the following options may be specified:

  • allow_incoming (allow incoming encrypted connections)
  • try_outgoing (use encryption for outgoing connections)
  • require (disable unencrypted handshakes)
  • require_RC4 (also disable plaintext transmission after the initial encrypted handshake)
  • enable_retry (if the initial outgoing connection fails, retry with encryption turned on if it was off or off if it was on)
  • prefer_plaintext (choose plaintext when peer offers a choice between plaintext transmission and RC4 encryption, otherwise RC4 will be used)


set_bind, bind = [""|""]

Bind listening socket and outgoing connections to this network interface address.


set_http_proxy, http_proxy = ""

Use a http proxy. Disable with an empty string.


set_ip, ip = [""|""]

Set the address reported to the tracker.


set_random_open, port_random = true

If set, when opening the listening port a random port in port_range will be selected. Else the lowest available in the range will be used.


set_port_range, port_range = range

range = "6881-6999"
Port numbers in the range <0,216>, as a string.

Set the port range that may be used for the listening port.


view_add = name

Create a new view.

view_sort = name

view_sort = name,seconds

Sort a view according the the criteria set by view_sort_current. If the optional argument is supplied, the view is not sorted if a change happened during the last seconds. This command is meant to be used with schedule.

view_sort_new = name,…

view_sort_current = name,…

Set the sorting criteria for when new elements inserted or view_sort is called. The list can contain any number of crite- ria, including zero, from the following:

name, name_reverse, stopped, started, complete, incomplete, state_changed, state_changed_reverse

view_filter = name,…

Set a list of filter to apply when new new downloads are added and when view_sort is called. All filters must match for the download to be included.

stopped, started, complete, incomplete,


set_key_layout, key_layout = [qwerty|azerty|qwertz|dvorak]

Change the key-bindings.


Various commands useful for scripting.

cat = …

Concatenate any number of object as a string.

if = …

A series of if/else statements. Every even arguments are conditionals and odd arguments are branches to be executed, except the last one which is always a branch.

if (cond1) { branch1 }

if (cond1) { branch1 } else if (cond2) { branch2 } else { branch3 }


All download commands except d.multicall take the info-hash of the target download, encoded in capital letter hexadecimal, as the first argument.

d.multicall, call_download = view, …

Select the view to use. An empty string equals "default".
Any number of download commands. Each command must contain '=', with optional arguments.

Returns a list of lists, where each element is a list of result from calls on one download.

> xmlrpc localhost d.multicall "started" "d.get_name=" "d.get_size_chunks="
Array of 2 items:
  Index  0 Array of 2 items:
             Index  0 String: 'Forget-me-not'
             Index  1 Integer: 26
  Index  1 Array of 2 items:
             Index  0 String: 'Forget-me-not'
             Index  1 Integer: 17


Put any changes to file priorities into effect. This command is relatively expensive and should therefor be called after a batch of changes to priorities has been done.


All file commands take the info-hash of the target download, encoded in capital letter hexadecimal, as the first argument and the index of the file as the second.


t.multicall = info_hash, dummy_argument, …

See "d.multicall".












t.set_enabled = [true|false]