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