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