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