summaryrefslogtreecommitdiff
path: root/man5/opentracker.conf.5
diff options
context:
space:
mode:
Diffstat (limited to 'man5/opentracker.conf.5')
-rw-r--r--man5/opentracker.conf.5143
1 files changed, 143 insertions, 0 deletions
diff --git a/man5/opentracker.conf.5 b/man5/opentracker.conf.5
new file mode 100644
index 0000000..67e624f
--- /dev/null
+++ b/man5/opentracker.conf.5
@@ -0,0 +1,143 @@
1.Dd 2026-10-28
2.Dt opentracker.conf 5
3.Os Unix
4.Sh NAME
5.Nm opentracker.conf
6.Nd configuration file for opentracker
7.Sh SYNOPSIS
8.Nm
9.Sh DESCRIPTION
10The
11.Nm
12configuration file specifies various options for configuring the behavior of the opentracker program.
13.Pp
14Lines starting with '#' are comments and are ignored. Options are specified as 'keyword value' pairs.
15.Pp
16The following options are available:
17.Pp
18.Bl -tag -width ".It access.proxy" -compact
19.It listen.tcp_udp Ar address
20Specifies an address opentracker will listen on for both TCP and UDP connections. If none are specified, opentracker listens on 0.0.0.0:6969 by default. Can be added more than once.
21.Pp
22.It listen.tcp Ar address
23Specifies the address opentracker will listen on for TCP connections. Can be added more than once.
24.Pp
25.It listen.udp Ar address
26Specifies the address opentracker will listen on for UDP connections. Can be added more than once.
27.Pp
28A listen statement may carry options after the address, as in
29.Dl listen.udp 10.0.0.5:6969 workers=4 shared
30where
31.Cm workers Ns = Ns Ar count
32sets the worker count for that socket alone and is ignored for TCP, and
33.Cm shared
34permits another process to bind the same address.
35.Pp
36.It listen.udp.workers Ar threads
37Specifies how many threads will be spawned to handle UDP requests, for every
38listen statement that does not carry a
39.Cm workers
40option of its own. Defaults to 1. A count of 0 serves UDP from the event loop,
41in the thread that also serves TCP. See
42.Sx TUNING
43before raising it.
44.Pp
45.It listen.tcp.workers Ar threads
46Specifies how many threads accept and answer HTTP connections, for every
47listen statement that does not carry a
48.Cm workers
49option of its own. Defaults to 0, which serves them from the event loop. See
50.Sx TUNING
51before raising it.
52.Pp
53.It listen.shared Ar boolean
54Permits another process to bind the same address, for every listen statement
55that does not carry a
56.Cm shared
57option of its own. Defaults to 0, and is useful only where a second tracker is
58deliberately run on the same address.
59.Pp
60.It access.whitelist Ar path/to/whitelist
61Specifies the path to the whitelist file containing all torrent hashes that opentracker will serve. Use this option if opentracker runs in a non-open mode.
62.Pp
63.It access.blacklist Ar path/to/blacklist
64Specifies the path to the blacklist file containing all torrent hashes that opentracker will not serve. Use this option if opentracker was compiled to allow blacklisting.
65.Pp
66.It access.fifo_add Ar path/to/adder.fifo
67Specifies the path to the FIFO (named pipe) used for dynamic changesets to accesslists. Info hashes written to this FIFO will be added to the main accesslist file.
68.Pp
69.It access.fifo_delete Ar path/to/deleter.fifo
70Specifies the path to the FIFO (named pipe) used for dynamic changesets to accesslists. Info hashes written to this FIFO will be removed from the main accesslist file.
71.Pp
72.It access.stats Ar ip_address_or_network
73Specifies the IP address or network in CIDR notation allowed to fetch stats from opentracker.
74.Pp
75.It access.stats_path Ar path
76Specifies the path to the stats location. You can configure opentracker to appear anywhere on your tracker. Defaults to /stats.
77.Pp
78.It access.proxy Ar ip_address_or_network
79Specifies the IP address or network of the reverse proxies. Opentracker will take the X-Forwarded-For address instead of the source IP address. Can be added more than once.
80.Pp
81.It livesync.cluster.listen Ar ip_address:port
82Specifies the IP address and port opentracker will listen on for incoming live sync packets to keep a cluster of opentrackers synchronized.
83.Pp
84.It livesync.cluster.node_ip Ar ip_address
85Specifies one trusted IP address for sync between trackers running in a cluster. Can be added more than once.
86.Pp
87.It tracker.rootdir Ar path
88Specifies the directory opentracker will chroot/chdir to. All black/white list files must be located in this directory.
89.Pp
90.It tracker.user Ar username
91Specifies the user opentracker will setuid to after binding to potentially privileged ports.
92.Pp
93.It tracker.redirect_url Ar URL
94Specifies the URL opentracker will redirect to in response to a "GET / HTTP" request.
95.El
96.Sh TUNING
97A worker is a thread that blocks in a read until a datagram arrives. Where the
98kernel spreads arriving datagrams over a group of sockets bound to one address,
99opentracker binds one socket per worker and throughput rises with the worker
100count. Linux does so, and FreeBSD since 12.0. Where a kernel does not, every
101worker reads the same socket and they contend for its receive queue, so more
102than one worker costs throughput. opentracker asks at start up and binds a
103group only where the answer is yes.
104.Pp
105.Pa tests/udp_scaling.py
106in the source distribution sweeps the setting against a running tracker.
107Measure on the machine that will carry the traffic.
108.Pp
109A TCP worker accepts a connection and answers it on its own stack, without
110the event loop seeing it at all; only a connection it cannot finish is handed
111over. One worker serves less than none, because accepting leaves the event
112loop's thread without anything gained in return, so the setting is worth
113either 0 or at least 2.
114.Pa tests/http_load.c
115in the source distribution drives the tracker over HTTP to measure it.
116.Pp
117On FreeBSD the
118.Xr accf_data 9
119filter has the kernel hold a new connection until data arrives on it, so the
120tracker is woken once with the request already there. opentracker uses it
121wherever it is available; enable it with
122.Cm options ACCEPT_FILTER_DATA
123in the kernel or
124.Va kld_list Ns = Ns Qq accf_data
125in
126.Xr rc.conf 5 .
127.Sh EXAMPLES
128To specify the address opentracker will listen on for both TCP and UDP connections:
129.Dl listen.tcp_udp 0.0.0.0:6969
130.Pp
131To specify the address opentracker will listen on for TCP connections:
132.Dl listen.tcp 0.0.0.0
133.Pp
134To specify the address opentracker will listen on for UDP connections:
135.Dl listen.udp 0.0.0.0:6969
136.Pp
137.Sh SEE ALSO
138.Xr opentracker 1
139.Pp
140.Sh AUTHOR
141.An Dirk Engling
142.Aq Mt erdgeist@erdgeist.org
143.Pp