Handle HTTP redirections automatically.
[doldaconnect.git] / doc / INSTALL
CommitLineData
89ab1068 1 Dolda Connect - Installation
2
3Three main steps are required in order to get Dolda Connect up and
4running:
5
61. Compile and install the sources
72. Customize the configuration file
83. Start the daemon
9
10Each of these steps are detailed below. However, it is first necessary
11to understand that Dolda Connect can be run in either single-user mode
12or multi-user mode, and that the chosen mode fundamentally changes how
13each step should be carried out. The differences between these modes
14will be described right away. If you have read them and are still in
15doubt which to choose, go with the single-user mode.
16
17In multi-user mode, the daemon runs as root and can serve multiple
18users simultaneously. The primary advantage is that if you know that
19several people will be using Dolda Connect, there will be no need to
20run several instances for each of them, and that they will all benefit
21from being connected to the same hubs. The primary disadvantages are
22that there may be unknown security issues with running the server as
23root, and that, since the hubs are shared, searches will have to be
24arbitrated by the server, which may be annoying for large values of
25simultaneous searches. Indirect advantages are mostly that it is
26easier to start the server at boot time when running as root.
27
28In single-user mode, the daemon runs as the user who will be using
29it. The primary advantages is that no root privileges are required for
30running the server in single-user mode -- including for tasks such as
31editing the configuration file -- and that any unknown security issues
32will at least be restricted to the user running the server. When only
33one user is using Dolda Connect, there are no known significant
34disadvantages to running in single-user mode.
35
36 Compiling and installing the sources
37
38Compiling the sources involve the ordinary GNU autotools steps:
39./configure, make, and make install, where the last step normally
40needs to be carried out as root (unless you are installing in your own
41home directory). You are assumed to be familiar with these steps.
42
43However, there are special notes that deserve attention regarding the
44configure script. Some optional features can be enabled through the
45use of command-line parameters:
46
47 * --with-guile enables the Guile extension library, necessary for any
d9476001
FT
48 clients written in Scheme (such as the automatic downloader and the
49 hub manager).
89ab1068 50 * --enable-gnomeapplet selects the GNOME panel applet for
51 compilation.
52 * --enable-gaimplugin selects the Gaim chat plugin for compilation.
28f62c9c
FT
53 * --enable-pidginplugin selects the Pidgin chat plugin for
54 compilation.
89ab1068 55
56Gtk2 and Kerberos V support are detected automatically by the
57configure script. Make sure to check the output at the end so that all
58features that you want are selected. In particular, Gtk2 support
59requires that the Gtk2 headers can be found, and many Linux
60distributions ship without these. The author cannot possibly give
61support for all Linux distributions, so make sure to check this
62thoroughly. Almost all Linux distributions support installing these as
63optional packages through its package manager.
64
9edc5f70 65To use PAM authentication (see below), you also need to install a PAM
66configuration file. On most Linux distributions, the file
67pam.d-doldacond in the contrib directory can be installed as
68/etc/pam.d/doldacond and work perfectly.
69
28f62c9c
FT
70The GNOME applet and GAIM/Pidgin plugin are marked as experimental not
71so much because there is anything wrong with them, but because it is
ce515da4 72tricky to install them. Please see the seperate `INSTALL.applet' and
73`INSTALL.gaim' files for instructions.
74
89ab1068 75 Customizing the configuration file
76
77When installing Dolda Connect, the configuration file is normally
78named /usr/local/etc/doldacond.conf, but it depends on the
79installation prefixes that are chosen. If Dolda Connect will be
80running in multi-user mode, it should remain there, but if it will be
81running in single-user mode, it is recommended that you make a copy of
d9e938a7 82it named ~/.doldacond.conf (if ~/.doldacond.conf does not exist, the
83server will still read the system-wide file, but it will be easier to
84edit a local copy, as you need not be root to do so).
89ab1068 85
86Edit the configuration file. If you do no other changes, make sure to
39d66815 87at least change "cli.defnick" and "share". Most directives are
d9e938a7 88explained in comments in the shipped file and need no further
89explanation here. However, there are a few points to note.
89ab1068 90
fffcf1c6 91If the computer running the daemon is connected directly to the
92Internet, no network configuration will be necessary. However, if it
93is behind a NAT router or similar, some configuration has to be done
94since Direct Connect requires clients to be able to connect to each
95other. There are currently two options available:
96
97 * Running in passive mode. No other clients will attempt to connect
98 to a client in passive mode, which makes Direct Connect work, but
99 with rather severe limitations. Obviously, no two passive mode
100 clients can connect to one another. Also, search results are
101 proxied through the hub, which drains a hub's bandwidth horribly,
102 and is therefore frowned upon by hub owners. Indeed, many hubs do
103 not even allow clients in passive mode. If you even so wish to use
104 passive mode, set the "net.mode" setting to "1" in the
105 configuration file.
106 * Tunnel a port through the NAT router and set up Dolda Connect to
107 listen specifically to that port. The port to use is set in the
108 configuration file using the "dc.udpport" and "dc.tcpport"
109 settings (evidently, both UDP and TCP need to be tunneled through
c1e49dad 110 the NAT router). The daemon also needs to be told of the public
111 IPv4 address of the NAT router, by way of the "net.visibleipv4"
112 setting.
fffcf1c6 113
d9e938a7 114There is a large number of configuration directives not covered in
115this file, nor in the default configuration file. Please see the
116doldacond.conf(5) manual page for information on the rest.
117
118 Running clients over the network
119
120For convenience of setup, the default configuration file disables
121running clients over the network. Using the default configuration
122file, the daemon will only enable clients to connect over a local Unix
123socket. They will use Unix socket credentials passing for
124authentication, for maximum security. It is also likely that many will
125want to keep it that way. However, for those who want to be able to
126run clients over the network, just follow the instructions in this
127section to enable UIs over TCP.
128
129First, you need to choose how you will authenticate to the server. If
130you are an administrator of a Kerberos-enabled network using the MIT
131Kerberos libraries, you can use Kerberos V authentication and get
132secure single sign-on, which gives the best of all worlds, but for
133normal users, there are two choices:
134
135 * PAM based password authentication -- The clients will ask for your
136 password every time they connect to the server. This option can be
137 somewhat cumbersome, but should be perfectly secure. Note, however,
138 that the password is transmitted to the server unencrypted.
139 * Password-less authentication -- The server will simply trust the
140 clients not to lie. This option is completely insecure, but may be
141 a better option where all users are trusted and/or Kerberos is not
142 available.
143
39d66815
FT
144PAM authentication is always enabled as long as Dolda Connect was
145compiled with PAM support. To enable password-less authentication,
146set the "auth.authless" setting in the configuration file to "1". If
d9476001 147your network is not completely trusted (especially if the host running
39d66815
FT
148doldacond is globally accessible via the Internet), you really should
149make sure to set up some firewalling rules.
d9e938a7 150
151Note that doldacond does *not* support tcp-wrappers, but it does
152support very simple internal firewalling in the form of the
39d66815
FT
153"ui.onlylocal" option. When "ui.onlylocal" is set to true, the daemon
154will only accept UI connections over a loopback interface. That
d9e938a7 155includes 127.0.0.1, ::ffff:127.0.0.1, ::1 and Unix sockets.
156
89ab1068 157 Starting the daemon
158
159To start the daemon, just run "doldacond" -- as root if you are
160running in multi-user mode, and as your ordinary user if you are
d9e938a7 161running in single-user mode. See the doldacond(8) manual page for more
162detailed information about command-line switches and related
163information.
164
165If you are using the daemon in multi-user mode on Gentoo, you might
166find contrib/gentoo-init.d-doldacond, an init script for Gentoo,
167useful.
89ab1068 168
169The first time you start the daemon, it will need to calculate the TTH
170hashes on all the files you share (as required by the Direct Connect
171protocol). The TTH calculation process runs with a higher nice value
172(+10) than the server itself, and should therefore not conflict
173terribly with the rest of the system CPU-wise, so that you should be
174able to work normally meanwhile. However, if you have a fast enough
175CPU, the I/O bandwidth required to read all files may slow down your
176system (especially when sharing files from a network mount). The
177server is usable while calculating TTH hashes, but some hubs may not
178allow you in if not all TTH hashes are calculated.
179
180
181
d9476001 182This document was last updated 2008-02-14, reflecting release 1.1 of
89ab1068 183Dolda Connect.