]> arthur.barton.de Git - ngircd-alex.git/blob - doc/sample-ngircd.conf.tmpl
Optionally validate certificates on TLS server links
[ngircd-alex.git] / doc / sample-ngircd.conf.tmpl
1 #
2 # This is a sample configuration file for the ngIRCd IRC daemon, which must
3 # be customized to the local preferences and needs.
4 #
5 # Comments are started with "#" or ";".
6 #
7 # A lot of configuration options in this file start with a ";". You have
8 # to remove the ";" in front of each variable to actually set a value!
9 # The disabled variables are shown with example values for completeness only
10 # and the daemon is using compiled-in default settings.
11 #
12 # Use "ngircd --configtest" (see manual page ngircd(8)) to validate that the
13 # server interprets the configuration file as expected!
14 #
15 # Please see ngircd.conf(5) for a complete list of configuration options
16 # and their descriptions.
17 #
18
19 [Global]
20         # The [Global] section of this file is used to define the main
21         # configuration of the server, like the server name and the ports
22         # on which the server should be listening.
23         # These settings depend on your personal preferences, so you should
24         # make sure that they correspond to your installation and setup!
25
26         # Server name in the IRC network, must contain at least one dot
27         # (".") and be unique in the IRC network. Required!
28         Name = irc.example.net
29
30         # Information about the server and the administrator, used by the
31         # ADMIN command. Not required by server but by RFC!
32         ;AdminInfo1 = Description
33         ;AdminInfo2 = Location
34         ;AdminEMail = admin@irc.server
35
36         # Text file which contains the ngIRCd help text. This file is required
37         # to display help texts when using the "HELP <cmd>" command.
38         ;HelpFile = :DOCDIR:/Commands.txt
39
40         # Info text of the server. This will be shown by WHOIS and
41         # LINKS requests for example.
42         Info = Server Info Text
43
44         # Comma separated list of IP addresses on which the server should
45         # listen. Default values are:
46         # "0.0.0.0" or (if compiled with IPv6 support) "::,0.0.0.0"
47         # so the server listens on all IP addresses of the system by default.
48         ;Listen = 127.0.0.1,192.168.0.1
49
50         # Text file with the "message of the day" (MOTD). This message will
51         # be shown to all users connecting to the server:
52         ;MotdFile = :ETCDIR:/ngircd.motd
53
54         # A simple Phrase (<256 chars) if you don't want to use a motd file.
55         ;MotdPhrase = "Hello world!"
56
57         # The name of the IRC network to which this server belongs. This name
58         # is optional, should only contain ASCII characters, and can't contain
59         # spaces. It is only used to inform clients. The default is empty,
60         # so no network name is announced to clients.
61         ;Network = aIRCnetwork
62
63         # Global password for all users needed to connect to the server.
64         # (Default: not set)
65         ;Password = abc
66
67         # This tells ngIRCd to write its current process ID to a file.
68         # Note that the pidfile is written AFTER chroot and switching the
69         # user ID, e.g. the directory the pidfile resides in must be
70         # writable by the ngIRCd user and exist in the chroot directory.
71         ;PidFile = /var/run/ngircd/ngircd.pid
72
73         # Ports on which the server should listen. There may be more than
74         # one port, separated with ",". (Default: 6667)
75         ;Ports = 6667, 6668, 6669
76
77         # Group ID under which the ngIRCd should run; you can use the name
78         # of the group or the numerical ID. ATTENTION: For this to work the
79         # server must have been started with root privileges!
80         ;ServerGID = 65534
81
82         # User ID under which the server should run; you can use the name
83         # of the user or the numerical ID. ATTENTION: For this to work the
84         # server must have been started with root privileges! In addition,
85         # the configuration and MOTD files must be readable by this user,
86         # otherwise RESTART and REHASH won't work!
87         ;ServerUID = 65534
88
89 [Limits]
90         # Define some limits and timeouts for this ngIRCd instance. Default
91         # values should be safe, but it is wise to double-check :-)
92
93         # The server tries every <ConnectRetry> seconds to establish a link
94         # to not yet (or no longer) connected servers.
95         ;ConnectRetry = 60
96
97         # Number of seconds after which the whole daemon should shutdown when
98         # no connections are left active after handling at least one client
99         # (0: never, which is the default).
100         # This can be useful for testing or when ngIRCd is started using
101         # "socket activation" with systemd(8), for example.
102         ;IdleTimeout = 0
103
104         # Maximum number of simultaneous in- and outbound connections the
105         # server is allowed to accept (0: unlimited):
106         ;MaxConnections = 0
107
108         # Maximum number of simultaneous connections from a single IP address
109         # the server will accept (0: unlimited):
110         ;MaxConnectionsIP = 5
111
112         # Maximum number of channels a user can be member of (0: no limit):
113         ;MaxJoins = 10
114
115         # Maximum length of an user nickname (Default: 9, as in RFC 2812).
116         # Please note that all servers in an IRC network MUST use the same
117         # maximum nickname length!
118         ;MaxNickLength = 9
119
120         # Maximum number of channels returned in response to a /list
121         # command (0: unlimited):
122         ;MaxListSize = 100
123
124         # After <PingTimeout> seconds of inactivity the server will send a
125         # PING to the peer to test whether it is alive or not.
126         ;PingTimeout = 120
127
128         # If a client fails to answer a PING with a PONG within <PongTimeout>
129         # seconds, it will be disconnected by the server.
130         ;PongTimeout = 20
131
132 [Options]
133         # Optional features and configuration options to further tweak the
134         # behavior of ngIRCd. If you want to get started quickly, you most
135         # probably don't have to make changes here -- they are all optional.
136
137         # List of allowed channel types (channel prefixes) for newly created
138         # channels on the local server. By default, all supported channel
139         # types are allowed. Set this variable to the empty string to disallow
140         # creation of new channels by local clients at all.
141         ;AllowedChannelTypes = #&+
142
143         # Are remote IRC operators allowed to control this server, e.g.
144         # use commands like CONNECT, SQUIT, DIE, ...?
145         ;AllowRemoteOper = no
146
147         # A directory to chroot in when everything is initialized. It
148         # doesn't need to be populated if ngIRCd is compiled as a static
149         # binary. By default ngIRCd won't use the chroot() feature.
150         # ATTENTION: For this to work the server must have been started
151         # with root privileges!
152         ;ChrootDir = /var/empty
153
154         # Set this hostname for every client instead of the real one.
155         # Use %x to add the hashed value of the original hostname.
156         ;CloakHost = cloaked.host
157
158         # Use this hostname for hostname cloaking on clients that have the
159         # user mode "+x" set, instead of the name of the server.
160         # Use %x to add the hashed value of the original hostname.
161         ;CloakHostModeX = cloaked.user
162
163         # The Salt for cloaked hostname hashing. When undefined a random
164         # hash is generated after each server start.
165         ;CloakHostSalt = abcdefghijklmnopqrstuvwxyz
166
167         # Set every clients' user name to their nickname
168         ;CloakUserToNick = yes
169
170         # Try to connect to other IRC servers using IPv4 and IPv6, if possible.
171         ;ConnectIPv6 = yes
172         ;ConnectIPv4 = yes
173
174         # Default user mode(s) to set on new local clients. Please note that
175         # only modes can be set that the client could set using regular MODE
176         # commands, you can't set "a" (away) for example! Default: none.
177         ;DefaultUserModes = i
178
179         # Do DNS lookups when a client connects to the server.
180         ;DNS = yes
181
182         # Do IDENT lookups if ngIRCd has been compiled with support for it.
183         # Users identified using IDENT are registered without the "~" character
184         # prepended to their user name.
185         ;Ident = yes
186
187         # Directory containing configuration snippets (*.conf), that should
188         # be read in after parsing this configuration file.
189         ;IncludeDir = :ETCDIR:/conf.d
190
191         # Enhance user privacy slightly (useful for IRC server on TOR or I2P)
192         # by censoring some information like idle time, logon time, etc.
193         ;MorePrivacy = no
194
195         # Normally ngIRCd doesn't send any messages to a client until it is
196         # registered. Enable this option to let the daemon send "NOTICE AUTH"
197         # messages to clients while connecting.
198         ;NoticeAuth = no
199
200         # Should IRC Operators be allowed to use the MODE command even if
201         # they are not(!) channel-operators?
202         ;OperCanUseMode = no
203
204         # Should IRC Operators get AutoOp (+o) in persistent (+P) channels?
205         ;OperChanPAutoOp = yes
206
207         # Mask IRC Operator mode requests as if they were coming from the
208         # server? (This is a compatibility hack for ircd-irc2 servers)
209         ;OperServerMode = no
210
211         # Use PAM if ngIRCd has been compiled with support for it.
212         # Users identified using PAM are registered without the "~" character
213         # prepended to their user name.
214         ;PAM = yes
215
216         # When PAM is enabled, all clients are required to be authenticated
217         # using PAM; connecting to the server without successful PAM
218         # authentication isn't possible.
219         # If this option is set, clients not sending a password are still
220         # allowed to connect: they won't become "identified" and keep the "~"
221         # character prepended to their supplied user name.
222         # Please note: To make some use of this behavior, it most probably
223         # isn't useful to enable "Ident", "PAM" and "PAMIsOptional" at the
224         # same time, because you wouldn't be able to distinguish between
225         # Ident'ified and PAM-authenticated users: both don't have a "~"
226         # character prepended to their respective user names!
227         ;PAMIsOptional = no
228
229         # Let ngIRCd send an "authentication PING" when a new client connects,
230         # and register this client only after receiving the corresponding
231         # "PONG" reply.
232         ;RequireAuthPing = no
233
234         # Silently drop all incoming CTCP requests.
235         ;ScrubCTCP = no
236
237         # Syslog "facility" to which ngIRCd should send log messages.
238         # Possible values are system dependent, but most probably auth, daemon,
239         # user and local1 through local7 are possible values; see syslog(3).
240         # Default is "local5" for historical reasons, you probably want to
241         # change this to "daemon", for example.
242         ;SyslogFacility = local1
243
244         # Password required for using the WEBIRC command used by some
245         # Web-to-IRC gateways. If not set/empty, the WEBIRC command can't
246         # be used. (Default: not set)
247         ;WebircPassword = xyz
248
249 ;[SSL]
250         # SSL-related configuration options. Please note that this section
251         # is only available when ngIRCd is compiled with support for SSL!
252         # So don't forget to remove the ";" above if this is the case ...
253
254         # SSL Trusted CA Certificates File (for verifying peer certificates)
255         ;CAFile = /etc/ssl/CA/cacert.pem
256
257         # Certificate Revocation File (for marking otherwise valid
258         # certficates as invalid)
259         ;CRLFile = /etc/ssl/CA/crl.pem
260
261         # SSL Server Key Certificate
262         ;CertFile = :ETCDIR:/ssl/server-cert.pem
263
264         # Select cipher suites allowed for SSL/TLS connections. This defaults
265         # to HIGH:!aNULL:@STRENGTH (OpenSSL) or SECURE128 (GnuTLS).
266         # See 'man 1ssl ciphers' (OpenSSL) or 'man 3 gnutls_priority_init'
267         # (GnuTLS) for details.
268         # For OpenSSL:
269         ;CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3
270         # For GnuTLS:
271         ;CipherList = SECURE128:-VERS-SSL3.0
272
273         # Diffie-Hellman parameters
274         ;DHFile = :ETCDIR:/ssl/dhparams.pem
275
276         # SSL Server Key
277         ;KeyFile = :ETCDIR:/ssl/server-key.pem
278
279         # password to decrypt SSLKeyFile (OpenSSL only)
280         ;KeyFilePassword = secret
281
282         # Additional Listen Ports that expect SSL/TLS encrypted connections
283         ;Ports = 6697, 9999
284
285         # Enforce Client Certificates? (Default: false)
286         ;RequireClientCert = false
287
288 [Operator]
289         # [Operator] sections are used to define IRC Operators. There may be
290         # more than one [Operator] block, one for each local operator.
291
292         # ID of the operator (may be different of the nickname)
293         ;Name = TheOper
294
295         # Password of the IRC operator
296         ;Password = ThePwd
297
298         # Optional Mask from which /OPER will be accepted
299         ;Mask = *!ident@somewhere.example.com
300
301 [Operator]
302         # More [Operator] sections, if you like ...
303
304 [Server]
305         # Other servers are configured in [Server] sections. If you
306         # configure a port for the connection, then this ngircd tries to
307         # connect to to the other server on the given port; if not it waits
308         # for the other server to connect.
309         # There may be more than one server block, one for each server.
310         #
311         # Server Groups:
312         # The ngIRCd allows "server groups": You can assign an "ID" to every
313         # server with which you want this ngIRCd to link. If a server of a
314         # group won't answer, the ngIRCd tries to connect to the next server
315         # in the given group. But the ngircd never tries to connect to two
316         # servers with the same group ID.
317
318         # IRC name of the remote server, must match the "Name" variable in
319         # the [Global] section of the other server (when using ngIRCd).
320         ;Name = irc2.example.net
321
322         # Internet host name or IP address of the peer (only required when
323         # this server should establish the connection).
324         ;Host = connect-to-host.example.net
325
326         # IP address to use as _source_ address for the connection. if
327         # unspecified, ngircd will let the operating system pick an address.
328         ;Bind = 10.0.0.1
329
330         # Port of the server to which the ngIRCd should connect. If you
331         # assign no port the ngIRCd waits for incoming connections.
332         ;Port = 6667
333
334         # Own password for the connection. This password has to be configured
335         # as "PeerPassword" on the other server.
336         ;MyPassword = MySecret
337
338         # Foreign password for this connection. This password has to be
339         # configured as "MyPassword" on the other server.
340         ;PeerPassword = PeerSecret
341
342         # Group of this server (optional)
343         ;Group = 123
344
345         # Set the "Passive" option to "yes" if you don't want this ngIRCd to
346         # connect to the configured peer (same as leaving the "Port" variable
347         # empty). The advantage of this option is that you can actually
348         # configure a port an use the IRC command CONNECT more easily to
349         # manually connect this specific server later.
350         ;Passive = no
351
352         # Connect to the remote server using TLS/SSL (Default: false)
353         ;SSLConnect = yes
354
355         # Define a (case insensitive) list of masks matching nicknames that
356         # should be treated as IRC services when introduced via this remote
357         # server, separated by commas (",").
358         # REGULAR SERVERS DON'T NEED this parameter, so leave it empty
359         # (which is the default).
360         # When you are connecting IRC services which mask as a IRC server
361         # and which use "virtual users" to communicate with, for example
362         # "NickServ" and "ChanServ", you should set this parameter to
363         # something like "*Serv" or "NickServ,ChanServ,XyzServ".
364         ;ServiceMask = *Serv,Global
365
366 [Server]
367         # More [Server] sections, if you like ...
368
369 [Channel]
370         # Pre-defined channels can be configured in [Channel] sections.
371         # Such channels are created by the server when starting up and even
372         # persist when there are no more members left.
373         # Persistent channels are marked with the mode 'P', which can be set
374         # and unset by IRC operators like other modes on the fly.
375         # There may be more than one [Channel] block, one for each channel.
376
377         # Name of the channel
378         ;Name = #TheName
379
380         # Topic for this channel
381         ;Topic = a great topic
382
383         # Initial channel modes
384         ;Modes = tnk
385
386         # initial channel password (mode k)
387         ;Key = Secret
388
389         # Key file, syntax for each line: "<user>:<nick>:<key>".
390         # Default: none.
391         ;KeyFile = :ETCDIR:/#chan.key
392
393         # maximum users per channel (mode l)
394         ;MaxUsers = 23
395
396 [Channel]
397         # More [Channel] sections, if you like ...
398
399 # -eof-