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