ef2f6adfe5c459914e5df5811a0c7b5d10af8345
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
Peter Palfrader Line breaks in URLs not goo...

Peter Palfrader authored 18 years ago

59) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ServerForFirewalledClients">this
60) FAQ entry</a> offers some examples on how to do this.
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

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 />
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

95) <a id="setup"></a>
96) <h2><a class="anchor" href="#setup">Step One: Set it up as a server</a></h2>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

97) <br />
98) 
99) <p>
100) 1. Verify that your clock is set correctly. If possible, synchronize
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

101) your clock with public time servers.
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

102) </p>
103) 
104) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

105) 2. Make sure name resolution works (that is, your computer can resolve
106) Internet addresses correctly).
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

107) </p>
108) 
109) <p>
110) 3. Edit the bottom part of your torrc. (See <a
111) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#torrc">this
112) FAQ entry</a> for help.)
113) Make sure to define at least Nickname and ORPort. Create the DataDirectory
114) if necessary, and make sure it's owned by the user that will be running
115) tor. <em>If you want to run more than one server that's great, but
116) please set <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#MultipleServers">the
117) MyFamily option</a> in all your servers' configuration files.</em>
118) </p>
119) 
120) <p>
121) 4. If you are using a firewall, open a hole in your firewall so
122) incoming connections can reach the ports you configured (ORPort, plus
123) DirPort if you enabled it). Make sure you allow all outgoing connections,
124) so your server can reach the other Tor servers.
125) </p>
126) 
127) <p>
128) 5. Start your server: if you installed from source you can just
129) 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

130) initscripts or startup scripts. If it logs any
131) warnings, address them. (By default Tor logs to stdout,
132) but some packages log to <tt>/var/log/tor/</tt> or <a
133) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Logs">other
134) 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

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

151) If you are running the development version of Tor the manual is available
Roger Dingledine finish moving to tor-manual...

Roger Dingledine authored 18 years ago

152) <a href="<page tor-manual-dev>">here</a>.
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

153) </p>
154) 
155) <hr />
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

156) <a id="check"></a>
157) <h2><a class="anchor" href="#check">Step Two: Make sure it's working</a></h2>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

158) <br />
159) 
160) <p>As soon as your server manages to connect to the network, it will
161) try to determine whether the ports you configured are reachable from
Roger Dingledine link to the faq more freque...

Roger Dingledine authored 18 years ago

162) the outside. This may take up to 20 minutes. Look for a
163) <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Logs">log
164) entry</a> like
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

165) <tt>Self-testing indicates your ORPort is reachable from the outside. Excellent.</tt>
166) If you don't see this message, it means that your server is not reachable
167) from the outside &mdash; you should re-check your firewalls, check that it's
168) testing the IP and port you think it should be testing, etc.
169) </p>
170) 
171) <p>When it decides that it's reachable, it will upload a "server
172) descriptor" to the directories. This will let clients know
173) 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

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

Roger Dingledine authored 18 years ago

176) look through it to find the nickname you configured, to make sure it's
177) there. You may need to wait a few seconds to give enough time for it to
178) make a fresh directory.</p>
179) 
180) <hr />
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

181) <a id="after"></a>
182) <h2><a class="anchor" href="#after">Step Three: Once it's working</a></h2>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

183) <br />
184) 
185) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

186) We recommend the following steps as well:
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

187) </p>
188) 
189) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

190) 8. Read
191) <a href="http://wiki.noreply.org/noreply/TheOnionRouter/OperationalSecurity">this document</a>
192) to get ideas how you can increase the security of your server.
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

193) </p>
194) 
195) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

196) 9. Decide what exit policy you want. By default your server allows
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

197) access to many popular services, but we restrict some (such as port 25)
198) due to abuse potential. You might want an exit policy that is
199) less restrictive or more restrictive; edit your torrc appropriately.
200) Read the FAQ entry on <a
201) href="<page faq-abuse>#TypicalAbuses">issues you might
202) encounter if you use the default exit policy</a>.
203) If you choose a particularly open exit policy, you should make
204) sure your ISP is ok with that choice.
205) </p>
206) 
207) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

208) 10. Decide about rate limiting. Cable modem, DSL, and other users
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

209) who have asymmetric bandwidth (e.g. more down than up) should
210) rate limit to their slower bandwidth, to avoid congestion. See the <a
211) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#LimitBandwidth">rate
212) limiting FAQ entry</a> for details.
213) </p>
214) 
215) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

216) 11. Back up your Tor server's private key (stored in "keys/secret_id_key"
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

217) in your DataDirectory). This is your server's "identity," and
218) you need to keep it safe so nobody can read the traffic that goes
219) through your server. This is the critical file to keep if you need to <a
220) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#UpgradeServer">move
221) or restore your Tor server</a> if something goes wrong.
222) </p>
223) 
224) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

225) 12. 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

226) your hostname to 'anonymous' or 'proxy' or 'tor-proxy', so when other
227) people see the address in their web logs, they will more quickly
228) understand what's going on.
229) </p>
230) 
231) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

233) changing your ORPort to 443 and your DirPort to 80. Many Tor
234) users are stuck behind firewalls that only let them browse the
235) web, and this change will let them reach your Tor server. Win32
236) servers can simply change their ORPort and DirPort directly
237) in their torrc and restart Tor. OS X or Unix servers can't bind
238) directly to these ports (since they don't run as root), so they will
239) need to set up some sort of <a
240) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorFAQ#ServerForFirewalledClients">
241) port forwarding</a> so connections can reach their Tor server. If you are
242) using ports 80 and 443 already but still want to help out, other useful
243) ports are 22, 110, and 143.
244) </p>
245) 
246) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

247) 14. 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

248) &mdash; such as a public webserver &mdash; make sure that connections to the
249) webserver are allowed from the local host too. You need to allow these
250) connections because Tor clients will detect that your Tor server is the <a
251) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#ExitEavesdroppers">safest
252) way to reach that webserver</a>, and always build a circuit that ends
253) at your server. If you don't want to allow the connections, you must
254) explicitly reject them in your exit policy.
255) </p>
256) 
257) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

258) 15. (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

259) installed the OS X package or the deb or the rpm, this is already
260) done. Otherwise, you can do it by hand. (The Tor server doesn't need to
261) be run as root, so it's good practice to not run it as root. Running
262) as a 'tor' user avoids issues with identd and other services that
263) detect user name. If you're the paranoid sort, feel free to <a
264) href="http://wiki.noreply.org/wiki/TheOnionRouter/TorInChroot">put Tor
265) into a chroot jail</a>.)
266) </p>
267) 
268) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

270) of open file descriptors per process to 1024 (or even less). If you
271) plan to be running a fast exit node, this is probably not enough. On
272) Linux, you should add a line like "toruser hard nofile 8192" to your
273) /etc/security/limits.conf file (where toruser is the user that runs the
274) Tor process), and then restart Tor if it's installed as a package (or log
275) out and log back in if you run it yourself). If that doesn't work, see <a
276) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#FileDescriptors">this
277) FAQ entry</a> for other suggested ways to run "ulimit -n 8192" before
278) you launch Tor.
279) </p>
280) 
281) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

282) 17. 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

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

Roger Dingledine authored 18 years ago

287) <p>
288) When you change your Tor configuration, <a
289) href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#Restarting">in
290) most cases you can reload your configuration without restarting Tor</a>,
291) and remember to verify that your server still works correctly after
292) the change.
293) </p>
Roger Dingledine and move them to cvs/websit...

Roger Dingledine authored 18 years ago

294) 
295) <hr />
296) 
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

297) <a id="register"></a>
298) <h2><a class="anchor" href="#register">Step Four: Register your nickname</a></h2>
299) <br />
300) 
301) <p>
302) Let it run a few days to make sure it's actually working and that you're
303) happy with its level of resource use. Then you should register your server.
304) This reserves your nickname so nobody else can take it, and lets us
305) contact you if you need to upgrade or something goes wrong.
306) </p>
307) 
308) <p>
309) Send mail to <a
310) href="mailto:tor-ops@freehaven.net">tor-ops@freehaven.net</a> with a
311) subject of '[New Server] &lt;your server's nickname&gt;' and
312) include the following information in the message:
313) </p>
314) <ul>
315) <li>Your server's nickname</li>
316) <li>The fingerprint for your server's key (the contents of the
317) "fingerprint" file in your DataDirectory &mdash; on Windows, look in
318) \<i>username</i>\Application&nbsp;Data\tor\ or \Application&nbsp;Data\tor\;
319) on OS X, look in /Library/Tor/var/lib/tor/; and on Linux/BSD/Unix,
320) look in /var/lib/tor or ~/.tor)
321) </li>
322) <li>Who you are, so we know whom to contact if a problem arises</li>
323) <li>What kind of connectivity the new server will have</li>
324) </ul>
325) 
326) <hr />
327) 
Roger Dingledine add a step to tor-doc-serve...

Roger Dingledine authored 18 years ago

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