Tor documentation

Tor provides a distributed network of servers ("onion routers"). Users bounce their communications (web requests, IM, IRC, SSH, etc.) around the routers. This makes it hard for recipients, observers, and even the onion routers themselves to track the source of the stream.

Why should I use Tor?

Individuals need Tor for privacy:

Journalists and NGOs need Tor for safety:

Companies need Tor for business security:

Governments need Tor for traffic-analysis-resistant communication:

Law enforcement needs Tor for safety:

Does the idea of sharing the Tor network with all of these groups bother you? It shouldn't -- you need them for your security.

Should I run a client or a server?

You can run Tor in either client mode or server mode. By default, everybody is a client. This means you don't relay traffic for anybody but yourself.

If your computer doesn't have a routable IP address or you're using a modem, you should stay a client. Otherwise, please consider being a server, to help out the network. (Currently each server uses 20-500 gigabytes of traffic per month, depending on its capacity and its rate limiting configuration.)

Note that you can be a server without allowing users to make connections from your computer to the outside world. This is called being a middleman server.

Benefits of running a server include:

You can read more about setting up Tor as a server below.

Installing Tor

Win32 users can use our Tor installer. See these instructions for help with installing, configuring, and using Tor on Win32.

You can get the latest releases here.

If you got Tor from a tarball, unpack it: tar xzf tor-0.0.9.1.tar.gz; cd tor-0.0.9.1. Run ./configure, then make, and then make install (as root if necessary). Then you can launch tor from the command-line by running tor. Otherwise, if you got it prepackaged (e.g. in the Debian package or Gentoo package), these steps are already done for you, and you may even already have Tor started in the background (logging to /var/log/something).

In any case, see the next section for what to do with it now that you've got it running.

Configuring a client

Tor comes configured as a client by default. It uses a built-in default configuration file, and most people won't need to change any of the settings.

After installing Tor, you should install privoxy, which is a filtering web proxy that integrates well with Tor. Add the line
forward-socks4a / localhost:9050 .
(don't forget the dot) to privoxy's config file (you can just add it to the top). Then change your browser to http proxy at localhost port 8118. (In Mozilla, this is in Edit|Preferences|Advanced|Proxies.) You should also set your SSL proxy to the same thing, to hide your SSL traffic. Using privoxy is necessary because Mozilla leaks your DNS requests when it uses a SOCKS proxy directly. Privoxy also gives you good html scrubbing.

To test if it's working, go to this site and see what IP it says you're coming from. (If it's down, you can try the junkbusters site instead.)

If you have a personal firewall, be sure to allow local connections to port 8118 and port 9050. If your firewall blocks outgoing connections, punch a hole so it can connect to TCP ports 80, 443, and 9001-9033. For more troubleshooting suggestions, see the FAQ.

To Torify an application that supports http, just point it at Privoxy (that is, localhost port 8118). To use SOCKS directly (for example, for instant messaging, Jabber, IRC, etc), point your application directly at Tor (localhost port 9050). For applications that support neither SOCKS nor http, you should look at using tsocks to dynamically replace the system calls in your program to route through Tor. If you want to use SOCKS 4A, consider using socat (specific instructions are on this hidden service url).

(Windows doesn't have tsocks; see the bottom of the Win32 instructions for alternatives.)

Configuring a server

We're looking for people with reasonably reliable Internet connections, that have at least 20 kilobytes/s each way. If you frequently have a lot of packet loss or really high latency, we can't handle your server yet. Otherwise, please help out!

Other things to note:

To set up a Tor server, do the following steps after installing Tor. (These instructions are Unix-centric; if you're excited about working with the Tor developers to get a Tor server working on Windows, let us know and we'll work with you to fix whatever bugs come up.)

Optionally, we recommend the following steps as well:

You can click here or here and look at the router-status line to see if your server is part of the network. It will be listed by nickname once we have added your server to the list of known servers; otherwise it is listed only by its fingerprint.

Configuring a hidden service

Tor allows clients and servers to offer hidden services. That is, you can offer an apache, sshd, etc, without revealing your IP to its users. This works via Tor's rendezvous point design: both sides build a Tor circuit out, and they meet in the middle.

If you're using Tor and Privoxy, you can go to the hidden wiki to see hidden services in action.

To set up a hidden service, copy torrc.sample to torrc (by default it's in /usr/local/etc/tor/), and edit the middle part. Then run Tor. It will create each HiddenServiceDir you have configured, and it will create a 'hostname' file which specifies the url (xyz.onion) for that service. You can tell people the url, and they can connect to it via their Tor client, assuming they're using a proxy (such as Privoxy) that speaks SOCKS 4A.

Setting up your own network

If you want to experiment locally with your own network, or you're cut off from the Internet and want to be able to mess with Tor still, then you may want to set up your own separate Tor network.

To set up your own Tor network, you need to run your own directory servers, and you need to configure each client and server so it knows about your directory servers rather than the default ones.