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