]> arthur.barton.de Git - ngircd-alex.git/blob - INSTALL.md
Correctly show the configuration file used
[ngircd-alex.git] / INSTALL.md
1 # [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
2
3 This document explains how to install, the lightweight Internet Relay Chat
4 (IRC) server.
5
6 The first section lists noteworthy changes to earlier releases; you definitely
7 should read this when upgrading your setup! But you can skip over this section
8 when you do a fresh installation.
9
10 All the subsequent sections describe the steps required to build and install
11 ngIRCd from sources. The information given here is not relevant when you are
12 using packages provided by your operating system vendor or third-party
13 repositories.
14
15 Please see the file `doc/QuickStart.md` in the `doc/` directory and
16 [online](https://ngircd.barton.de/doc/QuickStart.md) on the homepage for
17 information about configuring ngIRCd, including some configuration examples.
18
19 ## Upgrade Information
20
21 Differences to version 25
22
23 - **Attention**:
24   All already deprecated legacy options (besides the newly deprecated *Key* and
25   *MaxUsers* settings, see below) were removed in ngIRCd 26, so make sure to
26   update your configuration before upgrading, if you haven't done so already
27   (you got a warning on daemon startup when using deprecated options): you can
28   check your configuration using `ngircd --configtest` -- which is a good idea
29   anyway ;-)
30
31 - Setting modes for predefined channels in *[Channel]* sections has been
32   enhanced: now you can set *all* modes, like in IRC "MODE" commands, and have
33   this setting multiple times per *[Channel]* block. Modifying lists (ban list,
34   invite list, exception list) is supported, too.
35
36   Both the *Key* and *MaxUsers* settings are now deprecated and should be
37   replaced by `Modes = +l <limit>` and `Modes = +k <key>` respectively.
38
39 Differences to version 22.x
40
41 - The *NoticeAuth* `ngircd.conf` configuration variable has been renamed to
42   *NoticeBeforeRegistration*. The old *NoticeAuth* variable still works but
43   is deprecated now.
44
45 - The default value of the SSL *CipherList* variable has been changed to
46   "HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
47   (GnuTLS) to disable the old SSLv3 protocol by default.
48
49   To enable connections of clients still requiring the weak SSLv3 protocol,
50   the *CipherList* must be set to its old value (not recommended!), which
51   was "HIGH:!aNULL:@STRENGTH" (OpenSSL) and "SECURE128" (GnuTLS), see below.
52
53 Differences to version 20.x
54
55 - Starting with ngIRCd 21, the ciphers used by SSL are configurable and
56   default to "HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
57   Previous version were using the OpenSSL or GnuTLS defaults, "DEFAULT"
58   and "NORMAL" respectively.
59
60 - When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
61   the new mask will be KILL'ed. This was not the case with earlier versions
62   that only added the mask but didn't kill already connected users.
63
64 - The *PredefChannelsOnly* configuration variable has been superseded by the
65   new *AllowedChannelTypes* variable. It is still supported and translated to
66   the appropriate *AllowedChannelTypes* setting but is deprecated now.
67
68 Differences to version 19.x
69
70 - Starting with ngIRCd 20, users can "cloak" their hostname only when the
71   configuration variable *CloakHostModeX* (introduced in 19.2) is set.
72   Otherwise, only IRC operators, other servers, and services are allowed to
73   set mode +x. This prevents regular users from changing their hostmask to
74   the name of the IRC server itself, which confused quite a few people ;-)
75
76 Differences to version 17.x
77
78 - Support for ZeroConf/Bonjour/Rendezvous service registration has been
79   removed. The configuration option *NoZeroconf* is no longer available.
80
81 - The structure of `ngircd.conf` has been cleaned up and three new configuration
82   sections have been introduced: *[Limits]*, *[Options]*, and *[SSL]*.
83
84   Lots of configuration variables stored in the *[Global]* section are now
85   deprecated there and should be stored in one of these new sections (but
86   still work in *[Global]*):
87
88   - *AllowRemoteOper*    -> [Options]
89   - *ChrootDir*          -> [Options]
90   - *ConnectIPv4*        -> [Options]
91   - *ConnectIPv6*        -> [Options]
92   - *ConnectRetry*       -> [Limits]
93   - *MaxConnections*     -> [Limits]
94   - *MaxConnectionsIP*   -> [Limits]
95   - *MaxJoins*           -> [Limits]
96   - *MaxNickLength*      -> [Limits]
97   - *NoDNS*              -> [Options], and renamed to *DNS*
98   - *NoIdent*            -> [Options], and renamed to *Ident*
99   - *NoPAM*              -> [Options], and renamed to *PAM*
100   - *OperCanUseMode*     -> [Options]
101   - *OperServerMode*     -> [Options]
102   - *PingTimeout*        -> [Limits]
103   - *PongTimeout*        -> [Limits]
104   - *PredefChannelsOnly* -> [Options]
105   - *SSLCertFile*        -> [SSL], and renamed to *CertFile*
106   - *SSLDHFile*          -> [SSL], and renamed to *DHFile*
107   - *SSLKeyFile*         -> [SSL], and renamed to *KeyFile*
108   - *SSLKeyFilePassword* -> [SSL], and renamed to *KeyFilePassword*
109   - *SSLPorts*           -> [SSL], and renamed to *Ports*
110   - *SyslogFacility*     -> [Options]
111   - *WebircPassword*     -> [Options]
112
113   You should adjust your `ngircd.conf` and run `ngircd --configtest` to make
114   sure that your settings are correct and up to date!
115
116 Differences to version 16.x
117
118 - Changes to the *MotdFile* specified in `ngircd.conf` now require a ngIRCd
119   configuration reload to take effect (HUP signal, *REHASH* command).
120
121 Differences to version 0.9.x
122
123 - The option of the configure script to enable support for Zeroconf/Bonjour/
124   Rendezvous/WhateverItIsNamedToday has been renamed:
125
126   - `--with-rendezvous`  ->  `--with-zeroconf`
127
128 Differences to version 0.8.x
129
130 - The maximum length of passwords has been raised to 20 characters (instead
131   of 8 characters). If your passwords are longer than 8 characters then they
132   are cut at an other position now.
133
134 Differences to version 0.6.x
135
136 - Some options of the configure script have been renamed:
137
138   - `--disable-syslog`  ->  `--without-syslog`
139   - `--disable-zlib`    ->  `--without-zlib`
140
141   Please call `./configure --help` to review the full list of options!
142
143 Differences to version 0.5.x
144
145 - Starting with version 0.6.0, other servers are identified using asynchronous
146   passwords: therefore the variable *Password* in *[Server]*-sections has been
147   replaced by *MyPassword* and *PeerPassword*.
148
149 - New configuration variables, section *[Global]*: *MaxConnections*, *MaxJoins*
150   (see example configuration file `doc/sample-ngircd.conf`!).
151
152 ## Standard Installation
153
154 *Note*: This sections describes installing ngIRCd *from sources*. If you use
155 packages available for your operating system distribution you should skip over
156 and continue with the *Configuration* section, see below.
157
158 ngIRCd is developed for UNIX-based systems, which means that the installation
159 on modern UNIX-like systems that are supported by GNU autoconf and GNU
160 automake ("`configure` script") should be no problem.
161
162 The normal installation procedure after getting (and expanding) the source
163 files (using a distribution archive or Git) is as following:
164
165 1) Satisfy prerequisites
166 2) `./autogen.sh` [only necessary when using "raw" sources with Git]
167 3) `./configure`
168 4) `make`
169 5) `make install`
170
171 (Please see details below!)
172
173 Now the newly compiled executable "ngircd" is installed in its standard
174 location, `/usr/local/sbin/`.
175
176 If no previous version of the configuration file exists (the standard name
177 is `/usr/local/etc/ngircd.conf)`, a sample configuration file containing all
178 possible options will be installed there. You'll find its template in the
179 `doc/` directory: `sample-ngircd.conf`.
180
181 The next step is to configure and afterwards start the daemon. See the section
182 *Configuration* below.
183
184 ### Satisfy prerequisites
185
186 When building from source, you'll need some other software to build ngIRCd:
187 for example a working C compiler, make tool, and a few libraries depending on
188 the feature set you want to enable at compile time (like IDENT, SSL, and PAM).
189
190 And if you aren't using a distribution archive ("tar.gz" file), but cloned the
191 plain source archive, you need a few additional tools to generate the build
192 system itself: GNU automake and autoconf, as well as pkg-config.
193
194 If you are using one of the "big" operating systems or Linux distributions,
195 you can use the following commands to install all the required packages to
196 build the sources including all optional features and to run the test suite:
197
198 #### Red Hat / Fedora based distributions
199
200 ``` shell
201   yum install \
202     autoconf automake expect gcc glibc-devel gnutls-devel \
203     libident-devel make pam-devel pkg-config tcp_wrappers-devel \
204     telnet zlib-devel
205 ```
206
207 *Note:* More recent versions use the DNF package manager; so substitute "yum"
208 with "dnf" in the command above. And neither "libident-devel" (IDENT support)
209 nor "tcp_wrappers-devel" (TCP Wrappers) are provided any more!
210
211 So the resulting command looks like this:
212
213 ``` shell
214   dnf install \
215     autoconf automake expect gcc glibc-devel gnutls-devel \
216     make pam-devel pkg-config telnet zlib-devel
217 ```
218
219 #### Debian / Ubuntu based distributions
220
221 ``` shell
222   apt-get install \
223     autoconf automake build-essential expect libgnutls28-dev \
224     libident-dev libpam-dev pkg-config libwrap0-dev libz-dev telnet
225 ```
226
227 #### ArchLinux based distributions
228
229 ``` shell
230   pacman -S --needed \
231     autoconf automake expect gcc gnutls inetutils libident libwrap \
232     make pam pkg-config zlib
233 ```
234
235 ### `./autogen.sh`
236
237 The first step, to run `./autogen.sh`, is *only* necessary if the `configure`
238 script itself isn't already generated and available. This never happens in
239 official ("stable") releases in "tar.gz" archives, but when cloning the source
240 code repository using Git.
241
242 **This step is therefore only interesting for developers!**
243
244 The `autogen.sh` script produces the `Makefile.in`'s, which are necessary for
245 the configure script itself, and some more files for `make(1)`.
246
247 To run `autogen.sh` you'll need GNU autoconf, GNU automake and pkg-config: at
248 least autoconf 2.61 and automake 1.10 are required, newer is better. But don't
249 use automake 1.12 or newer for creating distribution archives: it will work
250 but lack "de-ANSI-fication" support in the generated Makefile's! Stick with
251 automake 1.11.x for this purpose ...
252
253 So *automake 1.11.x* and *autoconf 2.67+* is recommended.
254
255 Again: "end users" do not need this step and neither need GNU autoconf nor GNU
256 automake at all!
257
258 ### `./configure`
259
260 The `configure` script is used to detect local system dependencies.
261
262 In the perfect case, `configure` should recognize all needed libraries, header
263 files and so on. If this shouldn't work, `./configure --help` shows all
264 possible options.
265
266 In addition, you can pass some command line options to `configure` to enable
267 and/or disable some features of ngIRCd. All these options are shown using
268 `./configure --help`, too.
269
270 Compiling a static binary will avoid you the hassle of feeding a chroot dir
271 (if you want use the chroot feature). Just do something like:
272
273 ``` shell
274   CFLAGS=-static ./configure [--your-options ...]
275 ```
276
277 Then you can use a void directory as ChrootDir (like OpenSSH's `/var/empty`).
278
279 ### `make`
280
281 The `make(1)` command uses the `Makefile`'s produced by `configure` and
282 compiles the ngIRCd daemon.
283
284 ### `make install`
285
286 Use `make install` to install the server and a sample configuration file on
287 the local system. Normally, root privileges are necessary to complete this
288 step. If there is already an older configuration file present, it won't be
289 overwritten.
290
291 These files and folders will be installed by default:
292
293 - `/usr/local/sbin/ngircd`: executable server
294 - `/usr/local/etc/ngircd.conf`: sample configuration (if not already present)
295 - `/usr/local/share/doc/ngircd/`: documentation
296 - `/usr/local/share/man/`: manual pages
297
298 ### Additional features
299
300 The following optional features can be compiled into the daemon by passing
301 options to the `configure` script. Most options can handle a `<path>` argument
302 which will be used to search for the required libraries and header files in
303 the given paths (`<path>/lib/...`, `<path>/include/...`) in addition to the
304 standard locations.
305
306 - Syslog Logging (autodetected by default):
307
308   `--with-syslog[=<path>]` / `--without-syslog`
309
310   Enable (disable) support for logging to "syslog", which should be
311   available on most modern UNIX-like operating systems by default.
312
313 - ZLib Compression (autodetected by default):
314
315   `--with-zlib[=<path>]` / `--without-zlib`
316
317   Enable (disable) support for compressed server-server links.
318   The Z compression library ("libz") is required for this option.
319
320 - IO Backend (autodetected by default):
321
322   - `--with-select[=<path>]` / `--without-select`
323   - `--with-poll[=<path>]` / `--without-poll`
324   - `--with-devpoll[=<path>]` / `--without-devpoll`
325   - `--with-epoll[=<path>]` / `--without-epoll`
326   - `--with-kqueue[=<path>]` / `--without-kqueue`
327
328   ngIRCd can use different IO "backends": the "old school" `select(2)` and
329   `poll(2)` API which should be supported by most UNIX-like operating systems,
330   or the more efficient and flexible `epoll(7)` (Linux >=2.6), `kqueue(2)`
331   (BSD) and `/dev/poll` APIs.
332
333   By default the IO backend is autodetected, but you can use `--without-xxx`
334   to disable a more enhanced API.
335
336   When using the `epoll(7)` API, support for `select(2)` is compiled in as
337   well by default, to enable the binary to run on older Linux kernels (<2.6),
338   too.
339
340 - IDENT-Support:
341
342   `--with-ident[=<path>]`
343
344   Include support for IDENT ("AUTH") lookups. The "ident" library is
345   required for this option.
346
347 - TCP-Wrappers:
348
349   `--with-tcp-wrappers[=<path>]`
350
351   Include support for Wietse Venemas "TCP Wrappers" to limit client access
352   to the daemon, for example by using `/etc/hosts.{allow|deny}`.
353   The "libwrap" is required for this option.
354
355 - PAM:
356
357   `--with-pam[=<path>]`
358
359   Enable support for PAM, the Pluggable Authentication Modules library.
360   See `doc/PAM.txt` for details.
361
362 - SSL:
363
364   - `--with-openssl[=<path>]`
365   - `--with-gnutls[=<path>]`
366
367   Enable support for SSL/TLS using OpenSSL or GnuTLS libraries.
368   See `doc/SSL.txt` for details.
369
370 - IPv6 (autodetected by default):
371
372   `--enable-ipv6` / `--disable-ipv6`
373
374   Enable (disable) support for version 6 of the Internet Protocol, which should
375   be available on most modern UNIX-like operating systems by default.
376
377 ## Configuration
378
379 Please see the file `doc/QuickStart.md` in the `doc/` directory and
380 [online](https://ngircd.barton.de/doc/QuickStart.md) on the homepage for
381 information about configuring ngIRCd, including some configuration examples.
382
383 And have a look at the `ngircd(8)` and `ngircd.conf(5)` manual pages for
384 details and all possible command line and configuration options -- **and don't
385 forget to run `ngircd --configtest` to validate your configuration file!**
386
387 ### Manual Pages Online
388
389 - Daemon: [ngircd.8](https://manpages.debian.org/ngircd.8)
390 - Configutation file: [ngircd.conf.5](https://manpages.debian.org/ngircd.conf.5)
391
392 ## Command line options
393
394 ngIRCd supports the following command line options:
395
396 - `-f`, `--config <file>`
397
398   The daemon uses the file `<file>` as configuration file rather than
399   the standard configuration `/usr/local/etc/ngircd.conf`.
400
401 - `-n`, `--nodaemon`
402
403   ngIRCd should be running as a foreground process.
404
405 - `-p`, `--passive`
406
407   Server-links won't be automatically established.
408
409 - `-t`, `--configtest`
410
411   Reads, validates and dumps the configuration file as interpreted
412   by the server. Then exits.
413
414 Use `--help` to see a short help text describing all available parameters
415 the server understands, with `--version` the ngIRCd shows its version
416 number. In both cases the server exits after the output.
417
418 Please see the `ngircd(8)` manual page for more details!