c9a526b5a220a4b12cc2648d91af8955a69be158
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 />
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 and move them to cvs/websit...

Roger Dingledine authored 18 years ago

152) <a href="<page tor-manual-cvs>">here</a>.
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
162) the outside. This may take up to 20 minutes. Look for a log entry like
163) <tt>Self-testing indicates your ORPort is reachable from the outside. Excellent.</tt>
164) If you don't see this message, it means that your server is not reachable
165) from the outside &mdash; you should re-check your firewalls, check that it's
166) testing the IP and port you think it should be testing, etc.
167) </p>
168) 
169) <p>When it decides that it's reachable, it will upload a "server
170) descriptor" to the directories. This will let clients know
171) 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

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

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

179) <a id="after"></a>
180) <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

181) <br />
182) 
183) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

185) </p>
186) 
187) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

188) 8. Read
189) <a href="http://wiki.noreply.org/noreply/TheOnionRouter/OperationalSecurity">this document</a>
190) 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

191) </p>
192) 
193) <p>
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

194) 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

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

Roger Dingledine authored 18 years ago

206) 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

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

Roger Dingledine authored 18 years ago

214) 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

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

Roger Dingledine authored 18 years ago

223) 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

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

Roger Dingledine authored 18 years ago

230) 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

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

Roger Dingledine authored 18 years ago

245) 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

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

Roger Dingledine authored 18 years ago

256) 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

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

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

280) 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

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

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

292) 
293) <hr />
294) 
Roger Dingledine ask people to register thei...

Roger Dingledine authored 18 years ago

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

Roger Dingledine authored 18 years ago

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