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