-updating man page, with contributions from Thomas Zander
[oweals/gnunet.git] / README
1 ======================================================================
2
3 THIS SVN VERSION OF GNUNET IS INCOMPATIBLE TO ALL PREVIOUS RELEASES.
4 WE ARE WORKING ON CHANGING FUNDAMENTAL PARTS OF THE CRYPTOGRAPHIC
5 PARTS OF THE SYSTEM.  
6
7 You need to install libgcrypt from git master (1.6.0beta93 at least)
8 for the code to compile.
9
10 =======================================================================
11
12                        Welcome to GNUnet
13
14
15 What is GNUnet?
16 ===============
17
18 GNUnet is peer-to-peer framework focusing on security.  The first and
19 primary application for GNUnet is anonymous file-sharing.  GNUnet is
20 currently developed by a worldwide group of independent free software
21 developers.  GNUnet is a GNU package (http://www.gnu.org/).
22
23 This is an ALPHA release.  There are known and significant bugs as 
24 well as many missing features in this release.  
25
26 Additional documentation about GNUnet can be found at
27 https://gnunet.org/.
28
29
30 Dependencies:
31 =============
32
33 Please note that for many of its dependencies GNUnet requires very
34 recent versions of the libraries which are often NOT to be found in
35 stable distributions in 2011.  While using older packages may in some
36 cases on some operating systems may seem to work in some limited
37 fashion, we are in many cases aware of serious problems with older
38 packages.  Hence please make sure to use  the versions listed below.
39
40 These are the direct dependencies for running GNUnet:
41
42 - libextractor  >= 0.6.1
43 - libmicrohttpd >= 0.9.30
44 - libgcrypt     >= 1.2
45 - libcurl       >= 7.21.3
46 - libunistring  >= 0.9.2
47 - gnutls        >= 2.12.0
48 - libidn        >= 1.0
49 - openssl       >= 1.0 (binary, used to generate X.509 certificate)
50 - libltdl       >= 2.2 (part of GNU libtool)
51 - sqlite        >= 3.0 (default database)
52 - mysql         >= 5.1 (alternative to sqLite)
53 - postgres      >= 8.3 (alternative to sqLite)
54
55 Recommended autotools for compiling the SVN version are:
56 - autoconf >= 2.59
57 - automake >= 1.11.1
58 - libtool  >= 2.2 
59
60
61 How to install?
62 ===============
63
64 The fastest way is to use a binary package if it is available for your
65 system.  For a more detailed description, read the installation
66 instructions on the webpage at https://gnunet.org/installation.
67
68 Note that some functions of GNUnet require "root" access.  GNUnet will
69 install (tiny) SUID binaries for those functions is you run "make
70 install" as root.  If you do not, GNUnet will still work, but some
71 functionality will not be available (including certain forms of NAT
72 traversal).
73
74 GNUnet requires the GNU MP library (http://www.gnu.org/software/gmp/)
75 and libgcrypt (http://www.gnupg.org/).  You can specify the path to
76 libgcrypt by passing "--with-gcrypt=PATH" to configure.  You will also
77 need either sqlite (http://www.sqlite.org/), MySQL
78 (http://www.mysql.org/) or PostGres (http://www.postgres.org/).
79
80 If you install from source, you need to install GNU libextractor first
81 (download from http://www.gnu.org/software/libextractor/).  We also
82 recommend installing GNU libmicrohttpd (download from
83 http://www.gnu.org/software/libmicrohttpd/).  Then you can start the
84 actual GNUnet compilation and installation process with:
85
86 $ export GNUNET_PREFIX=/usr/local # or other directory of your choice
87 # addgroup gnunetdns
88 # adduser gnunet gnunet
89 # ./configure --prefix=$GNUNET_PREFIX --with-extractor=$LE_PREFIX
90 $ make
91 # make install
92 # sudo -u gnunet gnunet-arm -s
93
94 Note that running the 'configure' and 'make install' steps as
95 root (or with sudo) is required as some parts of the installation
96 require the creation of SUID binaries.  The installation will
97 work if you do not run these steps as root, but some components
98 may not be installed in the perfect place or with the right
99 permissions and thus won't work.
100
101 This will create the users and groups needed for running GNUnet
102 securely and then compile and install GNUnet to $GNUNET_PREFIX/bin/,
103 $GNUNET_PREFIX/lib/ and $GNUNET_PREFIX/share/ and start the system
104 with the default configuration.  It is strongly recommended that you
105 add a user "gnunet" to run "gnunet-arm".  You can then still run the
106 end-user applications as another user.  
107
108 If you create a system user "gnunet", it is recommended that you edit
109 the configuration file slightly so that data can be stored in the
110 system user home directory at "/var/lib/gnunet".  Depending on what
111 the $HOME-directory of your "gnunet" user is, you might need to set
112 the SERVICEHOME option in section "[PATHS]" to "/var/lib/gnunet" to
113 do this.  Depending on your personal preferences, you may also want to
114 use "/etc/gnunet.conf" for the location of the configuration file in
115 this case (instead of ~gnunet/.gnunet/gnunet.conf").  In this case,
116 you need to start GNUnet using "gnunet-arm -s -c /etc/gnunet.conf".
117
118 You can avoid running 'make install' as root if you run configure
119 with the "--with-sudo=yes" option and have extensive sudo rights
120 (can run "chmod +s" and "chown" via 'sudo').  If you run 'make install'
121 as a normal user without sudo rights (or the configure option),
122 certain binaries that require additional priviledges will not be
123 installed properly (and autonomous NAT traversal, WLAN, DNS/GNS and 
124 the VPN will then not work).
125
126 If you run 'configure' and 'make install' as root or use the SUDO
127 option, GNUnet's build system will install "libnss_gns*" libraries to
128 "/lib/" regardless (!) of the $GNUNET_PREFIX you might have specified,
129 as those libraries must be in "/lib/".  If you are packaging GNUnet
130 for binary distribution, this may cause your packaging script to miss
131 those plugins, so you might need to do some additional manual work to
132 include those libraries in your binary package(s).  Similarly, if you
133 want to use the GNUnet naming system and did NOT run GNUnet's 'make
134 install' process with SUDO rights, the libraries will be installed to
135 "$GNUNET_PREFIX/lib" and you will have to move them to "/lib/"
136 manually.
137
138 Finally, if you are compiling the code from subversion, you have to
139 run ". bootstrap" before ./configure.  If you receive an error during
140 the running of ". bootstrap" that looks like "macro `AM_PATH_GTK' not
141 found in library", you may need to run aclocal by hand with the -I
142 option, pointing to your aclocal m4 macros, i.e.
143
144 $ aclocal -I /usr/local/share/aclocal
145
146
147 Configuration
148 =============
149
150 Note that additional, per-user configuration files can be created by
151 each user.  However, this is usually not necessary as there are few
152 per-user options that normal users would want to modify.  The defaults
153 that are shipped with the installation are usually just fine.
154
155 The gnunet-setup tool is particularly useful to generate the master
156 configuration for the peer.  gnunet-setup can be used to configure and
157 test (!) the network settings, choose which applications should be run
158 and configure databases.  Other options you might want to control
159 include system limitations (such as disk space consumption, bandwidth,
160 etc.).  The resulting configuration files are human-readable and can
161 theoretically be created or edited by hand.
162
163 gnunet-setup is a separate download and requires somewhat recent
164 versions of GTK+ and Glade. You can also create the configuration file
165 by hand, but this is not recommended.  For more general information
166 about the GNU build process read the INSTALL file.
167
168 GNUnet uses two types of configuration files, one that specifies the
169 system-wide defaults (typically located in
170 $GNUNET_PREFIX/share/gnunet/config.d/) and a second one that overrides
171 default values with user-specific preferences.  The user-specific
172 configuration file should be located in "~/.gnunet/gnunet.conf" or its
173 location can be specified by giving the "-c" option to the respective
174 GNUnet application.
175
176
177 Usage
178 =====
179
180 First, you must obtain an initial list of GNUnet hosts.  Knowing a
181 single peer is sufficient since after that GNUnet propagates
182 information about other peers.  Note that the default configuration
183 contains URLs from where GNUnet downloads an initial hostlist
184 whenever it is started.  If you want to create an alternative URL for
185 others to use, the file can be generated on any machine running
186 GNUnet by periodically executing
187
188 $ cat $SERVICEHOME/data/hosts/* > the_file
189
190 and offering 'the_file' via your web server.  Alternatively, you can
191 run the build-in web server by adding '-p' to the OPTIONS value
192 in the "hostlist" section of gnunet.conf and opening the respective
193 HTTPPORT to the public.
194
195 If the solution with the hostlist URL is not feasible for your
196 situation, you can also add hosts manually.  Simply copy the hostkeys
197 to "$SERVICEHOME/data/hosts/" (where $SERVICEHOME is the directory
198 specified in the gnunet.conf configuration file).  You can also use
199 "gnunet-peerinfo -g" to GET a URI for a peer and "gnunet-peerinfo -p
200 URI" to add a URI from another peer.  Finally, GNUnet peers that use
201 UDP or WLAN will discover each other automatically (if they are in the
202 vicinity of each other) using broadcasts (IPv4/WLAN) or multicasts
203 (IPv6).
204
205 The local node is started using "gnunet-arm -s".  GNUnet should run
206 24/7 if you want to maximize your anonymity, as this makes partitioning
207 attacks harder.
208
209 Once your peer is running, you should then be able to access GNUnet
210 using the shell:
211
212 $ gnunet-search KEYWORD
213
214 This will display a list of results to the console.  You can abort
215 the command using "CTRL-C".  Then use
216
217 $ gnunet-download -o FILENAME GNUNET_URI
218
219 to retrieve a file.  The GNUNET_URI is printed by gnunet-search
220 together with a description.  To publish files on GNUnet, use the
221 "gnunet-publish" command.
222
223
224 The GTK user interface is shipped separately.  After downloading and
225 installing gnunet-gtk, you can invoke the setup tool and the 
226 file-sharing GUI with:
227
228 $ gnunet-setup
229 $ gnunet-fs-gtk
230
231 For further documentation, see our webpage.
232
233
234 Hacking GNUnet
235 ==============
236
237 Contributions are welcome, please submit bugs to
238 https://gnunet.org/bugs/.  Please make sure to run contrib/report.sh
239 and include the output with your bug reports.  More about how to
240 report bugs can be found in the GNUnet FAQ on the webpage.  Submit
241 patches via E-Mail to gnunet-developers@gnu.org.
242
243 In order to run the unit tests with "make check", you need to
244 set an environment variable ("GNUNET_PREFIX") to the directory
245 where GNUnet is installed (usually, GNUnet will use OS specific
246 tricks in order to try to figure out the PREFIX, but since the
247 testcase binaries are not installed, that trick does not work
248 for them).  Also, before running any testcases, you must
249 complete the installation first.  Quick summary:
250
251 $ ./configure --prefix=$SOMEWHERE
252 $ make
253 $ make install
254 $ export GNUNET_PREFIX=$SOMEWHERE
255 $ make check
256
257 Some of the testcases require python >= 2.6 and pexpect to be
258 installed.  If any testcases fail to pass on your system, run 
259 "contrib/report.sh" and report the output together with 
260 information about the failing testcase to the Mantis bugtracking 
261 system at https://gnunet.org/bugs/.
262
263
264 Running HTTP on port 80 and HTTPS on port 443
265 =============================================
266
267 In order to hide GNUnet's HTTP/HTTPS traffic perfectly, you might
268 consider running GNUnet's HTTP/HTTPS transport on port 80/443.
269 However, we do not recommend running GNUnet as root.  Instead, forward
270 port 80 to say 1080 with this command (as root, in your startup
271 scripts):
272
273 # iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 1080
274
275 or for HTTPS
276
277 # iptables -t nat -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 4433
278
279 Then set in the HTTP section of gnunet.conf the "ADVERTISED_PORT" to
280 "80" and "PORT" to 1080 and similarly in the HTTPS section the
281 "ADVERTISED_PORT" to "443" and "PORT" to 4433.
282
283 You can do the same trick for the TCP and UDP transports if you want
284 to map them to a priviledged port (from the point of view of the
285 network).  However, we are not aware of this providing any advantages
286 at this point.
287
288 If you are already running an HTTP or HTTPS server on port 80 (or 443),
289 you may be able to configure it as a "ReverseProxy".  Here, you tell
290 GNUnet that the externally visible URI is some sub-page on your website,
291 and GNUnet can then tunnel its traffic via your existing HTTP server.
292 This is particularly powerful if your existing server uses HTTPS, as
293 it makes it harder for an adversary to distinguish normal traffic to
294 your server from GNUnet traffic.  Finally, even if you just use HTTP,
295 you might benefit (!) from ISP's traffic shaping as opposed to being
296 throttled by ISPs that dislike P2P.  Details for configuring the
297 reverse proxy are documented on our website.
298
299
300 Stay tuned
301 ==========
302
303 * https://gnunet.org/
304 * https://gnunet.org/bugs/
305 * https://gnunet.org/svn/
306 * http://www.gnu.org/software/gnunet/
307 * http://mail.gnu.org/mailman/listinfo/gnunet-developers
308 * http://mail.gnu.org/mailman/listinfo/help-gnunet
309 * http://mail.gnu.org/mailman/listinfo/info-gnunet
310 * http://mail.gnu.org/mailman/listinfo/gnunet-svn