tor-doc-server.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  2. "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  4. <head>
  5. <title>Tor Server Configuration Instructions</title>
  6. <meta name="Author" content="Roger Dingledine" />
  7. <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
  8. <link rel="stylesheet" type="text/css" href="http://tor.eff.org/stylesheet.css" />
  9. <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
  10. </head>
  11. <body>
  12. <!-- TITLE BAR & NAVIGATION -->
  13. <table class="banner" border="0" cellpadding="0" cellspacing="0">
  14. <tr>
  15. <td class="banner-left"></td>
  16. <td class="banner-middle">
  17. <a href="/index.html">Home</a>
  18. | <a href="/howitworks.html">How It Works</a>
  19. | <a href="/download.html">Download</a>
  20. | <a href="/documentation.html">Docs</a>
  21. | <a href="/users.html">Users</a>
  22. | <a href="/faq.html">FAQs</a>
  23. | <a href="/volunteer.html">Volunteer</a>
  24. | <a href="/developers.html">Developers</a>
  25. | <a href="/research.html">Research</a>
  26. | <a href="/people.html">People</a>
  27. </td>
  28. <td class="banner-right"></td>
  29. </tr>
  30. </table>
  31. <!-- END TITLE BAR & NAVIGATION -->
  32. <div class="center">
  33. <div class="main-column">
  34. <h1>Configuring a <a href="http://tor.eff.org/">Tor</a> server</h1>
  35. <br />
  36. <p>The Tor network relies on volunteers to donate bandwidth. If you have
  37. at least 20 kilobytes/s each way, please help out Tor by configuring
  38. your Tor to be a server too. Having servers in many different pieces
  39. of the Internet gives users more robustness against curious telcos and
  40. brute force attacks. You may also get stronger anonymity, since your
  41. destination can't know whether connections relayed through your computer
  42. originated at your computer or not.</p>
  43. <p>Setting up a Tor server is easy and convenient:
  44. <ul>
  45. <li>Tor has built-in support for <a
  46. href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#LimitBandwidth">rate
  47. limiting</a>. Further, if you have a fast link
  48. but want to limit the number of bytes per day
  49. (or week or month) that you donate, check out the <a
  50. href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Hibernation">hibernation
  51. feature</a>.
  52. </li>
  53. <li>Each Tor server has an <a
  54. href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#RunAServerBut">exit
  55. policy</a> that specifies what sort of outbound connections are allowed
  56. or refused from that server. If you are uncomfortable allowing people
  57. to exit from your server, you can set it up to only allow connections
  58. to other Tor servers.
  59. </li>
  60. <li>It's fine if the server goes offline sometimes. The directories
  61. notice this quickly and stop advertising the server. Just try to make
  62. sure it's not too often, since connections using the server when it
  63. disconnects will break.
  64. </li>
  65. <li>We can handle servers with dynamic IPs just fine, as long as the
  66. server itself knows its IP. Have a look at this
  67. <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#DynamicIP">
  68. entry in the FAQ</a>.
  69. </li>
  70. <li>If your server is behind a NAT and it doesn't know its public
  71. IP (e.g. it has an IP of 192.168.x.y), you'll need to set up port
  72. forwarding. Forwarding TCP connections is system dependent but <a
  73. href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ServerForFirewalledCli
  74. ents">this FAQ entry</a> offers some examples on how to do this.
  75. </li>
  76. <li>Your server will passively estimate and advertise its recent
  77. bandwidth capacity, so high-bandwidth servers will attract more users than
  78. low-bandwidth ones. Therefore having low-bandwidth servers is useful too.
  79. </li>
  80. </ul>
  81. <hr />
  82. <a id="zero"></a>
  83. <h2><a class="anchor" href="#zero">Step Zero: Download and Install Tor</a></h2>
  84. <br />
  85. <p>Before you start, you need to make sure that Tor is up and running.
  86. </p>
  87. <p>For Windows users, this means at least <a
  88. href="http://tor.eff.org/doc/tor-doc-win32.html#installing">step one</a>
  89. of the Windows Tor installation howto. Mac OS X users need to do at least
  90. <a href="http://tor.eff.org/doc/tor-doc-osx.html#installing">step one</a>
  91. of OS X Tor installation howto. Linux/BSD/Unix users should do at least
  92. <a href="http://tor.eff.org/doc/tor-doc-unix.html#installing">step one</a>
  93. of the Unix Tor installation howto.
  94. </p>
  95. <p>If it's convenient, you might also want to use it as a client for a
  96. while to make sure it's actually working.</p>
  97. <hr />
  98. <a id="one"></a>
  99. <h2><a class="anchor" href="#one">Step One: Set it up as a server</a></h2>
  100. <br />
  101. <p>
  102. 1. Verify that your clock is set correctly. If possible, synchronize
  103. your clock with public time servers. Make sure name resolution works
  104. (that is, your computer can resolve addresses correctly).
  105. </p>
  106. <p>2. Edit the bottom part of your torrc. (See <a
  107. href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#torrc">this
  108. FAQ entry</a> for help.)
  109. Make sure to define at least Nickname and ORPort. Create the DataDirectory
  110. if necessary, and make sure it's owned by the user that will be running
  111. tor.
  112. </p>
  113. <p>
  114. 3. If you are using a firewall, open a hole in your firewall so
  115. incoming connections can reach the ports you configured (ORPort, plus
  116. DirPort if you enabled it). Make sure you allow all outgoing connections,
  117. so your server can reach the other Tor servers.
  118. </p>
  119. <p>
  120. 4. Start your server: if you installed from source you can just
  121. run <tt>tor</tt>, whereas packages typically launch Tor from their
  122. initscripts or startup scripts. If it logs any warnings, address them. (By
  123. default Tor logs to stdout, but some packages log to <tt>/var/log/tor/</tt>
  124. instead. You can edit your torrc to configure log locations.)
  125. </p>
  126. <p>
  127. 5. Subscribe to the <a
  128. href="http://archives.seul.org/or/announce/">or-announce</a>
  129. mailing list. It is very low volume, and it will keep you informed
  130. of new stable releases. You might also consider subscribing to <a
  131. href="http://archives.seul.org/or/talk/">or-talk</a> (higher volume),
  132. where new development releases are announced.
  133. </p>
  134. <hr />
  135. <a id="two"></a>
  136. <h2><a class="anchor" href="#two">Step Two: Make sure it's working</a></h2>
  137. <br />
  138. <p>As soon as your server manages to connect to the network, it will
  139. try to determine whether the ports you configured are reachable from
  140. the outside. This may take several minutes. The log entries will keep
  141. you informed of its progress.</p>
  142. <p>When it decides that it's reachable, it will upload a "server
  143. descriptor" to the directories. This will let clients know
  144. what address, ports, keys, etc your server is using. You can <a
  145. href="http://belegost.seul.org/">load the directory manually</a> and
  146. look through it to find the nickname you configured, to make sure it's
  147. there. You may need to wait a few seconds to give enough time for it to
  148. make a fresh directory.</p>
  149. <hr />
  150. <a id="three"></a>
  151. <h2><a class="anchor" href="#three">Step Three: Register your nickname</a></h2>
  152. <br />
  153. <p>
  154. Once you are convinced it's working, you should register your server.
  155. This reserves your nickname so nobody else can take it, and lets us
  156. contact you if you need to upgrade or something goes wrong.
  157. </p>
  158. <p>
  159. Send mail to <a
  160. href="mailto:tor-ops@freehaven.net">tor-ops@freehaven.net</a> with a
  161. subject of '[New Server] &lt;your server's nickname&gt;' and
  162. include the following information in the message:
  163. </p>
  164. <ul>
  165. <li>Your server's nickname</li>
  166. <li>The fingerprint for your server's key (the contents of the
  167. "fingerprint" file in your DataDirectory -- on Windows, look in
  168. \<i>username</i>\Application&nbsp;Data\tor\ or \Application&nbsp;Data\tor\;
  169. on OS X, look in /Library/Tor/var/lib/tor/; and on Linux/BSD/Unix,
  170. look in /var/lib/tor or ~/.tor)
  171. </li>
  172. <li>Who you are, so we know whom to contact if a problem arises</li>
  173. <li>What kind of connectivity the new server will have</li>
  174. </ul>
  175. <hr />
  176. <a id="four"></a>
  177. <h2><a class="anchor" href="#four">Step Four: Once it's working</a></h2>
  178. <br />
  179. <p>
  180. We recommend the following steps as well:
  181. </p>
  182. <p>
  183. 6. (Unix only). Make a separate user to run the server. If you
  184. installed the OS X package or the deb or the rpm, this is already
  185. done. Otherwise, you can do it by hand. (The Tor server doesn't need to
  186. be run as root, so it's good practice to not run it as root. Running
  187. as a 'tor' user avoids issues with identd and other services that
  188. detect user name. If you're the paranoid sort, feel free to <a
  189. href="http://wiki.noreply.org/wiki/TheOnionRouter/TorInChroot">put Tor
  190. into a chroot jail</a>.)
  191. </p>
  192. <p>
  193. 7. Decide what exit policy you want. By default your server allows
  194. access to many popular services, but we restrict some (such as port 25)
  195. due to abuse potential. You might want an exit policy that is
  196. less restrictive or more restrictive; edit your torrc appropriately.
  197. If you choose a particularly open exit policy, you might want to make
  198. sure your ISP is ok with that choice.
  199. </p>
  200. <p>
  201. 8. If you installed from source, you may find the initscripts in
  202. contrib/tor.sh or contrib/torctl useful if you want to set up Tor to
  203. start at boot.
  204. </p>
  205. <p>
  206. 9. If you control the name servers for your domain, consider setting
  207. your hostname to 'anonymous' or 'proxy' or 'tor-proxy', so when other
  208. people see the address in their web logs, they will more quickly
  209. understand what's going on.
  210. </p>
  211. <p>
  212. 10. If your computer isn't running a webserver, please consider
  213. changing your ORPort to 443 and your DirPort to 80. Many Tor
  214. users are stuck behind firewalls that only let them browse the
  215. web, and this change will let them reach your Tor server. Win32
  216. servers can simply change their ORPort and DirPort directly
  217. in their torrc and restart Tor. OS X or Unix servers can't bind
  218. directly to these ports (since they don't run as root), so they will
  219. need to set up some sort of <a
  220. href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#ServerForFirewalledClients">
  221. port forwarding</a> so connections can reach their Tor server. If you are
  222. using ports 80 and 443 already but still want to help out, other useful
  223. ports are 22, 110, and 143.
  224. </p>
  225. When you change your Tor configuration, be sure to restart Tor, and
  226. remember to verify that your server still works correctly after the
  227. change.
  228. <hr />
  229. <p>If you have suggestions for improving this document, please post
  230. them on <a href="http://bugs.noreply.org/tor">our bugtracker</a> in the
  231. website category. Thanks!</p>
  232. </div><!-- #main -->
  233. </div>
  234. <div class="bottom" id="bottom">
  235. <i><a href="mailto:tor-webmaster@freehaven.net"
  236. class="smalllink">Webmaster</a></i> - $Id$
  237. </div>
  238. </body>
  239. </html>