btg config
This document describes the configuration files used by the daemon and clients.
The default daemon config is named "daemon.ini" and is located in "~/.btg". The clients use "client.ini", also located in "~/.btg".
All config files used by btg uses the same format as Windows ini files.
The general format is:
<SECTION>
<KEY> = <VALUE>
Whitespace between the key and value is ignored.
Lines beginning with ";" are comments.
Section
"transport"
default − default transport between btgdaemon and
client. Choice
between "tcpip", "stcpip",
"xml-rpc", "sxml-rpc".
Section
"network"
listen-to − IPv4:port. Where network transports
(tcpip, stcpip,
xml-rpc and sxml-rpc) will be listening.
torrent-range − integer:integer. Which ports to use
use for torrent
communication and DHT. The daemon will not start unless two
ports are
available.
torrent-ip − IPv4 or IPv6 address. Libtorrent listens
to this
address.
use-upnp − True/false. Enable/disable UPnP (if support
for it was
selected at compile time).
upnp-ip − IPv4 address. Issued to the UPnP-capable
gateway as
internal address.
Section
"tls"
ca-cert − A filename, containing a TLS CA certificate.
cert − A filename, containing a TLS daemon
certificate.
cert-privkey − A filename, containing a TLS daemon
private key.
Section
"logging"
type − Log type. Choice between: "stdout",
"file", "syslog".
filename − If file logging was selected, filename to
write the
log to.
Section
"encryption"
policy-in − input policy. Choice between:
force|enable|disable.
policy-out − output policy. Choice between:
force|enable|disable.
level − encryption level. Choice between:
plaintext|rc4|both.
prefer-rc4 − indicates if using rc4 is prefered.
Choice between:
true|false.
Section
"misc"
proxy − IPv4:port. If you want to use a proxy for
tracker
communication, place it here.
filter − Filename from wich IPv4 addresses are read
from. See
"filter_type".
filter_type − Format of the above file. Choice
between: "level1"
and "emule".
use-torrent-name − True/false. Enable/disable using
torrent names (as
stored in the torrent file) instead of torrent file names.
peer-id − String. Override the Peer ID.
user-agent − String. Override the user agent sent to
tracker.
pidfile − String. PID-file name (file to write the PID
to)
announce-ip − String, representing IPv4 or IPv6
address. Tell
trackers to use this address instead of the one specified
using
torrent-ip.
allocation-mode − Choice: sparse, full, compact.
sparse: all pieces will be written to the place where they belong and sparse files will be used. This is the recommended, and default mode.
full: all pieces will be allocated, zeroes will be written to the files, before the data is downloaded and written to the file. This might be useful for filesystems that don’t support sparse files)
compact: the storage will grow as more pieces are downloaded, and pieces are rearranged to finally be in their correct places once the entire torrent has been downloaded.
Section
"auth"
passwd-file − Filename of the password file used by
the daemon.
See btgpasswd(1).
Section
"limit"
The limits in this section will apply to all sessions
independent of how many torrents are running. If multiple
sessions are running each will have this limit, the limits
are NOT shared between SESSIONS, only between torrents in a
session.
upload_rate_limit − Max session-global upload rate in
bytes per
second.
download_rate_limit − Max session-global download rate
in bytes per
second.
max_uploads − Max session-global number of connected
uploads.
max_connections − Max session-global number
connections (when
downloading).
Section
"savesessions"
Sessionsaving is an compile time optional feature in BTG
(and can also be disabled from configuration file). It can
be used to store information about all running sessions when
btg is exited, and periodicly specified by timeout. If
enabled, it will save any running sessions and state
information about all torrents. Upload/download counters
will be saved to, so ratio calculation can be performed even
if we restart the daemon. Any settings for the torrent,
including run state, limits etc will be saved here. The
.torrent file will be removed from the temporary dir and
saved in the session save file together with fast-resume
data.
enable − Choice: "true" or
"false".
filename − In which file we should save running
sessions.
timeout − How often to save the sessions (in
seconds).
Section
"runas"
Run the daemon as another user/group.
user − Name of the user the daemon should run as.
group − Name of the group the daemon should run
as.
[transport]
default=tcpip
[network]
listen-to=127.0.0.1:16000
torrent-range=10024:11240
[logging]
type=file
filename=/var/log/btgdaemon.log
[misc]
proxy=192.168.0.1:8118
pidfile=/var/run/btgdaemon.pid
[savesessions]
enable=true
filename=~/.btg/daemon.save
[limit]
upload_rate_limit = 40960
download_rate_limit 409600
max_uploads = -1
max_connections = 100
Section
transport
default − Choice between "tcpip",
"stcpip", "xml-rpc",
"sxml-rpc".
Section
network
daemon-address − IPv4:port pair. If a network
transport (tcpip, stcpip,
xml-rpc or sxml-rpc) is used, this is where we should try to
connect to
the daemon.
Section
"logging"
type − Log type. Choice between: "stdout",
"file", "syslog".
filename − If file logging was selected, filename to
write the
log to.
Section
"Misc"
leech-mode − Choice between "true" or
"false".
never-ask − Never ask the user any questions. Choice
between
"true" or "false".
Section
"auth"
username − The username used for accessing the daemon.
password-hash − The hash of the password used for
accessing the
daemon.
[transport]
default=tcpip
[network]
daemon-address=127.0.0.1:16000
[logging]
type=file
filename=/tmp/btg_client.log
[misc]
leech-mode=false
~/.btg/daemon.ini
- the daemon configuration file.
~/.btg/client.ini - the client configuration file.
Written by Michael Wojciechowski and Johan Strom.
btg(5), btgdaemon(5), btgpasswd(1), btgcli(1), btgui(1)