Skip to content

Instantly share code, notes, and snippets.

@drunkirishcoder
Created November 13, 2014 01:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drunkirishcoder/d48ddde9f55ea64b1183 to your computer and use it in GitHub Desktop.
Save drunkirishcoder/d48ddde9f55ea64b1183 to your computer and use it in GitHub Desktop.
uTorrent server configuration for linux
#
# This file is configuration setting for uTorrent for Linux. If you're making
# changes to an existing config file, be sure to delete or rename the settings
# files. They'll be recreated upon startup.
#
# Many of these settings are only read from the configuration file when the
# uTorrent settings file settings.dat does not already exist in the settings
# directory. Once settings.dat exists, the values specified in the configuration
# file for these settings will be ignored, and the values stored in settings.dat
# will be used. For other settings, the server will load the values from the
# configuration file every time the program starts or receives a request to
# reload the configuration file.
#
# The settings for which the values are always applied from the configuration
# file when the file is read by the server include:
#
# dir_request, disk_cache_max_size, finish_cmd, logmask,
# preferred_interface, state_cmd, uconnect_enable, uconnect_password,
# uconnect_username, ut_webui_dir
#
# Sample command line that uses this config file
# ./utserver -settingspath /opt/utorrent -configfile /opt/utorrent/utserver.conf
#
# bind_ip (string): The IP address to use for socket connections. If not provided, a
# default IP address will be used. We do not recommend changing this value.
#
# bind_ip: 127.0.0.1
# ut_webui_port (integer): The default value is 8080. Port number where the utserver
# process accepts HTTP RPC API calls to support the uTorrent-compatible HTTP interface.
# If the utserver process also serves HTML files (see webui_server_files setting),
# also the port of HTTP server.
#
# ut_webui_port: 8080
# token_auth_enable (boolean): The default value is true. If true, the uTorrent
# HTTP interface defends against cross-site request forgeries by requiring that a
# short-lived token be obtained from the uTorrent HTTP interface and included at the
# beginning of the parameter list of any request made to that interface. If false,
# the uTorrent HTTP interface will not be protected in this manner.
#
# token_auth_enable: true
# Directory in which currently downloaded data is saved. Can be an absolute path or
# a relative path. If it is a relative path, the value is relative to dir_root or the
# current working directory if dir_root is not defined or an empty string. It is
# recommended that this directory be hidden from users (i.e. not exported through
# Samba).
#
# dir_active: /var/utorrent
# Directory where completed downloads are stored. If the value is an empty string,
# the value of dir_active is used. This value must represent a path that is accessible
# to users (e.g. exported through Samba). It also has to be on the same volume as
# dir_active.
#
# dir_completed: /var/utorrent/completed
# Optional directory where completed downloads can be stored, instead of in
# dir_completed. If no value is specified for this setting, the value of dir_completed
# is used. The value must represent a path that is accessible to users (e.g. exported
# through Samba).
#
# This option can be specified multiple times in the file - once for each directory
# to be designated as such. This option can be used when adding torrents via the
# uTorrent HTTP interface, not via the SDK interface.
#
# Use the action list-dirs to obtain a list of download directories from the uTorrent
# HTTP interface. Use the option download_dir to specify which of these directories to
# use when adding a torrent by URL or file through the uTorrent HTTP interface;
# specify the one-based index of the entry of interest. The index of each entry will
# be in order in which each entry appears in utserver.conf, starting with 1 for the
# first entry, 2 for the second entry, and so on. 0 indicates the default download
# directory should be used.
#
# dir_download: /home/<userid>/Downloads/
# dir_download: /home/<userid>/Music/
# dir_download: /home/<userid>/Videos/
# Directory where torrent files are stored. If the empty string, the value of
# dir_active is used. It is recommended that this directory be hidden from users (i.e.
# not exported through Samba).
#
# dir_torrent_files: /opt/utorrent/torrents
# Directory where temporary files are stored. If the empty string, the value of
# dir_active is used. It is recommended that this directory be hidden from users
# (i.e. not exported through Samba). Also, using a separate directory just for
# temporary files allows for deleting the files in this directory on boot and/or
# periodically. The utserver process creates temporary files with a .utt
# extension - if a value for this setting is specified, the utserver process will
# delete all files with that extension in that directory at process startup. This
# setting applies only to POSIX systems. The value should specify a directory, not
# a symbolic link to a directory.
#
# dir_temp_files: /tmp
# Directory where torrent files will be recognized and auto-loaded. If the empty
# string, auto-load is disabled.
#
# dir_autoload: /var/utorrent/autoload
# If true, torrent files in the autoload directory will be deleted after being
# loaded, else they will be renamed with an extension of .loaded. The dir_autoload
# setting must be specified for this setting to have an effect. The default value
# is false.
#
# dir_autoload_delete: false
# Directory where maintenance request files will be recognized, loaded, and deleted.
# If the empty string, maintenance request handling is disabled. This directory
# should be hidden from users (i.e., not exported through Samba). Your software
# running on your device can create the following files in this directory in order
# to request the following maintenance procedures.
#
# If the file c.utmr is created in or moved into this directory, the credentials
# necessary to access the uTorrent HTTP interface will be reset to username admin
# and a blank password.
#
# If the file wipl.utmr is created in or moved into this directory, the IP
# restriction list that limits the IPs that can use the uTorrent HTTP interface is
# cleared, so that there will be no restrictions on IP address.
#
# These maintenance operations provide a way to help a user who has either entered
# new credentials and then forgotten them, or who has entered an IP range in the
# restricted list and can no longer access the uTorrent HTTP interface as a result.
#
# If the file rcf.utmr is created in or moved into this directory, the server will
# reload the configuration file. If you always use this method to request a
# configuration file reload, you can safely change the value of this setting while
# the server is running.
#
# The server will also reload the configuration file if you send a hangup signal
# to the server; however, a race condition may occur if you send a hangup signal to
# the server in order to change the value of this setting. You should either only
# use the file system interface for requesting configuration file reloads, or you
# should not change the value of this setting in the configuration file before
# sending a hangup signal to the server.
#
# dir_request: /opt/utorrent
# upnp (boolean): The default value is true. If true, UPNP functionality for
# mapping ports is used by utserver. We recommend setting this value to true.
#
# upnp: true
# natpmp (boolean): If true, NAT-PMP functionality for mapping ports is used
# by utserver. The default value is true. We recommend setting this value to
# true.
#
# natpmp: true
# lsd:
# lsd (boolean): The default value is true. If true, Local Service Discovery
# is enabled. We recommend setting this value to true.
#
# lsd: true
# dht (boolean): The default value is true. If true, Distributed Hash Table
# extension is enabled. We recommend setting this value to true.
#
# dht: true
# pex (boolean): The default value is true. If true, Peer Exchange extension
# is enabled. We recommend setting this value to true.
#
# pex: true
# rate_limit_local_peers (boolean): The default value is false. If true, rate
# limiting also applies to communications with peers in the local subnet. We
# recommend setting this value to false.
#
# rate_limit_local_peers: false
# If not empty, dir_active, dir_completed, and dir_torrent_files are relative
# to this directory.
#
# dir_root: /var/utorrent
# disk_cache_max_size (integer): The default value is 0. Maximum amount of
# memory used by each of the read, write, and piece caches. Value is in
# megabytes. If 0, accepts the SDK's default choices on selecting sizes of
# disk caches. Maximum value is 512. The value of this setting will be applied
# every time the utserver process starts.
#
# disk_cache_max_size: 0
# If defined, name of network interface to be preferred when attempting to
# search among network interfaces for an external IP and hardware address. If
# empty string, preferred interface is ignored.
#
# You need to provide a value for this setting if either 1) the toolchain for
# your computer does not supply ifaddrs.h, or 2) you want the utserver process
# to choose a different interface than it would choose on its own. You should
# set a value for this setting if you see an incorrect port mapping on a UPnP
# router for the subnet to which the device belongs (the IP address of the
# device will not appear in the port mapping requested by the utserver process.
# Instead, the IP address associated with the mapping will be 0.0.0.0 with a
# device having a toolchain that does not include ifaddrs.h, or some other IP
# address with a device having a toolchain that includes ipaddrs.h).
#
# The value of this setting will be applied every time the utserver process
# starts.
#
# preferred_interface: eth1
# admin_name (string): The default value is "admin". If defined, name that
# must be supplied (along with the password) when authenticating to the
# server via the HTTP interface. This allows the administrator to define an
# initial non-default value for this name. This value will not be applied
# from utserver.conf if settings.dat already exists.
#
# admin_name: admin
# admin_password (string): The default value is "". If defined, password
# that must be supplied (along with the name) when authenticating to the
# server via the HTTP interface. This allows the administrator to define an
# initial non-default value for this password. This value will not be applied
# from utserver.conf if settings.dat already exists.
#
# admin_password: password
# logmask (integer): The default value is 0. A mask whose bits when set allow
# certain categories of log messages to be generated. The value of this
# setting will be applied every time the utserver process starts.
#
# The bits (0 - 31) in the value of this setting correspond to a set of internal
# events and subsystems. The usage of these bits may change without advance
# notice in a future release.
#
# 3 - send have
# 6 - hole punch
# 7 - got bad piece request
# 8 - trace
# 9 - piece picker
# 10 - got bad cancel
# 11 - got bad unchoke
# 12 - got bad piece
# 13 - rss
# 14 - rss error
# 15 - got have
# 16 - got bad have
# 17 - error
# 18 - aggregated
# 19 - disconnect
# 20 - out connect
# 21 - in connect
# 22 - UPnP
# 23 - UPnP error
# 24 - NATPMP
# 25 - NATPMP error
# 26 - metadata finish
# 27 - web UI
# 28 - got bad reject
# 29 - pex
# 30 - peer messages
# 31 - blocked connect
#
# logmask: 0
# ut_webui_dir (string): The directory where the web UI file archive webui.zip
# is stored, or which contains a webui subdirectory within which the unarchived
# web UI files are stored. It can be an absolute path or set relative to the
# current directory. It is recommended that this directory be hidden from users
# (i.e. not exported through Samba). The default value is "" (to use the same
# directory as settings.dat and other settings files).
#
# ut_webui_dir: /opt/utorrent
# finish_cmd (string), state_cmd (string): If defined, finish_cmd is a command
# that will be executed upon completion of each torrent, and state_cmd is a
# command that will be executed when a torrent changes state. Default value: ""
# (no command is run for the event(s) associated with that setting).
#
# The command is run asynchronously, so that a lengthy or hung process will not
# block the server. The server creates a new process group for the command, so
# that the server does not need to wait for it, and so the kernel process table
# does not fill up with zombie processes. The command is run as the same user
# that runs the server process.
#
# The server permits substitutions in the command text as follows:
#
# %F name of downloaded data file (for single-file torrents)
# %D directory where torrent data files are saved
# %N torrent title
# %S torrent state
# %P previous state of torrent
# %L label associated with torrent
# %T tracker
# %M status message
# %I hex-encoded info-hash
#
# State (%S) and previous state (%P) are integers that have the following values:
#
# 1 (error)
# 2 (checked)
# 3 (paused)
# 4 (super seeding)
# 5 (seeding)
# 6 (downloading)
# 7 (super seeding (forced))
# 8 (seeding (forced))
# 9 (downloading (forced))
# 10 (queued seed)
# 11 (finished)
# 12 (queued)
# 13 (stopped)
#
# finish_cmd:
# state_cmd:
# uconnect_enable (boolean): The default value is false. If true, the values
# of uconnect_username and uconnect_password are provided when authenticating
# to uTorrent Remote. This value is always applied from btsettings.txt; it is
# not saved in settings.dat.
#
# uconnect_enable:
# uconnect_username (string): The default value is "". If defined, name that
# must be supplied (along with the password) when authenticating to uTorrent
# Remote. This value is always applied from btsettings.txt; it is not saved
# in settings.dat.
#
# uconnect_username: utuser
# uconnect_password (string): The default value is "". If defined, password
# that must be supplied (along with the name) when authenticating to uTorrent
# Remote. This value is always applied from btsettings.txt; it is not saved
# in settings.dat.
#
# uconnect_password: password
# bind_port (integer): The default value is 6881. Port used for BitTorrent
# protocol. This can be any value in the range 1025-65000.
#
# bind_port: 6881
# max_ul_rate:
# max_ul_rate (integer): The default value is -1. Maximum total upload rate
# in kilobytes per second. -1 means unlimited. We recommend setting it to -1.
#
# max_ul_rate: -1
# max_ul_rate_seed (integer): Default value: -1. Maximum per-torrent upload
# rate when seeding, in kilobytes per second. -1 means unlimited. We recommend
# setting it to -1.
#
# max_ul_rate_seed: -1
# conns_per_torrent (integer): The default value is 50. Maximum number of
# connections for a given torrent.
#
# conns_per_torrent: 50
# max_total_connections (integer): The default value is 200. Maximum number
# of connection opened at the same time.
#
# max_total_connections: 200
# auto_bandwidth_management (boolean): The default value is true. If true,
# upload bandwidth is automatically throttled in order to not impact other
# applications using TCP/IP.
#
# auto_bandwidth_management: true
# max_dl_rate (integer): The default value is -1. Maximum total download rate
# in kilobytes per second. -1 means unlimited. We recommend setting it to -1.
#
# max_dl_rate: -1
# seed_ratio (integer): The default value is 0. Seed ratio in percent (%)
# (e.g. 100 means 100%). If not 0, seeding will stop after reaching this
# upload/download ratio.
#
# seed_ratio: 0
# seed_time (integer): The default value is 0. Time after which seeding will
# stop, in seconds. 0 means seeding won't stop.
#
# seed_time: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment