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