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