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.5154
1 files changed, 154 insertions, 0 deletions
diff --git a/man5/opentracker.conf.5 b/man5/opentracker.conf.5
new file mode 100644
index 0000000..9a836ae
--- /dev/null
+++ b/man5/opentracker.conf.5
@@ -0,0 +1,154 @@
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
83sync packets to keep a cluster of opentrackers synchronized. Every member of a
84cluster has to agree on the port, which is also the one packets are sent to.
85.Pp
86.It livesync.cluster.group Ar ip_address
87Specifies the multicast group a cluster talks in. For reaosns of backwards
88comaptibility with legacy trackers, it defaults to 224.0.23.5, which,
89technically sits in a range IANA assigns on request.
90
91A cluster of its own is better served by an address out of 239.192.0.0/14,
92which RFC 2365 sets aside for private use. Packets carry a ttl of 1 either
93way and never leave the local link.
94.Pp
95.It livesync.cluster.node_ip Ar ip_address
96Specifies one trusted IP address for sync between trackers running in a cluster. Can be added more than once.
97.Pp
98.It tracker.rootdir Ar path
99Specifies the directory opentracker will chroot/chdir to. All black/white list files must be located in this directory.
100.Pp
101.It tracker.user Ar username
102Specifies the user opentracker will setuid to after binding to potentially privileged ports.
103.Pp
104.It tracker.redirect_url Ar URL
105Specifies the URL opentracker will redirect to in response to a "GET / HTTP" request.
106.El
107.Sh TUNING
108A worker is a thread that blocks in a read until a datagram arrives. Where the
109kernel spreads arriving datagrams over a group of sockets bound to one address,
110opentracker binds one socket per worker and throughput rises with the worker
111count. Linux does so, and FreeBSD since 12.0. Where a kernel does not, every
112worker reads the same socket and they contend for its receive queue, so more
113than one worker costs throughput. opentracker asks at start up and binds a
114group only where the answer is yes.
115.Pp
116.Pa tests/udp_scaling.py
117in the source distribution sweeps the setting against a running tracker.
118Measure on the machine that will carry the traffic.
119.Pp
120A TCP worker accepts a connection and answers it on its own stack, without
121the event loop seeing it at all; only a connection it cannot finish is handed
122over. One worker serves less than none, because accepting leaves the event
123loop's thread without anything gained in return, so the setting is worth
124either 0 or at least 2.
125.Pa tests/http_load.c
126in the source distribution drives the tracker over HTTP to measure it.
127.Pp
128On FreeBSD the
129.Xr accf_data 9
130filter has the kernel hold a new connection until data arrives on it, so the
131tracker is woken once with the request already there. opentracker uses it
132wherever it is available; enable it with
133.Cm options ACCEPT_FILTER_DATA
134in the kernel or
135.Va kld_list Ns = Ns Qq accf_data
136in
137.Xr rc.conf 5 .
138.Sh EXAMPLES
139To specify the address opentracker will listen on for both TCP and UDP connections:
140.Dl listen.tcp_udp 0.0.0.0:6969
141.Pp
142To specify the address opentracker will listen on for TCP connections:
143.Dl listen.tcp 0.0.0.0
144.Pp
145To specify the address opentracker will listen on for UDP connections:
146.Dl listen.udp 0.0.0.0:6969
147.Pp
148.Sh SEE ALSO
149.Xr opentracker 1
150.Pp
151.Sh AUTHOR
152.An Dirk Engling
153.Aq Mt erdgeist@erdgeist.org
154.Pp