For the most in-depth resource on running a relay, see the Tor Relay Guide.
- Run "apt-get install tor" (as root).
- Make sure your clock, date, and timezone are set correctly. Install the ntp or openntpd (or similar) package to keep it that way.
- Edit /etc/tor/torrc to look like the following:
## The IP address or hostname for incoming connections (leave commented and Tor will guess) #Address noname.example.com ## A handle for your relay, so people don't have to refer to it by key. Nickname ididnteditheconfig ## Set your own contact info ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com> ## If you control multiple relays, include them in the family #MyFamily $keyid,$keyid,... ORPort 9001 DirPort 9030 ## Set your bandwidth rate (leave commented and Tor will run without bandwidth caps) #RelayBandwidthRate 30 MBytes #RelayBandwidthBurst 100 MBytes ExitPolicy reject *:*
- Run "service tor reload" (as root)
- After your relay connects to the network, it will try to determine whether the ports you configured are reachable from the outside. This step is usually fast, but it may take a few minutes.
- Look for a log entry in /var/log/syslog such as "Self-testing indicates your ORPort is reachable from the outside. Excellent." If you don't see this message, it means that your relay is not reachable from the outside. You should re-check your firewalls, check that the IP and ports you specified in your torrc are correct, etc.
- When it confirms that it's reachable, it will upload a "server descriptor" to the directory authorities to let clients know what address, ports, keys, etc your relay is using.
- After a few hours (to give it enough time to propagate), you can query Metrics to see whether your relay has successfully registered in the network. If it hasn't, re-check firewalls, IP and ports again.