]> arthur.barton.de Git - ngircd-alex.git/blob - man/ngircd.conf.5.tmpl
Clarify that "CAFile" is not set by default
[ngircd-alex.git] / man / ngircd.conf.5.tmpl
1 .\"
2 .\" ngircd.conf(5) manual page template
3 .\"
4 .TH ngircd.conf 5 "Sep 2023" ngIRCd "ngIRCd Manual"
5 .SH NAME
6 ngircd.conf \- configuration file of ngIRCd
7 .SH SYNOPSIS
8 .B :ETCDIR:/ngircd.conf
9 .SH DESCRIPTION
10 .BR ngircd.conf
11 is the configuration file of the
12 .BR ngircd (8)
13 Internet Relay Chat (IRC) daemon, which must be customized to the local
14 preferences and needs.
15 .PP
16 Most variables can be modified while the ngIRCd daemon is already running:
17 It will reload its configuration file when a HUP signal or REHASH command
18 is received.
19 .SH "FILE FORMAT"
20 The file consists of sections and parameters. A section begins with the name
21 of the section in square brackets and continues until the next section
22 begins.
23 .PP
24 Sections contain parameters of the form
25 .PP
26 .RS
27 .I name
28 =
29 .I value
30 .RE
31 .PP
32 Empty lines and any line beginning with a semicolon (';') or a hash ('#')
33 character are treated as a comment and will be ignored. Leading and trailing
34 whitespaces are trimmed before any processing takes place.
35 .PP
36 The file format is line-based - that means, each non-empty newline-terminated
37 line represents either a comment, a section name, or a parameter.
38 .PP
39 Section and parameter names are not case sensitive.
40 .PP
41 There are three types of variables:
42 .I booleans,
43 .I text strings,
44 and
45 .I numbers.
46 Boolean values are
47 .I true
48 if they are "yes", "true", or any non-null integer. Text strings are used 1:1
49 without leading and following spaces; there is no way to quote strings. And
50 for numbers all decimal integer values are valid.
51 .PP
52 In addition, some string or numerical variables accept lists of values,
53 separated by commas (",").
54 .SH "SECTION OVERVIEW"
55 The file can contain blocks of seven types: [Global], [Limits], [Options],
56 [SSL], [Operator], [Server], and [Channel].
57 .PP
58 The main configuration of the server is stored in the
59 .I [Global]
60 section, like the server name, administrative information and the ports on
61 which the server should be listening. The variables in this section have to be
62 adjusted to the local requirements most of the time, whereas all the variables
63 in the other sections can be left on their defaults very often.
64 .PP
65 Options in the
66 .I [Limits]
67 block are used to tweak different limits and timeouts of the daemon, like the
68 maximum number of clients allowed to connect to this server. Variables in the
69 .I [Options]
70 section can be used to enable or disable specific features of ngIRCd, like
71 support for IDENT, PAM, IPv6, and protocol and cloaking features. The
72 .I [SSL]
73 block contains all SSL-related configuration variables. These three sections
74 are all optional.
75 .PP
76 IRC operators of this server are defined in
77 .I [Operator]
78 blocks. Links to remote servers are configured in
79 .I [Server]
80 sections. And
81 .I [Channel]
82 blocks are used to configure pre-defined ("persistent") IRC channels.
83 .PP
84 There can be more than one [Operator], [Server] and [Channel] section per
85 configuration file, one for each operator, server, and channel. [Global],
86 [Limits], [Options], and [SSL] sections can occur multiple times, too, but
87 each variable overwrites itself, only the last assignment is relevant.
88 .SH [GLOBAL]
89 The
90 .I [Global]
91 section is used to define the main configuration of the server,
92 like the server name and the ports on which the server should be listening.
93 These settings depend on your personal preferences, so you should make sure
94 that they correspond to your installation and setup!
95 .TP
96 \fBName\fR (string)
97 Server name in the IRC network. This is an individual name of the IRC
98 server, it is not related to the DNS host name. It must be unique in the
99 IRC network and must contain at least one dot (".") character. When not set,
100 ngIRCd tries to deduce a valid IRC server name from the local host name.
101 .TP
102 \fBAdminInfo1\fR, \fBAdminInfo2\fR, \fBAdminEMail\fR (string)
103 Information about the server and the administrator, used by the ADMIN
104 command. This information is not required by the server but by RFC!
105 .TP
106 \fBHelpFile\fR (string)
107 Text file which contains the ngIRCd help text. This file is required
108 to display help texts when using the "HELP <cmd>" command.
109 Please note: Changes made to this file take effect when ngircd starts up
110 or is instructed to re-read its configuration file. Default: a built-in
111 standard path.
112 .TP
113 \fBInfo\fR (string)
114 Info text of the server. This will be shown by WHOIS and LINKS requests for
115 example. Set to the server software name and version by default.
116 .TP
117 \fBListen\fR (list of strings)
118 A comma separated list of IP address on which the server should listen.
119 If unset, the defaults value is "0.0.0.0" or, if ngIRCd was compiled
120 with IPv6 support, "::,0.0.0.0". So the server listens on all configured
121 IP addresses and interfaces by default.
122 .TP
123 \fBMotdFile\fR (string)
124 Text file with the "message of the day" (MOTD). This message will be shown to
125 all users connecting to the server. Please note: Changes made to this file
126 take effect when ngircd starts up or is instructed to re-read its
127 configuration file. Default: a built-in standard path.
128 .TP
129 \fBMotdPhrase\fR (string)
130 A simple Phrase (<127 chars) if you don't want to use a MOTD file.
131 .TP
132 \fBNetwork\fR (string)
133 The name of the IRC network to which this server belongs. This name is
134 optional, should only contain ASCII characters, and can't contain spaces.
135 It is only used to inform clients. The default is empty, so no network
136 name is announced to clients.
137 .TP
138 \fBPassword\fR (string)
139 Global password for all users needed to connect to the server. The default is
140 empty, so no password is required. Please note: This feature is not available
141 if ngIRCd is using PAM!
142 .TP
143 \fBPidFile\fR (string)
144 This tells ngIRCd to write its current process ID to a file. Note that the
145 "PID file" is written AFTER chroot and switching the user ID, therefore the
146 directory the file resides in must be writable by the ngIRCd user and exist
147 in the chroot directory (if configured, see above).
148 .TP
149 \fBPorts\fR (list of numbers)
150 Port number(s) on which the server should listen for unencrypted connections.
151 There may be more than one port, separated with commas (","). Default: 6667.
152 .TP
153 \fBServerGID\fR (string or number)
154 Group ID under which the ngIRCd daemon should run; you can use the name of the
155 group or the numerical ID.
156 .PP
157 .RS
158 .B Attention:
159 .br
160 For this to work the server must have been started with root privileges!
161 .RE
162 .TP
163 \fBServerUID\fR (string or number)
164 User ID under which the ngIRCd daemon should run; you can use the name of the
165 user or the numerical ID.
166 .PP
167 .RS
168 .B Attention:
169 .br
170 For this to work the server must have been started with root privileges! In
171 addition, the configuration and MOTD files must be readable by this user,
172 otherwise RESTART and REHASH won't work!
173 .RE
174 .SH [LIMITS]
175 This section is used to define some limits and timeouts for this ngIRCd
176 instance. Default values should be safe, but it is wise to double-check :-)
177 .TP
178 \fBConnectRetry\fR (number)
179 The server tries every <ConnectRetry> seconds to establish a link to not yet
180 (or no longer) connected servers. Default: 60.
181 .TP
182 \fBIdleTimeout\fR (number)
183 Number of seconds after which the whole daemon should shutdown when no
184 connections are left active after handling at least one client (0: never). This
185 can be useful for testing or when ngIRCd is started using "socket activation"
186 with systemd(8), for example. Default: 0.
187 .TP
188 \fBMaxConnections\fR (number)
189 Maximum number of simultaneous in- and outbound connections the server is
190 allowed to accept (0: unlimited). Default: 0.
191 .TP
192 \fBMaxConnectionsIP\fR (number)
193 Maximum number of simultaneous connections from a single IP address that
194 the server will accept (0: unlimited). This configuration options lowers
195 the risk of denial of service attacks (DoS). Default: 5.
196 .TP
197 \fBMaxJoins\fR (number)
198 Maximum number of channels a user can be member of (0: no limit).
199 Default: 10.
200 .TP
201 \fBMaxNickLength\fR (number)
202 Maximum length of an user nickname (Default: 9, as in RFC 2812). Please
203 note that all servers in an IRC network MUST use the same maximum nickname
204 length!
205 .TP
206 \fBMaxPenaltyTime\fR (number)
207 Maximum penalty time increase in seconds, per penalty event. Set to -1 for no
208 limit (the default), 0 to disable penalties altogether. ngIRCd doesn't use
209 penalty increases higher than 2 seconds during normal operation, so values
210 greater than 1 rarely make sense.
211 .TP
212 \fBMaxListSize\fR (number)
213 Maximum number of channels returned in response to a LIST command. Default: 100.
214 .TP
215 \fBPingTimeout\fR (number)
216 After <PingTimeout> seconds of inactivity the server will send a PING to
217 the peer to test whether it is alive or not. Default: 120.
218 .TP
219 \fBPongTimeout\fR (number)
220 If a client fails to answer a PING with a PONG within <PongTimeout>
221 seconds, it will be disconnected by the server. Default: 20.
222 .SH [OPTIONS]
223 Optional features and configuration options to further tweak the behavior of
224 ngIRCd are configured in this section. If you want to get started quickly, you
225 most probably don't have to make changes here -- they are all optional.
226 .TP
227 \fBAllowedChannelTypes\fR (string)
228 List of allowed channel types (channel prefixes) for newly created channels
229 on the local server. By default, all supported channel types are allowed.
230 Set this variable to the empty string to disallow creation of new channels
231 by local clients at all. Default: #&+
232 .TP
233 \fBAllowRemoteOper\fR (boolean)
234 If this option is active, IRC operators connected to remote servers are allowed
235 to control this local server using administrative commands, for example like
236 CONNECT, DIE, SQUIT etc. Default: no.
237 .TP
238 \fBChrootDir\fR (string)
239 A directory to chroot in when everything is initialized. It doesn't need
240 to be populated if ngIRCd is compiled as a static binary. By default ngIRCd
241 won't use the chroot() feature.
242 .PP
243 .RS
244 .B Attention:
245 .br
246 For this to work the server must have been started with root privileges!
247 .RE
248 .TP
249 \fBCloakHost\fR (string)
250 Set this hostname for every client instead of the real one. Default: empty,
251 don't change. Use %x to add the hashed value of the original hostname.
252 .TP
253 \fBCloakHostModeX\fR (string)
254 Use this hostname for hostname cloaking on clients that have the user mode
255 "+x" set, instead of the name of the server. Default: empty, use the name
256 of the server. Use %x to add the hashed value of the original hostname
257 .TP
258 \fBCloakHostSalt\fR (string)
259 The Salt for cloaked hostname hashing. When undefined a random hash is
260 generated after each server start.
261 .TP
262 \fBCloakUserToNick\fR (boolean)
263 Set every clients' user name and real name to their nickname and hide the one
264 supplied by the IRC client. Default: no.
265 .TP
266 \fBConnectIPv4\fR (boolean)
267 Set this to no if you do not want ngIRCd to connect to other IRC servers using
268 the IPv4 protocol. This allows the usage of ngIRCd in IPv6-only setups.
269 Default: yes.
270 .TP
271 \fBConnectIPv6\fR (boolean)
272 Set this to no if you do not want ngIRCd to connect to other IRC servers using
273 the IPv6 protocol.
274 Default: yes.
275 .TP
276 \fBDefaultUserModes\fR (string)
277 Default user mode(s) to set on new local clients. Please note that only modes
278 can be set that the client could set using regular MODE commands, you can't
279 set "a" (away) for example!
280 Default: none.
281 .TP
282 \fBDNS\fR (boolean)
283 If set to false, ngIRCd will not make any DNS lookups when clients connect.
284 If you configure the daemon to connect to other servers, ngIRCd may still
285 perform a DNS lookup if required.
286 Default: yes.
287 .TP
288 \fBIdent\fR (boolean)
289 If ngIRCd is compiled with IDENT support this can be used to disable IDENT
290 lookups at run time.
291 Users identified using IDENT are registered without the "~" character
292 prepended to their user name.
293 Default: yes.
294 .TP
295 \fBIncludeDir\fR (string)
296 Directory containing configuration snippets (*.conf), that should be read in
297 after parsing the current configuration file.
298 Default: a built-in directory name when no configuration file was explicitly
299 given on the command line (check "ngircd --configtest"), none (empty)
300 otherwise.
301 .PP
302 .RS
303 This way no default include directory is used when a possibly non-default
304 configuration file was explicitly specified using "--config"/"-f" on the
305 command line which (intentionally) did not specify an
306 .I "IncludeDir"
307 directive.
308 .RE
309 .TP
310 \fBMorePrivacy\fR (boolean)
311 This will cause ngIRCd to censor user idle time, logon time as well as the
312 PART/QUIT messages (that are sometimes used to inform everyone about which
313 client software is being used). WHOWAS requests are also silently ignored,
314 and NAMES output doesn't list any clients for non-members.
315 This option is most useful when ngIRCd is being used together with
316 anonymizing software such as TOR or I2P and one does not wish to make it
317 too easy to collect statistics on the users.
318 Default: no.
319 .TP
320 \fBNoticeBeforeRegistration\fR (boolean)
321 Normally ngIRCd doesn't send any messages to a client until it is registered.
322 Enable this option to let the daemon send "NOTICE *" messages to clients
323 while connecting. Default: no.
324 .TP
325 \fBOperCanUseMode\fR (boolean)
326 Should IRC Operators be allowed to use the MODE command even if they are
327 not(!) channel-operators? Default: no.
328 .TP
329 \fBOperChanPAutoOp\fR (boolean)
330 Should IRC Operators get AutoOp (+o) in persistent (+P) channels?
331 Default: yes.
332 .TP
333 \fBOperServerMode\fR (boolean)
334 If \fBOperCanUseMode\fR is enabled, this may lead the compatibility problems
335 with Servers that run the ircd-irc2 Software. This Option "masks" mode
336 requests by non-chanops as if they were coming from the server. Default: no;
337 only enable it if you have ircd-irc2 servers in your IRC network.
338 .TP
339 \fBPAM\fR (boolean)
340 If ngIRCd is compiled with PAM support this can be used to disable all calls
341 to the PAM library at runtime; all users connecting without password are
342 allowed to connect, all passwords given will fail.
343 Users identified using PAM are registered without the "~" character
344 prepended to their user name.
345 Default: yes.
346 .TP
347 \fBPAMIsOptional\fR (boolean)
348 When PAM is enabled, all clients are required to be authenticated using PAM;
349 connecting to the server without successful PAM authentication isn't possible.
350 If this option is set, clients not sending a password are still allowed to
351 connect: they won't become "identified" and keep the "~" character prepended
352 to their supplied user name.
353 Please note:
354 To make some use of this behavior, it most probably isn't useful to enable
355 "Ident", "PAM" and "PAMIsOptional" at the same time, because you wouldn't be
356 able to distinguish between Ident'ified and PAM-authenticated users: both
357 don't have a "~" character prepended to their respective user names!
358 Default: no.
359 .TP
360 \fBPAMServiceName\fR (string)
361 When PAM is enabled, this value determines the used PAM configuration.
362 This setting allows running multiple ngIRCd instances with different
363 PAM configurations on each instance. If you set it to "ngircd-foo",
364 PAM will use /etc/pam.d/ngircd-foo instead of the default
365 /etc/pam.d/ngircd.
366 Default: ngircd.
367 .TP
368 \fBRequireAuthPing\fR (boolean)
369 Let ngIRCd send an "authentication PING" when a new client connects, and
370 register this client only after receiving the corresponding "PONG" reply.
371 Default: no.
372 .TP
373 \fBScrubCTCP\fR (boolean)
374 If set to true, ngIRCd will silently drop all CTCP requests sent to it from
375 both clients and servers. It will also not forward CTCP requests to any
376 other servers. CTCP requests can be used to query user clients about which
377 software they are using and which versions said software is. CTCP can also be
378 used to reveal clients IP numbers. ACTION CTCP requests are not blocked,
379 this means that /me commands will not be dropped, but please note that
380 blocking CTCP will disable file sharing between users!
381 Default: no.
382 .TP
383 \fBSyslogFacility\fR (string)
384 Syslog "facility" to which ngIRCd should send log messages. Possible
385 values are system dependent, but most probably "auth", "daemon", "user"
386 and "local1" through "local7" are possible values; see syslog(3).
387 Default is "local5" for historical reasons, you probably want to
388 change this to "daemon", for example.
389 .TP
390 \fBWebircPassword\fR (string)
391 Password required for using the WEBIRC command used by some Web-to-IRC
392 gateways. If not set or empty, the WEBIRC command can't be used.
393 Default: not set.
394 .SH [SSL]
395 All SSL-related configuration variables are located in the
396 .I [SSL]
397 section. Please note that this whole section is only recognized by ngIRCd
398 when it is compiled with support for SSL using OpenSSL or GnuTLS!
399 .TP
400 \fBCAFile\fR (string)
401 Filename pointing to the Trusted CA Certificates. This is required for
402 verifying peer certificates. Default: not set, so no certificates are trusted.
403 .TP
404 \fBCertFile\fR (string)
405 SSL Certificate file of the private server key.
406 .TP
407 \fBCipherList\fR (string)
408 Select cipher suites allowed for SSL/TLS connections.  This defaults to
409 "HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) or "SECURE128:-VERS-SSL3.0" (GnuTLS).
410 Please see 'man 1ssl ciphers' (OpenSSL) and 'man 3 gnutls_priority_init'
411 (GnuTLS) for details.
412 .TP
413 \fBCRLFile\fR (string)
414 Filename of Certificate Revocation List.
415 .TP
416 \fBDHFile\fR (string)
417 Name of the Diffie-Hellman Parameter file. Can be created with GnuTLS
418 "certtool \-\-generate-dh-params" or "openssl dhparam". If this file is not
419 present, it will be generated on startup when ngIRCd was compiled with GnuTLS
420 support (this may take some time). If ngIRCd was compiled with OpenSSL, then
421 (Ephemeral)-Diffie-Hellman Key Exchanges and several Cipher Suites will not be
422 available.
423 .TP
424 \fBKeyFile\fR (string)
425 Filename of SSL Server Key to be used for SSL connections. This is required
426 for SSL/TLS support.
427 .TP
428 \fBKeyFilePassword\fR (string)
429 OpenSSL only: Password to decrypt the private key file.
430 .TP
431 \fBPorts\fR (list of numbers)
432 Same as \fBPorts\fR , except that ngIRCd will expect incoming connections
433 to be SSL/TLS encrypted. Common port numbers for SSL-encrypted IRC are 6669
434 and 6697. Default: none.
435 .SH [OPERATOR]
436 .I [Operator]
437 sections are used to define IRC Operators. There may be more than one
438 .I [Operator]
439 block, one for each local operator.
440 .TP
441 \fBName\fR (string)
442 ID of the operator (may be different of the nickname).
443 .TP
444 \fBPassword\fR (string)
445 Password of the IRC operator.
446 .TP
447 \fBMask\fR (string)
448 Mask that is to be checked before an /OPER for this account is accepted.
449 Example: nick!ident@*.example.com
450 .SH [SERVER]
451 Other servers are configured in
452 .I [Server]
453 sections. If you configure a port for the connection, then this ngIRCd
454 tries to connect to the other server on the given port (active);
455 if not, it waits for the other server to connect (passive).
456 .PP
457 ngIRCd supports "server groups": You can assign an "ID" to every server
458 with which you want this ngIRCd to link, and the daemon ensures that at
459 any given time only one direct link exists to servers with the same ID.
460 So if a server of a group won't answer, ngIRCd tries to connect to the next
461 server in the given group (="with the same ID"), but never tries to connect
462 to more than one server of this group simultaneously.
463 .PP
464 There may be more than one
465 .I [Server]
466 block.
467 .TP
468 \fBName\fR (string)
469 IRC name of the remote server.
470 .TP
471 \fBHost\fR (string)
472 Internet host name (or IP address) of the peer.
473 .TP
474 \fBBind\fR (string)
475 IP address to use as source IP for the outgoing connection. Default is
476 to let the operating system decide.
477 .TP
478 \fBPort\fR (number)
479 Port of the remote server to which ngIRCd should connect (active).
480 If no port is assigned to a configured server, the daemon only waits for
481 incoming connections (passive, default).
482 .TP
483 \fBMyPassword\fR (string)
484 Own password for this connection. This password has to be configured as
485 \fBPeerPassword\fR on the other server. Must not have ':' as first character.
486 .TP
487 \fBPeerPassword\fR (string)
488 Foreign password for this connection. This password has to be configured as
489 \fBMyPassword\fR on the other server.
490 .TP
491 \fBGroup\fR (number)
492 Group of this server (optional).
493 .TP
494 \fBPassive\fR (boolean)
495 Disable automatic connection even if port value is specified. Default: false.
496 You can use the IRC Operator command CONNECT later on to create the link.
497 .TP
498 \fBSSLConnect\fR (boolean)
499 Connect to the remote server using TLS/SSL. Default: false.
500 .TP
501 \fBSSLVerify\fR (boolean)
502 Verify the TLS certificate presented by the remote server. Default: yes.
503 .TP
504 \fBServiceMask\fR (string)
505 Define a (case insensitive) list of masks matching nicknames that should be
506 treated as IRC services when introduced via this remote server, separated
507 by commas (","). REGULAR SERVERS DON'T NEED this parameter, so leave it empty
508 (which is the default).
509 .PP
510 .RS
511 When you are connecting IRC services which mask as a IRC server and which use
512 "virtual users" to communicate with, for example "NickServ" and "ChanServ",
513 you should set this parameter to something like "*Serv", "*Serv,OtherNick",
514 or "NickServ,ChanServ,XyzServ".
515 .SH [CHANNEL]
516 Pre-defined channels can be configured in
517 .I [Channel]
518 sections. Such channels are created by the server when starting up and even
519 persist when there are no more members left.
520 .PP
521 Persistent channels are marked with the mode 'P', which can be set and unset
522 by IRC operators like other modes on the fly.
523 .PP
524 There may be more than one
525 .I [Channel]
526 block.
527 .TP
528 \fBName\fR (string)
529 Name of the channel, including channel prefix ("#" or "&").
530 .TP
531 \fBTopic\fR (string)
532 Topic for this channel.
533 .TP
534 \fBModes\fR (string)
535 Initial channel modes, as used in "MODE" commands. Modifying lists (ban list,
536 invite list, exception list) is supported.
537 .PP
538 .RS
539 This option can be specified multiple times, evaluated top to bottom.
540 .RE
541 .TP
542 \fBAutojoin\fR (boolean)
543 Should ngIRCd automatically join ("autojoin") all users to this channel on
544 connect? Note: The users must have permissions to access the channel, otherwise
545 joining them will fail!
546 .TP
547 \fBKeyFile\fR (string)
548 Path and file name of a "key file" containing individual channel keys for
549 different users. The file consists of plain text lines with the following
550 syntax (without spaces!):
551 .PP
552 .RS
553 .RS
554 .I user
555 :
556 .I nick
557 :
558 .I key
559 .RE
560 .PP
561 .I user
562 and
563 .I nick
564 can contain the wildcard character "*".
565 .br
566 .I key
567 is an arbitrary password.
568 .PP
569 Valid examples are:
570 .PP
571 .RS
572 *:*:KeY
573 .br
574 *:nick:123
575 .br
576 ~user:*:xyz
577 .RE
578 .PP
579 The key file is read on each JOIN command when this channel has a key
580 (channel mode +k). Access is granted, if a) the channel key set using the
581 MODE +k command or b) one of the lines in the key file match.
582 .PP
583 .B Please note:
584 .br
585 The file is not reopened on each access, so you can modify and overwrite it
586 without problems, but moving or deleting the file will have not effect until
587 the daemon re-reads its configuration!
588 .RE
589 .SH HINTS
590 It's wise to use "ngircd \-\-configtest" to validate the configuration file
591 after changing it. See
592 .BR ngircd (8)
593 for details.
594 .SH AUTHOR
595 Alexander Barton, <alex@barton.de>
596 .br
597 Florian Westphal, <fw@strlen.de>
598 .PP
599 Homepage: http://ngircd.barton.de/
600 .SH "SEE ALSO"
601 .BR ngircd (8)
602 .\"
603 .\" -eof-