0730f7774a7ec6d5d8fce2dc07e8d52d0f8d8183
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

1) ## translation metadata
2) # Revision: $Revision$
3) 
Roger Dingledine similar patch on the docs/e...

Roger Dingledine authored 18 years ago

4) #include "head.wmi" TITLE="Server Configuration Instructions"
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

5) 
6) <div class="center">
7) 
8) <div class="main-column">
9) 
10) <h1>Configuring a <a href="<page index>">Tor</a> server</h1>
11) <br />
12) 
13) <p>
14) The Tor network relies on volunteers to donate bandwidth. The more
15) people who run servers, the faster the Tor network will be. If you have
16) at least 20 kilobytes/s each way, please help out Tor by configuring your
17) Tor to be a server too. We have many features that make Tor servers easy
18) and convenient, including rate limiting for bandwidth, exit policies so
19) you can limit your exposure to abuse complaints, and support for dynamic
20) IP addresses.</p>
21) 
22) <p>Having servers in many different places on the Internet is what
23) makes Tor users secure. <a
24) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ServerAnonymity">You
25) may also get stronger anonymity yourself</a>,
26) since remote sites can't know whether connections originated at your
27) computer or were relayed from others.</p>
28) 
29) <p>Setting up a Tor server is easy and convenient:
30) <ul>
31) <li>Tor has built-in support for <a
32) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#LimitBandwidth">rate
33) limiting</a>. Further, if you have a fast link
34) but want to limit the number of bytes per day
35) (or week or month) that you donate, check out the <a
36) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Hibernation">hibernation
37) feature</a>.
38) </li>
39) <li>Each Tor server has an <a
40) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#RunAServerBut">exit
41) policy</a> that specifies what sort of outbound connections are allowed
42) or refused from that server. If you are uncomfortable allowing people
43) to exit from your server, you can set it up to only allow connections
44) to other Tor servers.
45) </li>
46) <li>It's fine if the server goes offline sometimes. The directories
47) notice this quickly and stop advertising the server. Just try to make
48) sure it's not too often, since connections using the server when it
49) disconnects will break.
50) </li>
51) <li>We can handle servers with dynamic IPs just fine, as long as the
52) server itself knows its IP. Have a look at this
53) <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#DynamicIP">
54) entry in the FAQ</a>.
55) </li>
56) <li>If your server is behind a NAT and it doesn't know its public
57) IP (e.g. it has an IP of 192.168.x.y), you'll need to set up port
58) forwarding. Forwarding TCP connections is system dependent but <a
59) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ServerForFirewalledCli
60) ents">this FAQ entry</a> offers some examples on how to do this.
61) </li>
62) <li>Your server will passively estimate and advertise its recent
63) bandwidth capacity, so high-bandwidth servers will attract more users than
64) low-bandwidth ones. Therefore having low-bandwidth servers is useful too.
65) </li>
66) </ul>
67) 
68) <p>You can run a Tor server on
69) pretty much any operating system, but see <a
70) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ServerOS">this
71) FAQ entry</a> for advice about which ones work best and other problems
72) you might encounter.</p>
73) 
74) <hr />
75) <a id="zero"></a>
76) <h2><a class="anchor" href="#zero">Step Zero: Download and Install Tor</a></h2>
77) <br />
78) 
79) <p>Before you start, you need to make sure that Tor is up and running.
80) </p>
81) 
82) <p>For Windows users, this means at least <a
Roger Dingledine and get the relative links...

Roger Dingledine authored 18 years ago

83) href="<page docs/tor-doc-win32>#installing">step one</a>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

84) of the Windows Tor installation howto. Mac OS X users need to do at least
Roger Dingledine and get the relative links...

Roger Dingledine authored 18 years ago

85) <a href="<page docs/tor-doc-osx>#installing">step one</a>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

86) of OS X Tor installation howto.  Linux/BSD/Unix users should do at least
Roger Dingledine and get the relative links...

Roger Dingledine authored 18 years ago

87) <a href="<page docs/tor-doc-unix>#installing">step one</a>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

88) of the Unix Tor installation howto.
89) </p>
90) 
91) <p>If it's convenient, you might also want to use it as a client for a
92) while to make sure it's actually working.</p>
93) 
94) <hr />
95) <a id="one"></a>
96) <h2><a class="anchor" href="#one">Step One: Set it up as a server</a></h2>
97) <br />
98) 
99) <p>
100) 1. Verify that your clock is set correctly. If possible, synchronize
101) your clock with public time servers. 
102) </p>
103) 
104) <p>
105) 2. Make sure name resolution works (that is, your computer can resolve addresses correctly).
106) </p>
107) 
108) <p>
109) 3. Edit the bottom part of your torrc. (See <a
110) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#torrc">this
111) FAQ entry</a> for help.)
112) Make sure to define at least Nickname and ORPort. Create the DataDirectory
113) if necessary, and make sure it's owned by the user that will be running
114) tor. <em>If you want to run more than one server that's great, but
115) please set <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#MultipleServers">the
116) MyFamily option</a> in all your servers' configuration files.</em>
117) </p>
118) 
119) <p>
120) 4. If you are using a firewall, open a hole in your firewall so
121) incoming connections can reach the ports you configured (ORPort, plus
122) DirPort if you enabled it). Make sure you allow all outgoing connections,
123) so your server can reach the other Tor servers.
124) </p>
125) 
126) <p>
127) 5. Start your server: if you installed from source you can just
128) run <tt>tor</tt>, whereas packages typically launch Tor from their
Roger Dingledine add a link to the log faq w...

Roger Dingledine authored 18 years ago

129) initscripts or startup scripts. If it logs any
130) warnings, address them. (By default Tor logs to stdout,
131) but some packages log to <tt>/var/log/tor/</tt> or <a
132) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Logs">other
133) locations</a>. You can edit your torrc to configure log locations.)
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

134) </p>
135) 
136) <p>
137) 6. Subscribe to the <a
138) href="http://archives.seul.org/or/announce/">or-announce</a>
139) mailing list. It is very low volume, and it will keep you informed
140) of new stable releases. You might also consider subscribing to <a
141) href="http://archives.seul.org/or/talk/">or-talk</a> (higher volume),
142) where new development releases are announced.
143) </p>
144) 
145) <p>
146) 7. Have a look at the manual.
147) The <a href="<page tor-manual>">manual</a> for the
148) latest stable version provides detailed instructions for how to install
149) and use Tor, including configuration of client and server options.
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

150) If you are running the development version of Tor the manual is available
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

151) <a href="<page tor-manual-cvs>">here</a>.
152) </p>
153) 
154) <p>
155) 8. Read
156) <a href="http://wiki.noreply.org/noreply/TheOnionRouter/OperationalSecurity">this document</a>
157) to get ideas how you can increase the security of your server.
158) <hr />
159) <a id="two"></a>
160) <h2><a class="anchor" href="#two">Step Two: Make sure it's working</a></h2>
161) <br />
162) 
163) <p>As soon as your server manages to connect to the network, it will
164) try to determine whether the ports you configured are reachable from
165) the outside. This may take up to 20 minutes. Look for a log entry like
166) <tt>Self-testing indicates your ORPort is reachable from the outside. Excellent.</tt>
167) If you don't see this message, it means that your server is not reachable
168) from the outside &mdash; you should re-check your firewalls, check that it's
169) testing the IP and port you think it should be testing, etc.
170) </p>
171) 
172) <p>When it decides that it's reachable, it will upload a "server
173) descriptor" to the directories. This will let clients know
174) what address, ports, keys, etc your server is using. You can <a
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

175) href="http://belegost.mit.edu/tor/status/authority">load the network
176) status manually</a> and
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

177) look through it to find the nickname you configured, to make sure it's
178) there. You may need to wait a few seconds to give enough time for it to
179) make a fresh directory.</p>
180) 
181) <hr />
182) <a id="three"></a>
183) <h2><a class="anchor" href="#three">Step Three: Register your nickname</a></h2>
184) <br />
185) 
186) <p>
187) Once you are convinced it's working (after a day or two maybe), you should
188) register your server.
189) This reserves your nickname so nobody else can take it, and lets us
190) contact you if you need to upgrade or something goes wrong.
191) </p>
192) 
193) <p>
194) Send mail to <a
195) href="mailto:tor-ops@freehaven.net">tor-ops@freehaven.net</a> with a
196) subject of '[New Server] &lt;your server's nickname&gt;' and
197) include the following information in the message:
198) </p>
199) <ul>
200) <li>Your server's nickname</li>
201) <li>The fingerprint for your server's key (the contents of the
202) "fingerprint" file in your DataDirectory &mdash; on Windows, look in
203) \<i>username</i>\Application&nbsp;Data\tor\ or \Application&nbsp;Data\tor\;
204) on OS X, look in /Library/Tor/var/lib/tor/; and on Linux/BSD/Unix,
205) look in /var/lib/tor or ~/.tor)
206) </li>
207) <li>Who you are, so we know whom to contact if a problem arises</li>
208) <li>What kind of connectivity the new server will have</li>
209) </ul>
210) 
211) <hr />
212) <a id="four"></a>
213) <h2><a class="anchor" href="#four">Step Four: Once it's working</a></h2>
214) <br />
215) 
216) <p>
217) We recommend the following steps as well:
218) </p>
219) 
220) <p>
221) 6. Decide what exit policy you want. By default your server allows
222) access to many popular services, but we restrict some (such as port 25)
223) due to abuse potential. You might want an exit policy that is
224) less restrictive or more restrictive; edit your torrc appropriately.
225) Read the FAQ entry on <a
226) href="<page faq-abuse>#TypicalAbuses">issues you might
227) encounter if you use the default exit policy</a>.
228) If you choose a particularly open exit policy, you should make
229) sure your ISP is ok with that choice.
230) </p>
231) 
232) <p>
233) 7. Decide about rate limiting. Cable modem, DSL, and other users
234) who have asymmetric bandwidth (e.g. more down than up) should
235) rate limit to their slower bandwidth, to avoid congestion. See the <a
236) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#LimitBandwidth">rate
237) limiting FAQ entry</a> for details.
238) </p>
239) 
240) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

241) 8. Back up your Tor server's private key (stored in "keys/secret_id_key"
242) in your DataDirectory). This is your server's "identity," and
243) you need to keep it safe so nobody can read the traffic that goes
244) through your server. This is the critical file to keep if you need to <a
245) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#UpgradeServer">move
246) or restore your Tor server</a> if something goes wrong.
247) </p>
248) 
249) <p>
250) 9. If you control the name servers for your domain, consider setting
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

251) your hostname to 'anonymous' or 'proxy' or 'tor-proxy', so when other
252) people see the address in their web logs, they will more quickly
253) understand what's going on.
254) </p>
255) 
256) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

257) 10. If your computer isn't running a webserver, please consider
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

258) changing your ORPort to 443 and your DirPort to 80. Many Tor
259) users are stuck behind firewalls that only let them browse the
260) web, and this change will let them reach your Tor server. Win32
261) servers can simply change their ORPort and DirPort directly
262) in their torrc and restart Tor. OS X or Unix servers can't bind
263) directly to these ports (since they don't run as root), so they will
264) need to set up some sort of <a
265) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#ServerForFirewalledClients">
266) port forwarding</a> so connections can reach their Tor server. If you are
267) using ports 80 and 443 already but still want to help out, other useful
268) ports are 22, 110, and 143.
269) </p>
270) 
271) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

272) 11. If your Tor server provides other services on the same IP address
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

273) &mdash; such as a public webserver &mdash; make sure that connections to the
274) webserver are allowed from the local host too. You need to allow these
275) connections because Tor clients will detect that your Tor server is the <a
276) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ExitEavesdroppers">safest
277) way to reach that webserver</a>, and always build a circuit that ends
278) at your server. If you don't want to allow the connections, you must
279) explicitly reject them in your exit policy.
280) </p>
281) 
282) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

283) 12. (Unix only). Make a separate user to run the server. If you
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

284) installed the OS X package or the deb or the rpm, this is already
285) done. Otherwise, you can do it by hand. (The Tor server doesn't need to
286) be run as root, so it's good practice to not run it as root. Running
287) as a 'tor' user avoids issues with identd and other services that
288) detect user name. If you're the paranoid sort, feel free to <a
289) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorInChroot">put Tor
290) into a chroot jail</a>.)
291) </p>
292) 
293) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

294) 13. (Unix only.) Your operating system probably limits the number
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

295) of open file descriptors per process to 1024 (or even less). If you
296) plan to be running a fast exit node, this is probably not enough. On
297) Linux, you should add a line like "toruser hard nofile 8192" to your
298) /etc/security/limits.conf file (where toruser is the user that runs the
299) Tor process), and then restart Tor if it's installed as a package (or log
300) out and log back in if you run it yourself). If that doesn't work, see <a
301) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#FileDescriptors">this
302) FAQ entry</a> for other suggested ways to run "ulimit -n 8192" before
303) you launch Tor.
304) </p>
305) 
306) <p>
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

307) 14. If you installed Tor via some package or installer, it probably starts
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

308) Tor for you automatically on boot. But if you installed from source,
309) you may find the initscripts in contrib/tor.sh or contrib/torctl useful.
310) </p>
311) 
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

312) <p>
313) When you change your Tor configuration, <a
314) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Restarting">in
315) most cases you can reload your configuration without restarting Tor</a>,
316) and remember to verify that your server still works correctly after
317) the change.
318) </p>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

319) 
320) <hr />
321) 
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

322) <p>If you have suggestions for improving this document, please <a
323) href="<page contact>">send them to us</a>. Thanks!</p>