Running a Tor Server


The Tor network is made up of volunteers all over the world who donate some of their spare bandwidth by running a server. Vidalia helps you do your part by making it easy to set up a server of your own.

Basic Setup

If you decide you want to help the Tor network grow by running a server, you can follow these steps to get started:

  1. Open the Configuration Dialog by selecting Configure from the tray menu or Preferences from your system menubar on Macintosh systems.
  2. Select the Server configuration page.
  3. Check the box labeled Relay traffic for the Tor network.
  4. Enter the following information:
    • Nickname: The name which your server will be known as on the Tor network. An example of a server nickname is "myVidaliaServer".
    • Contact Info: Your e-mail address. This address will only be used to contact you in case there is an important Tor security update or something goes wrong with your server. You might also include your PGP or GPG key ID and fingerprint.
    • Server Port: The port on which your server will listen for traffic from clients or other Tor servers.
    • Address: Enter an address at which your computer can be reached by other Tor servers on the Internet. If you don't know your public IP address, you can click on Get Address and Vidalia will contact an external site (e.g., http://www.vidalia-project.net/iptest/ip.php) to find out what it thinks your public IP address is.
  5. If you would like to mirror Tor's directory of servers for others on the network you can check the box labeled Mirror the server directory. If you do not have much bandwidth, leave this box unchecked. If you do decide to mirror the server directory, make sure the Port is different than the Server port you entered above.
  6. Traffic exiting the Tor network from your router appears to come from your IP address. If you do not want this, then check the box labeled Only relay traffic between other Tor servers to act as a middle-man node.

Rate Limiting

Running a Tor server can consume a large amount of bandwidth; however, Tor allows you to limit the amount of bandwidth that you are willing to contribute to the Tor network. You can run a server, while still keeping your network connection usable for your own use.

The average rate is the maximum long-term average bandwidth allowed (in kilobytes per second). For example, you might want to choose 2 megabytes per second (2048 KB/s), or 50 kilobytes per second (a medium-speed cable connection). Tor requires a minimum of 20 kilobytes per second to run a server.

The maximum rate is a pool of bytes used to fulfill requests during short periods of traffic higher than your specified average rate, but still maintains the average over a long period. A low average rate but a high maximum rate enforces a long-term average while still allowing more traffic during peak times if the average hasn't been reached lately. If your average rate is the same as your maximum rate, then Tor will never exceed the specified rate. Your maximum rate must always be greater than or equal to your average rate.

It is important to remember that Tor measures bandwidth in bytes, not bits. Also, Tor only looks at incoming bytes instead of outgoing bytes. For example, if your server acts as a directory mirror, you may be sending more outgoing bytes than incoming. If you find this is the case and is putting too much strain on your bandwidth, you should consider unchecking the checkbox labeled Mirror the server directory.

Exit Policies

Exit policies give you a way to specify what sort of traffic you are willing to allow exit from your Tor server. Tor uses a default list of exit policies that restrict services such as mail to prevent spam, or some default file sharing ports to reduce abuse of the Tor network. Note: If you are a middle-man server, you don't have to worry about exit policies; no traffic is allowed to exit from your server at all.

An exit policy is made up of zero or more lines, each one representing an action to be taken if a connection leaving the Tor network from your server matches the address or port specified in the policy.

Policies are considered by Tor from first to last and Tor takes the action associated with the first match it finds. Any policies you add will be added to the beginning of Tor's list of default exit policies. Since policies are considered from first to last, ordering is important. You can use the buttons with the Up Arrow and the Down Arrow icons to reorder your list of policies.

Action

Each line in an exit policy has an action associated with it. The actions are:

Address

Addresses in a policy can be either an IP address (e.g., 123.45.67.8), an IP address and mask (e.g., 123.45.0.0/16), or a "*". If a "*" is specified, it means "match all addresses."

Ports

Each policy has a port or a range of ports associated with it. Valid port numbers range from 1 to 65535, or you can specify a "*" to indicate "all ports".

Examples

Here are a few examples of valid exit policy lines and a description of what they do: