Torrc bandwidth config

hi, is it possible to set a minimum bandwidth tor nodes? if yes, how

1 Like

Can you specify if you are running a client or a .onion? The commands differ. If you are planning to run a node, Whonix isn’t really appropriate as Workstations nodes are impossible (can’t route Tor thru Tor) and Gateway nodes are insecure as they have a slightly larger attack surface because their is more attack surface than if you just installed an OS and Tor on a server.

You also need to specify if you want bandwith limits or caps.

If you are looking for limits, BandwidthRate is what you are probably looking for:

BandwidthRate N
bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits
A token bucket limits the average incoming bandwidth usage on this
node to the specified number of bytes per second, and the average
outgoing bandwidth usage to that same value. If you want to run a
relay in the public network, this needs to be at the very least 75
KBytes for a relay (that is, 600 kbits) or 50 KBytes for a bridge
(400 kbits) — but of course, more is better; we recommend at least
250 KBytes (2 mbits) if possible. (Default: 1 GByte)

If you want caps, this is only avaliable for .onion-services (Whonix-supported) and nodes (not Whonix-supported). You would be looking for AccountingMax, then. You should also be aware that most OS’s support stopping your Internet connection at a certain cap if your connection is set to metered anyways.

AccountingMax N
bytes|KBytes|MBytes|GBytes|TBytes|KBits|MBits|GBits|TBits
Limits the max number of bytes sent and received within a set time
period using a given calculation rule (see AccountingStart and
AccountingRule). Useful if you need to stay under a specific
bandwidth. By default, the number used for calculation is the max
of either the bytes sent or received. For example, with
AccountingMax set to 1 TByte, a server could send 900 GBytes and
receive 800 GBytes and continue running. It will only hibernate
once one of the two reaches 1 TByte. This can be changed to use the
sum of the both bytes received and sent by setting the
AccountingRule option to “sum” (total bandwidth in/out). When the
number of bytes remaining gets low, Tor will stop accepting new
connections and circuits. When the number of bytes is exhausted,
Tor will hibernate until some time in the next accounting period.
To prevent all servers from waking at the same time, Tor will also
wait until a random point in each period before waking up. If you
have bandwidth cost issues, enabling hibernation is preferable to
setting a low bandwidth, since it provides users with a collection
of fast servers that are up some of the time, which is more useful
than a set of slow servers that are always “available”.
Note that (as also described in the Bandwidth section) Tor uses powers of two, not powers of ten: 1 GByte is 102410241024, not one billion. Be careful: some internet service providers might count GBytes differently.

If you specify more about your situation, I can help with more specific commands.

1 Like

Whonix specific part:
Edit Tor Configuration


Whonix unspecific part:
The actual Tor configuration settings are unspecific to Whonix.

Can be resolved as per:

2 Likes