a57538533710e15b89324c056208a9f8f542166c
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 first cut of the new, shiny...

Andrew Lewman authored 13 years ago

22)     <p>If you have Tor installed, you can see hidden services
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

23)     in action by visiting one of our official hidden services:
24)     <ul>
25)     <li><a href="http://idnxcnkne4qt76tg.onion/">The Tor Project Website</a></li>
26)     <li><a href="http://j6im4v42ur6dpic3.onion/">The Tor Package Archive</a></li>
27)     <li><a href="http://p3igkncehackjtib.onion/">The Tor Media Archive</a></li>
28)     </ul>
29) 
30)     Others run reliable hidden services, such as <a
31)     href="http://3g2upl4pq6kufc4m.onion/">The Duck Duck
32)     Go</a> search engine and someone hosting a <a
33)     href="http://duskgytldkxiuqc6.onion/">sample site</a>.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

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

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Sebastian Hahn authored 13 years ago

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

Andrew Lewman authored 13 years ago

44)     <a id="zero"></a>
45)     <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

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

48)     <p>Before you start, you need to make sure:</p>
49)     <ol>
50)     <li>Tor is up and running,</li>
51)     <li>You actually set it up correctly.</li>
52)     </ol>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

54)     <p>Windows users should follow the <a
55)     href="<page docs/tor-doc-windows>">Windows
56)     howto</a>, OS X users should follow the <a
57)     href="<page docs/tor-doc-osx>">OS
58)     X howto</a>, and Linux/BSD/Unix users should follow the <a
59)     href="<page docs/tor-doc-unix>">Unix howto</a>.
60)     </p>
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

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

Sebastian Hahn authored 13 years ago

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

Andrew Lewman authored 13 years ago

63)     <a id="one"></a>
64)     <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

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

Andrew Lewman authored 12 years ago

66) 
Andrew Lewman update hidden service examp...

Andrew Lewman authored 12 years ago

67)     <p>
68)     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

69)     server can be complex. We're not going to cover how to setup a web
70)     server here. If you get stuck or want to do more, find a friend who
71)     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

72)     your hidden service, since even if you already have one installed,
73)     you may be using it (or want to use it later) for an actual website.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

79)     href="http://localhost:8080/">http://localhost:8080/</a>, where
80)     8080 is the webserver port you chose during setup (you can choose any
81)     port, 8080 is just an example). Then try putting a file in the main
82)     html directory, and make sure it shows up when you access the site.
83)     The reason we bind the web server only to localhost is to make sure
84)     it isn't publically accessible. If people could get to it directly,
85)     they could confirm that your computer is the one offering the
86)     hidden service.
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Sebastian Hahn authored 13 years ago

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

Andrew Lewman authored 13 years ago

90)     <a id="two"></a>
91)     <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

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Sebastian Hahn authored 12 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

141) 
142)     <p>Now save the torrc and restart your tor.</p>
143) 
Andrew Lewman first cut of the new, shiny...

Andrew Lewman authored 13 years ago

144)     <p>If Tor starts up again, great. Otherwise, something is wrong. First look at
145)     your logfiles for hints. It will print some warnings or error messages. That
146)     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

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

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

152)     <p>When Tor starts, it will automatically create the <var>HiddenServiceDir</var>
153)     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

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

169)     <p>If Tor runs as a different user than you, for example on
170)     OS X, Debian, or Red Hat, then you may need to become root to be able
171)     to view these files.</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>Now that you've restarted Tor, it is busy picking introduction points
174)     in the Tor network, and generating a <em>hidden service
175)     descriptor</em>. This is a signed list of introduction points along with
176)     the service's full public key. It anonymously publishes this descriptor
177)     to the directory servers, and other people anonymously fetch it from the
178)     directory servers when they're trying to access your service.
179)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Sebastian Hahn authored 13 years ago

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

Andrew Lewman authored 13 years ago

188)     <a id="three"></a>
189)     <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

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

192)     <p>If you plan to keep your service available for a long time, you might
193)     want to make a backup copy of the <var>private_key</var> file somewhere.
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)     <p>We avoided recommending Apache above, a) because many people might
197)     already be running it for a public web server on their computer, and b)
198)     because it's big
199)     and has lots of places where it might reveal your IP address or other
200)     identifying information, for example in 404 pages. For people who need
201)     more functionality, though, Apache may be the right answer. Can
202)     somebody make us a checklist of ways to lock down your Apache when you're
203)     using it as a hidden service? Savant probably has these problems too.
204)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

206)     <p>If you want to forward multiple virtual ports for a single hidden
207)     service, just add more <var>HiddenServicePort</var> lines.
208)     If you want to run multiple hidden services from the same Tor
209)     client, just add another <var>HiddenServiceDir</var> line. All the following
210)     <var>HiddenServicePort</var> lines refer to this <var>HiddenServiceDir</var> line, until
211)     you add another <var>HiddenServiceDir</var> line:
212)     </p>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

218)     HiddenServiceDir /usr/local/etc/tor/other_hidden_service/
219)     HiddenServicePort 6667 127.0.0.1:6667
220)     HiddenServicePort 22 127.0.0.1:22
221)     </pre>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 13 years ago

223)     <p>There are some anonymity issues you should keep in mind too:
224)     </p>
225)     <ul>
226)     <li>As mentioned above, be careful of letting your web server reveal
227)     identifying information about you, your computer, or your location.
228)     For example, readers can probably determine whether it's thttpd or
229)     Apache, and learn something about your operating system.</li>
230)     <li>If your computer isn't online all the time, your hidden service
231)     won't be either. This leaks information to an observant adversary.</li>
232)     <!-- increased risks over time -->
233)     </ul>
Andrew Lewman clean up the directions som...

Andrew Lewman authored 12 years ago

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

Sebastian Hahn authored 13 years ago

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

Andrew Lewman authored 12 years ago

236)