c905e6cb04162dd26740162d8fe2610aa6de7722
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

1) ## translation metadata
Roger Dingledine looks like we never set the...

Roger Dingledine authored 13 years ago

2) # Revision: $Revision$
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

3) # Translation-Priority: 3-low
4) 
5) #include "head.wmi" TITLE="Tor Project: Hidden Service Configuration Instructions" CHARSET="UTF-8"
6) <div id="content" class="clearfix">
7)   <div id="breadcrumbs">
Andrew Lewman change all of the breadcrum...

Andrew Lewman authored 13 years ago

8)     <a href="<page index>">Home &raquo; </a>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

9)     <a href="<page docs/documentation>">Documentation &raquo; </a>
10)     <a href="<page docs/tor-hidden-service>">Tor Hidden Service</a>
11)   </div>
12)   <div id="maincol">
Andrew Lewman change all of the breadcrum...

Andrew Lewman authored 13 years ago

13)     <h1>Configuring Hidden Services for <a href="<page index>">Tor</a></h1>
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

14)     <hr>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

15) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

16)     <p>Tor allows clients and relays to offer hidden services. That is,
17)     you can offer a web server, SSH server, etc., without revealing your
18)     IP address to its users. In fact, because you don't use any public address,
19)     you can run a hidden service from behind your firewall.
20)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

21) 
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

22)     <p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

23)     This page describes the steps for setting up your own hidden service
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

24)     website. For the technical details of how the hidden service protocol
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

25)     works, see our <a href="<page docs/hidden-services>">hidden service
26)     protocol</a> page.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

27)     </p>
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

28) 
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

29)     <hr>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

30)     <a id="zero"></a>
31)     <h2><a class="anchor" href="#zero">Step Zero: Get Tor working</a></h2>
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

32)     <br>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

33) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

34)     <p>Before you start, you need to make sure:</p>
35)     <ol>
36)     <li>Tor is up and running,</li>
37)     <li>You actually set it up correctly.</li>
38)     </ol>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

39) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

40)     <p>Windows users should follow the <a
41)     href="<page docs/tor-doc-windows>">Windows
42)     howto</a>, OS X users should follow the <a
43)     href="<page docs/tor-doc-osx>">OS
44)     X howto</a>, and Linux/BSD/Unix users should follow the <a
45)     href="<page docs/tor-doc-unix>">Unix howto</a>.
46)     </p>
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

47) 
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

48)     <hr>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

49)     <a id="one"></a>
50)     <h2><a class="anchor" href="#one">Step One: Install a web server locally</a></h2>
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

51)     <br>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

52) 
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

53)     <p>
54)     First, you need to set up a web server locally. Setting up a web
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

55)     server can be complex. We're not going to cover how to setup a web
56)     server here. If you get stuck or want to do more, find a friend who
57)     can help you. We recommend you install a new separate web server for
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

58)     your hidden service, since even if you already have one installed,
Moritz Bartl HS websites are also actual...

Moritz Bartl authored 10 years ago

59)     you may be using it (or want to use it later) for a normal website.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

60)     </p>
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

61) 
Roger Dingledine finish the process of not r...

Roger Dingledine authored 12 years ago

62)     <p>
63)     You need to configure your web server so it doesn't give away any
64)     information about you, your computer, or your location. Be sure to
65)     bind the web server only to localhost (if people could get to it
66)     directly, they could confirm that your computer is the one offering
67)     the hidden service). Be sure that its error messages don't list
68)     your hostname or other hints. Consider putting the web server in a
69)     sandbox or VM to limit the damage from code vulnerabilities.
70)     </p>
71) 
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

72)     <p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

73)     Once your web server is set up, make
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

74)     sure it works: open your browser and go to <a
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

75)     href="http://localhost:8080/">http://localhost:8080/</a>, where
76)     8080 is the webserver port you chose during setup (you can choose any
77)     port, 8080 is just an example). Then try putting a file in the main
78)     html directory, and make sure it shows up when you access the site.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

79)     </p>
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

80) 
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

81)     <hr>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

82)     <a id="two"></a>
83)     <h2><a class="anchor" href="#two">Step Two: Configure your hidden service</a></h2>
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

84)     <br>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

85) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

86)     <p>Next, you need to configure your hidden service to point to your
87)     local web server.
88)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

89) 
90)     <p>First, open your torrc file in your favorite text editor. (See
91)     <a href="<page docs/faq>#torrc">the torrc FAQ entry</a> to learn
92)     what this means.) Go to the middle section and look for the line</p>
93) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

94)     <pre>
95)     \############### This section is just for location-hidden services ###
96)     </pre>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

97) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

98)     <p>
99)     This section of the file consists of groups of lines, each representing
100)     one hidden service. Right now they are all commented out (the lines
101)     start with #), so hidden services are disabled. Each group of lines
102)     consists of one <var>HiddenServiceDir</var> line, and one or more
103)     <var>HiddenServicePort</var> lines:</p>
104)     <ul>
105)     <li><var>HiddenServiceDir</var> is a directory where Tor will store information
106)     about that hidden service.  In particular, Tor will create a file here named
107)     <var>hostname</var> which will tell you the onion URL.  You don't need to
108)     add any files to this directory. Make sure this is not the same directory
109)     as the hidserv directory you created when setting up thttpd, as your
110)     HiddenServiceDir contains secret information!</li>
111)     <li><var>HiddenServicePort</var> lets you specify a virtual port (that is, what
112)     port people accessing the hidden service will think they're using) and an
113)     IP address and port for redirecting connections to this virtual port.</li>
114)     </ul>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

115) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

116)     <p>Add the following lines to your torrc:
117)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

118) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

119)     <pre>
120)     HiddenServiceDir /Library/Tor/var/lib/tor/hidden_service/
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

121)     HiddenServicePort 80 127.0.0.1:8080
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

122)     </pre>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

123) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

124)     <p>You're going to want to change the <var>HiddenServiceDir</var> line, so it points
125)     to an actual directory that is readable/writeable by the user that will
126)     be running Tor. The above line should work if you're using the OS X Tor
127)     package. On Unix, try "/home/username/hidden_service/" and fill in your own
128)     username in place of "username". On Windows you might pick:</p>
129)     <pre>
Sebastian Hahn Remove backslash from Windo...

Sebastian Hahn authored 12 years ago

130)     HiddenServiceDir C:\Users\username\Documents\tor\hidden_service
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

131)     HiddenServicePort 80 127.0.0.1:8080
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

132)     </pre>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

133) 
134)     <p>Now save the torrc and restart your tor.</p>
135) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

136)     <p>If Tor starts up again, great. Otherwise, something is wrong. First look at
137)     your logfiles for hints. It will print some warnings or error messages. That
138)     should give you an idea what went wrong. Typically there are typos in the torrc
Roger Dingledine revise #Logs entry. fix sev...

Roger Dingledine authored 13 years ago

139)     or wrong directory permissions (See <a href="<page docs/faq>#Logs">the
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

140)     logging FAQ entry</a> if you don't know how to enable or find your
141)     log file.)
142)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

143) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

144)     <p>When Tor starts, it will automatically create the <var>HiddenServiceDir</var>
145)     that you specified (if necessary), and it will create two files there.</p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

146) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

147)     <dl>
148)     <dt><var>private_key</var></dt>
149)     <dd>First, Tor will generate a new public/private keypair for your hidden
150)     service. It is written into a file called "private_key". Don't share this key
151)     with others -- if you do they will be able to impersonate your hidden
152)     service.</dd>
153)     <dt><var>hostname</var></dt>
154)     <dd>The other file Tor will create is called "hostname". This contains
155)     a short summary of your public key -- it will look something like
156)     <tt>duskgytldkxiuqc6.onion</tt>. This is the public name for your service,
157)     and you can tell it to people, publish it on websites, put it on business
158)     cards, etc.</dd>
159)     </dl>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

160) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

161)     <p>If Tor runs as a different user than you, for example on
162)     OS X, Debian, or Red Hat, then you may need to become root to be able
163)     to view these files.</p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

164) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

165)     <p>Now that you've restarted Tor, it is busy picking introduction points
166)     in the Tor network, and generating a <em>hidden service
167)     descriptor</em>. This is a signed list of introduction points along with
168)     the service's full public key. It anonymously publishes this descriptor
169)     to the directory servers, and other people anonymously fetch it from the
170)     directory servers when they're trying to access your service.
171)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

172) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

173)     <p>Try it now: paste the contents of the hostname file into your web
174)     browser. If it works, you'll get the html page you set up in step one.
175)     If it doesn't work, look in your logs for some hints, and keep playing
176)     with it until it works.
177)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

178) 
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

179)     <hr>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

180)     <a id="three"></a>
181)     <h2><a class="anchor" href="#three">Step Three: More advanced tips</a></h2>
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

182)     <br>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

183) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

184)     <p>If you plan to keep your service available for a long time, you might
185)     want to make a backup copy of the <var>private_key</var> file somewhere.
186)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

187) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

188)     <p>If you want to forward multiple virtual ports for a single hidden
189)     service, just add more <var>HiddenServicePort</var> lines.
190)     If you want to run multiple hidden services from the same Tor
191)     client, just add another <var>HiddenServiceDir</var> line. All the following
192)     <var>HiddenServicePort</var> lines refer to this <var>HiddenServiceDir</var> line, until
193)     you add another <var>HiddenServiceDir</var> line:
194)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

195) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

196)     <pre>
197)     HiddenServiceDir /usr/local/etc/tor/hidden_service/
198)     HiddenServicePort 80 127.0.0.1:8080
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

199) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

200)     HiddenServiceDir /usr/local/etc/tor/other_hidden_service/
201)     HiddenServicePort 6667 127.0.0.1:6667
202)     HiddenServicePort 22 127.0.0.1:22
203)     </pre>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

204) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

205)     <p>There are some anonymity issues you should keep in mind too:
206)     </p>
207)     <ul>
208)     <li>As mentioned above, be careful of letting your web server reveal
209)     identifying information about you, your computer, or your location.
210)     For example, readers can probably determine whether it's thttpd or
211)     Apache, and learn something about your operating system.</li>
212)     <li>If your computer isn't online all the time, your hidden service
213)     won't be either. This leaks information to an observant adversary.</li>
Moritz Bartl recommend hosting HS on tor...

Moritz Bartl authored 11 years ago

214)     <li>It is generally a better idea to host hidden services on a Tor client 
215)     rather than a Tor relay, since relay uptime and other properties are
216)     publicly visible.</li>
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

217)     <!-- increased risks over time -->
218)     </ul>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

219) 
Sebastian Hahn We decided to go with HTML...

Sebastian Hahn authored 13 years ago

220)     <hr>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

221)