To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Configuration: Difference between revisions

From ZNC
Jump to navigation Jump to search
>Jpnurmi
>Jpnurmi
Line 63: Line 63:
|-
|-
| rowspan="2" style="width:20%" | '''AnonIPLimit'''
| rowspan="2" style="width:20%" | '''AnonIPLimit'''
| Limits the number of unidentified connections per IP.
| The limit of anonymous unidentified connections per IP.
|-
|-
| <tt>AnonIPLimit = 10</tt>
| <tt>AnonIPLimit = 10</tt>
|-
|-
| rowspan="2" | '''BindHost'''
| rowspan="2" | '''BindHost'''
| The list of allowed bindhosts. It is used by the [[webadmin]] module for users to select one. (Set different bindhosts in "Settings" on your Webadmin-Interface first - one per line - to make them appear in users configs afterwards)
| The list of allowed bindhosts. Users can select one of these values.
|-
|-
| <tt>BindHost = 10.2.3.4<br/>BindHost = ...</tt>
| <tt>BindHost = ...<br/>BindHost = ...</tt>
|-
|-
| rowspan="2" | '''ConnectDelay'''
| rowspan="2" | '''ConnectDelay'''
| The time every connection will be delayed, in seconds. Some servers refuse your connection if you reconnect too fast. This affects the connection between ZNC and the IRC server; not the connection between your IRC client and ZNC.
| The number of seconds every IRC connection is delayed. IRC servers may refuse a connection when reconnecting too fast. NOTE: Affects connections between ZNC and IRC servers; not connections between IRC clients and ZNC.
|-
|-
| <tt>ConnectDelay = 5</tt>
| <tt>ConnectDelay = 5</tt>
|-
|-
| rowspan="2" | '''LoadModule'''
| rowspan="2" | '''LoadModule'''
| Load global [[Modules|modules]] on startup.
| The list of global [[Modules|modules]] loaded on ZNC startup.
|-
|-
| <tt>LoadModule = webadmin<br/>LoadModule = modperl<br/>LoadModule = modpython</tt>
| <tt>LoadModule = webadmin<br/>LoadModule = modperl<br/>LoadModule = modpython</tt>
|-
|-
| rowspan="2" | '''MaxBufferSize'''
| rowspan="2" | '''MaxBufferSize'''
| Sets the global Max Buffer Size a user can have.
| The maximum playback buffer size. Only admin users can exceed the limit.
|-
|-
| <tt>MaxBufferSize = 500</tt>
| <tt>MaxBufferSize = 500</tt>
|-
|-
| rowspan="2" | '''Motd'''
| rowspan="2" | '''Motd'''
| The "message of the day" which is sent to clients on connect via notice from *status. Can be specified multiple times.
| The list of "message of the day" lines that are sent to clients on connect via notice from *status.
|-
|-
| <tt>Motd = ...<br/>Motd = ...</tt>
| <tt>Motd = ...<br/>Motd = ...</tt>
|-
|-
| rowspan="2" | '''PidFile'''
| rowspan="2" | '''PidFile'''
| Make ZNC write a pid file. ZNC does not need this itself. See [[FAQ#How_can_I_restart_ZNC_automatically_.28in_case_of_a_machine_reboot.2C_crash.2C_etc..29.3F|the FAQ]] on info how to crontab ZNC.
| An optional PID file location. See the [[FAQ#How_can_I_restart_ZNC_automatically_.28in_case_of_a_machine_reboot.2C_crash.2C_etc..29.3F|FAQ]] for how to crontab ZNC.
|-
|-
| <tt>PidFile = /home/znc/.znc/znc.pid</tt>
| <tt>PidFile = /home/znc/.znc/znc.pid</tt>
Line 103: Line 103:
|-
|-
| rowspan="2" | '''ServerThrottle'''
| rowspan="2" | '''ServerThrottle'''
| The time between two connect attempts to the same hostname.
| The number of seconds between connect attempts to the same hostname.
|-
|-
| <tt>ServerThrottle = 30</tt>
| <tt>ServerThrottle = 30</tt>
|-
|-
| rowspan="2" | '''Skin'''
| rowspan="2" | '''Skin'''
| The web interface skin.
| The default web interface skin. Users can override the value.
|-
|-
| <tt>Skin = _default_</tt>
| <tt>Skin = _default_</tt>
Line 118: Line 118:
|-
|-
| rowspan="2" | '''SSLCiphers'''
| rowspan="2" | '''SSLCiphers'''
| Allowed [https://www.openssl.org/docs/apps/ciphers.html SSL ciphers].
| The allowed [https://www.openssl.org/docs/apps/ciphers.html SSL ciphers].
|-
|-
| <tt>SSLCiphers = RC4:HIGH:!aNULL:!MD5</tt>
| <tt>SSLCiphers = RC4:HIGH:!aNULL:!MD5</tt>
|-
|-
| rowspan="2" | '''StatusPrefix'''
| rowspan="2" | '''StatusPrefix'''
| The prefix for the status and module queries. This setting may be overwritten by users.
| The default prefix for status and module queries. Users can override the value.
|-
|-
| <tt>StatusPrefix = *</tt>
| <tt>StatusPrefix = *</tt>
|-
|-
| rowspan="2" | '''TrustedProxy'''
| rowspan="2" | '''TrustedProxy'''
| ...
| The list of trusted proxies.
|-
|-
| <tt>TrustedProxy = ...<br/>TrustedProxy = ...</tt>
| <tt>TrustedProxy = ...<br/>TrustedProxy = ...</tt>
|-
|-
| rowspan="2" | '''Version'''
| rowspan="2" | '''Version'''
| The ZNC version that wrote this file.
| The version of ZNC that was used to write the config file.
|-
|-
| <tt>Version = 1.6.0</tt>
| <tt>Version = 1.6.0</tt>
Line 140: Line 140:
=== Listener ===
=== Listener ===


Definition of a port that ZNC should listen on.
Definition of a port that ZNC listens on. There can be multiple ports, and they can allow different protocols.


{| class="wikitable" style="width:100%"
{| class="wikitable" style="width:100%"
Line 157: Line 157:
| An optional host or IP on which ZNC listens.
| An optional host or IP on which ZNC listens.
|-
|-
| <tt>Host = 10.2.3.4</tt>
| <tt>Host = ...</tt>
|-
|-
| rowspan="2" | '''IPv4'''
| rowspan="2" | '''IPv4'''
Line 175: Line 175:
|-
|-
| rowspan="2" | '''SSL'''
| rowspan="2" | '''SSL'''
| Whether this port is listening using SSL.
| Whether the port is listening using SSL.
|-
|-
| <tt>SSL = true</tt>
| <tt>SSL = true</tt>
|-
|-
| rowspan="2" | '''URIPrefix'''
| rowspan="2" | '''URIPrefix'''
| Prefix that ZNC should make the web interface available under. This can be used to make ZNC available behind a reverse proxy.
| An optional URI prefix for the ZNC web interface. Can be used to make ZNC available behind a reverse proxy.
|-
|-
| <tt>URIPrefix = /znc/</tt>
| <tt>URIPrefix = /znc/</tt>
Line 187: Line 187:
=== User ===
=== User ===


The user definition, you can have more than one. Each user may only connect to one network, so you need a separate user for each network. This is intended behavior! (See the [[FAQ]] about multiple networks)
Definition of a user. There can be multiple users and each can have multiple networks.


{| class="wikitable" style="width:100%"
{| class="wikitable" style="width:100%"
|-
|-
| rowspan="2" style="width:20%" | '''Admin'''
| rowspan="2" style="width:20%" | '''Admin'''
| Whether the user has admin rights (e.g. in the [[webadmin]] module).
| Whether the user has admin rights.
|-
|-
| <tt>Admin = true</tt>
| <tt>Admin = true</tt>
|-
|-
| rowspan="2" | '''Allow'''
| rowspan="2" | '''Allow'''
| By default everyone is able to connect to ZNC as this user. With an ''Allow'' line you can restrict access to the specified IPs. Wildcards (*) are supported and multiple ''Allow'' lines can be set up.
| The list of allowed IPs for the user. Wildcards (*) are supported.
|-
|-
| <tt>Allow = *</tt>
| <tt>Allow = *</tt>
|-
|-
| rowspan="2" | '''AltNick'''
| rowspan="2" | '''AltNick'''
| The alternate nick ZNC will use if your main nick is in use.
| The default alternate nick used if the primary nick is reserved. Networks can override the value.
|-
|-
| <tt>AltNick = somebody_</tt>
| <tt>AltNick = somebody_</tt>
|-
|-
| rowspan="2" | '''AppendTimestamp'''
| rowspan="2" | '''AppendTimestamp'''
| Whether to append the [[timestamps]] to the message or not
| Whether [[timestamps]] are appended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
|-
| <tt>AppendTimestamp = false</tt>
| <tt>AppendTimestamp = false</tt>
|-
|-
| rowspan="2" | '''AutoClearChanBuffer'''
| rowspan="2" | '''AutoClearChanBuffer'''
| If set to <code>false</code>, it will buffer channels even while you are attached, and play the whole buffer back to you each time you connect. If set to <code>true</code>, it won't buffer channels while you are attached, and the buffer will be reset upon each playback.
| Whether channel buffers are automatically cleared after playback. When disabled, messages are buffered even while clients are attached, and already seen messages may be repeated each time clients connect.
|-
|-
| <tt>AutoClearChanBuffer = true</tt>
| <tt>AutoClearChanBuffer = true</tt>
|-
|-
| rowspan="2" | '''AutoClearQueryBuffer'''
| rowspan="2" | '''AutoClearQueryBuffer'''
| If set to <code>false</code>, it will buffer queries even while you are attached, and play the whole buffer back to you each time you connect. If set to <code>true</code>, it won't buffer queries while you are attached, and the buffer will be reset upon each playback. See also [[query buffers]].
| Whether [[query buffers]] are automatically cleared after playback. When disabled, messages are buffered even while clients are attached, and already seen messages may be repeated each time clients connect.
|-
|-
| <tt>AutoClearQueryBuffer = true</tt>
| <tt>AutoClearQueryBuffer = true</tt>
|-
|-
| rowspan="2" | '''BindHost'''
| rowspan="2" | '''BindHost'''
| ...
| An optional bindhost for the user. Must be one of the values specified in the global list of allowed bindhosts.
|-
|-
| <tt>BindHost = ...</tt>
| <tt>BindHost = ...</tt>
|-
|-
| rowspan="2" | '''Buffer'''
| rowspan="2" | '''Buffer'''
| This is the amount of lines that the playback buffer will store before dropping off the oldest line. The buffers are stored in the memory by default.
| The maximum amount of lines stored for each channel or query playback buffer. The buffers are stored in memory, and oldest lines are discarded when the limit is reached. Only admin users can exceed the maximum buffer size specified in the global section.
|-
|-
| <tt>Buffer = 300</tt>
| <tt>Buffer = 300</tt>
|-
|-
| rowspan="2" | '''ChanModes'''
| rowspan="2" | '''ChanModes'''
| Default modes ZNC will set when you join an empty channel.
| The default modes ZNC sets when joining an empty channel.
|-
|-
| <tt>ChanModes = +stn</tt>
| <tt>ChanModes = +stn</tt>
|-
|-
| rowspan="2" | '''ClientEncoding'''
| rowspan="2" | '''ClientEncoding'''
| ...
| The client encoding.
|-
|-
| <tt>ClientEncoding = ...</tt>
| <tt>ClientEncoding = UTF-8</tt>
|-
|-
| rowspan="2" | '''CTCPReply'''
| rowspan="2" | '''CTCPReply'''
| A request-reply-pair for CTCP-requests. Format: <code><request> <reply></code>.
| An optional list of CTCP request-reply-pairs. Syntax: <code><request> <reply></code>.
|-
|-
| <tt>CTCPReply = VERSION unknown v1.0</tt>
| <tt>CTCPReply = VERSION unknown v1.0</tt>
|-
|-
| rowspan="2" | '''DCCBindHost'''
| rowspan="2" | '''DCCBindHost'''
| ...
| An optional bindhost for DCC connections.
|-
|-
| <tt>DCCBindHost = ...</tt>
| <tt>DCCBindHost = ...</tt>
|-
|-
| rowspan="2" | '''DenyLoadMod'''
| rowspan="2" | '''DenyLoadMod'''
| If set to <code>true</code>, the user isn't able to load modules.
| Whether the user is denied access to load modules.
|-
|-
| <tt>DenyLoadMod = false</tt>
| <tt>DenyLoadMod = false</tt>
|-
|-
| rowspan="2" | '''DenySetBindHost'''
| rowspan="2" | '''DenySetBindHost'''
| If set to <code>true</code>, the user isn't able to change his vhost.
| Whether the user is denied access to set a bindhost.
|-
|-
| <tt>DenySetBindHost = false</tt>
| <tt>DenySetBindHost = false</tt>
|-
|-
| rowspan="2" | '''Ident'''
| rowspan="2" | '''Ident'''
| ...  
| The default ident. Networks can override the value.
|-
|-
| <tt>Ident = znc</tt>
| <tt>Ident = znc</tt>
|-
|-
| rowspan="2" | '''JoinTries'''
| rowspan="2" | '''JoinTries'''
| How often should ZNC try to join if the first join failed, e.g. due to channel mode +i/+k or if you're banned.
| The amount of times channels are attempted to join in case of a failure eg. due to channel modes +i/+k/+b.
|-
|-
| <tt>JoinTries = 10</tt>
| <tt>JoinTries = 3</tt>
|-
|-
| rowspan="2" | '''LoadModule'''
| rowspan="2" | '''LoadModule'''
| Load user [[Modules|modules]] on startup.
| The list of user [[Modules|modules]] loaded on ZNC startup.
|-
|-
| <tt>LoadModule = controlpanel<br/>LoadModule = chansaver</tt>
| <tt>LoadModule = controlpanel<br/>LoadModule = chansaver</tt>
|-
|-
| rowspan="2" | '''MaxJoins'''
| rowspan="2" | '''MaxJoins'''
| How many channels should ZNC join at once. Lower this if you get disconnected for 'Excess flood.
| The maximum number of channels ZNC joins at once. Lower the value in case getting disconnected for 'Excess flood'.
|-
|-
| <tt>MaxJoins = 3</tt>
| <tt>MaxJoins = 3</tt>
|-
|-
| rowspan="2" | '''MaxNetworks'''
| rowspan="2" | '''MaxNetworks'''
| Maximum number of networks a user is allowed to have.
| The maximum number of networks the user is allowed to have.
|-
|-
| <tt>MaxNetworks = 5</tt>
| <tt>MaxNetworks = 5</tt>
|-
|-
| rowspan="2" | '''MaxQueryBuffers'''
| rowspan="2" | '''MaxQueryBuffers'''
| Maximum number of query buffers that are stored. <code>0</code> is unlimited.
| The maximum number of query buffers that are stored. <code>0</code> is unlimited.
|-
|-
| <tt>MaxQueryBuffers = 50</tt>
| <tt>MaxQueryBuffers = 50</tt>
|-
|-
| rowspan="2" | '''MultiClients'''
| rowspan="2" | '''MultiClients'''
| Set this to <code>true</code>, if you want to be able to connect with multiple clients at once.
| Whether multiple clients are allowed to connect simultaneously.
|-
|-
| <tt>MultiClients = true</tt>
| <tt>MultiClients = true</tt>
|-
|-
| rowspan="2" | '''Nick'''
| rowspan="2" | '''Nick'''
| Your primary nick.
| The default primary nick. Networks can override the value.
|-
|-
| <tt>Nick = somebody</tt>
| <tt>Nick = somebody</tt>
|-
|-
| rowspan="2" | '''PrependTimestamp'''
| rowspan="2" | '''PrependTimestamp'''
| Whether to prepend the [[timestamps]] to the message or not
| Whether [[timestamps]] are prepended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
|-
| <tt>PrependTimestamp = true</tt>
| <tt>PrependTimestamp = true</tt>
|-
|-
| rowspan="2" | '''QuitMsg'''
| rowspan="2" | '''QuitMsg'''
| The default quit message ZNC will use when you jump servers or call shutdown.
| The default quit message ZNC uses when disconnecting or shutting down. Networks can override the value.
|-
|-
| <tt>QuitMsg = ZNC - http://znc.in</tt>
| <tt>QuitMsg = ZNC - http://znc.in</tt>
|-
|-
| rowspan="2" | '''RealName'''
| rowspan="2" | '''RealName'''
| ...
| The default real name. Networks can override the value.
|-
|-
| <tt>Real Name = Got ZNC?</tt>
| <tt>Real Name = Got ZNC?</tt>
|-
|-
| rowspan="2" | '''Skin'''
| rowspan="2" | '''Skin'''
| ...
| The web interface skin.
|-
|-
| <tt>Skin = _default_</tt>
| <tt>Skin = _default_</tt>
|-
|-
| rowspan="2" | '''StatusPrefix'''
| rowspan="2" | '''StatusPrefix'''
| The prefix for the status and module queries.
| The prefix for status and module queries.
|-
|-
| <tt>StatusPrefix = *</tt>
| <tt>StatusPrefix = *</tt>
|-
|-
| rowspan="2" | '''TimestampFormat'''
| rowspan="2" | '''TimestampFormat'''
| The format for the [[timestamps]] used in buffers, for example
| The format of the [[timestamps]] used in buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
|-
| <tt>TimestampFormat = [%H:%M:%S]</tt>
| <tt>TimestampFormat = [%H:%M:%S]</tt>
|-
|-
| rowspan="2" | '''Timezone'''
| rowspan="2" | '''Timezone'''
| Set this to your local setting, so you'll get correct times in your [[timestamps]]. The format is case sensitive.
| The timezone used for [[timestamps]] in buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
|-
| <tt>Timezone = Europe/Berlin</tt>
| <tt>Timezone = Europe/Berlin</tt>
Line 339: Line 339:
=== Network ===
=== Network ===


The user definition, you can have more than one. Each user may only connect to one network, so you need a separate user for each network. This is intended behavior! (See the [[FAQ]] about multiple networks)
Definition of a network. A user can have multiple networks, up to the limit specified by '''MaxNetworks'''.


{| class="wikitable" style="width:100%"
{| class="wikitable" style="width:100%"
|-
|-
| rowspan="2" style="width:20%" | '''AltNick'''
| rowspan="2" style="width:20%" | '''AltNick'''
| Overrides the '''AltNick''' setting in the User section.
| An optional network specific alternate nick used if the primary nick is reserved.
|-
|-
| <tt>AltNick = somebody_</tt>
| <tt>AltNick = somebody_</tt>
|-
|-
| rowspan="2" | '''BindHost'''
| rowspan="2" | '''BindHost'''
| Overrides the '''BindHost''' setting in the User section.
| An optional bindhost for the network. Must be one of the values specified in the global list of allowed bindhosts.
|-
|-
| <tt>BindHost = fake.doma.in</tt>
| <tt>BindHost = ...</tt>
|-
|-
| rowspan="2" | '''Encoding'''
| rowspan="2" | '''Encoding'''
| ...
| An optional network specific encoding.
|-
|-
| <tt>Encoding = UTF-8</tt>
| <tt>Encoding = UTF-8</tt>
|-
|-
| rowspan="2" | '''FloodBurst'''
| rowspan="2" | '''FloodBurst'''
| How many lines ZNC sends at once.
| The maximum amount of lines ZNC sends at once.
|-
|-
| <tt>FloodBurst = 4</tt>
| <tt>FloodBurst = 4</tt>
|-
|-
| rowspan="2" | '''FloodRate'''
| rowspan="2" | '''FloodRate'''
| How many lines per second ZNC sends after the FloodBurst
| The number of lines per second ZNC sends after reaching the '''FloodBurst''' limit.
|-
|-
| <tt>FloodRate = 1.00</tt>
| <tt>FloodRate = 1.00</tt>
|-
|-
| rowspan="2" | '''Ident'''
| rowspan="2" | '''Ident'''
| Overrides the '''Ident''' setting in the User section.
| An optional network specific ident.
|-
|-
| <tt>Ident = znc</tt>
| <tt>Ident = znc</tt>
|-
|-
| rowspan="2" | '''IRCConnectEnabled'''
| rowspan="2" | '''IRCConnectEnabled'''
| If set to <code>false</code>, user doesn't connect to IRC servers.
| Whether the network is enabled ie. connects to IRC.
|-
|-
| <tt>IRCConnectEnabled = false</tt>
| <tt>IRCConnectEnabled = false</tt>
|-
|-
| rowspan="2" | '''JoinDelay'''
| rowspan="2" | '''JoinDelay'''
| Defines the delay in seconds, until channels are joined after getting connected.
| The delay in seconds, until channels are joined after getting connected.
|-
|-
| <tt>JoinDelay = 0</tt>
| <tt>JoinDelay = 0</tt>
|-
|-
| rowspan="2" | '''LoadModule'''
| rowspan="2" | '''LoadModule'''
| Load network [[Modules|modules]] on startup.
| The list of network [[Modules|modules]] loaded on ZNC startup.
|-
|-
| <tt>LoadModule = simple_away<br/>LoadModule = route_replies</tt>
| <tt>LoadModule = simple_away<br/>LoadModule = route_replies</tt>
|-
|-
| rowspan="2" | '''Nick'''
| rowspan="2" | '''Nick'''
| Overrides the '''Nick''' setting in the User section.
| An optional network specific primary nick.
|-
|-
| <tt>Nick = somebody</tt>
| <tt>Nick = somebody</tt>
|-
|-
| rowspan="2" | '''QuitMsg'''
| rowspan="2" | '''QuitMsg'''
| Overrides the '''QuitMsg''' setting in the User section.
| An optional network specific quit message  ZNC uses when disconnecting or shutting down.
|-
|-
| <tt>QuitMsg = ZNC - http://znc.in</tt>
| <tt>QuitMsg = ZNC - http://znc.in</tt>
|-
|-
| rowspan="2" | '''RealName'''
| rowspan="2" | '''RealName'''
| Overrides the '''RealName''' setting in the User section.
| An optional network specific real name.
|-
|-
| <tt>RealName = Got ZNC?</tt>
| <tt>RealName = Got ZNC?</tt>
|-
|-
| rowspan="2" | '''Server'''
| rowspan="2" | '''Server'''
| Adds a server to the list of servers this user will be able to connect to. If you want ZNC to connect to the IRC server using SSL, put '+' in front of the port number. The IP can be IPv6. If the server requires a password, just add it as the third argument.
| The list of IRC servers. Prefix the port number with a '+' to enable SSL. Syntax: <code><host> [[+]port] [password]</code>.
|-
|-
| <tt>Server = irc.freenode.net +6697</tt>
| <tt>Server = irc.freenode.net +6697</tt>
Line 416: Line 416:
|-
|-
| rowspan="2" style="width:20%" | '''AutoClearChanBuffer'''
| rowspan="2" style="width:20%" | '''AutoClearChanBuffer'''
| Overrides the User-level '''AutoClearChanBuffer''' setting.
| Whether the channel specific buffer is automatically cleared after playback.
|-
|-
| <tt>AutoClearChanBuffer = false</tt>
| <tt>AutoClearChanBuffer = false</tt>
|-
|-
| rowspan="2" | '''Buffer'''
| rowspan="2" | '''Buffer'''
| Overrides the User-level '''Buffer''' setting.
| The maximum amount of lines stored for the channel specific playback buffer.
|-
|-
| <tt>Buffer = 100</tt>
| <tt>Buffer = 100</tt>
|-
|-
| rowspan="2" | '''Detached'''
| rowspan="2" | '''Detached'''
| Whether the channel is [[Detaching|detached]] ie. visible to clients.
| Whether the channel is [[Detaching|detached]]. Detached channels are not visible to clients.
|-
|-
| <tt>Detached = true</tt>
| <tt>Detached = true</tt>
|-
|-
| rowspan="2" | '''Disabled'''
| rowspan="2" | '''Disabled'''
| Whether ZNC joins the channel.
| Whether the channel is disabled. ZNC does not join disabled channels.
|-
|-
| <tt>Disabled = true</tt>
| <tt>Disabled = true</tt>
Line 441: Line 441:
|-
|-
| rowspan="2" | '''Modes'''
| rowspan="2" | '''Modes'''
| Overrides the User-level '''ChanModes''' setting.
| An optional set of default channel modes ZNC sets when joining an empty channel.
|-
|-
| <tt>Modes = +stn</tt>
| <tt>Modes = +stn</tt>
Line 458: Line 458:
|-
|-
| rowspan="2" | '''Method'''
| rowspan="2" | '''Method'''
| The hashing method.
| The password hashing method.
|-
|-
| <tt>Method = sha256</tt>
| <tt>Method = sha256</tt>
|-
|-
| rowspan="2" | '''Salt'''
| rowspan="2" | '''Salt'''
| Random 20 characters for salting the password.
| A random set of 20 characters for salting the password.
|-
|-
| <tt>Salt = ,e9a+t9WwSCjR_5:XAQu</tt>
| <tt>Salt = ,e9a+t9WwSCjR_5:XAQu</tt>

Revision as of 17:56, 31 October 2014

Creating a config file

To generate a basic configuration file, run znc --makeconf after installation. It is NOT a good idea to create a new config file manually, please use znc --makeconf!

File locations

  • Configuration - ZNC gets its configuration by reading the file ~/.znc/configs/znc.conf.
  • Misc - Other files are also stored in the ~/.znc directory, such as the SSL certificate (znc.pem) and the PidFile (znc.pid).
  • Local Modules - Stored in ~/.znc/modules. ZNC will look in the local module directory first when trying to load a module.
  • Global Modules - Stored in /usr/local/lib/znc by default (where /usr/local is the prefix you chose). This is /usr/lib/znc if you used the Debian package.
  • Binaries - znc, znc-config, and znc-buildmod are all stored in /usr/local/bin (or in /usr/bin) by default. You can change this when you configure by using ./configure --prefix=/whatever/path/you/want.

Editing config

In most cases you should NOT edit znc.conf directly. Use webadmin instead.

If you really need to edit znc.conf by hand, do the following:

  1. pkill -SIGUSR1 znc
    to save current runtime configuration to znc.conf
  2. pkill znc
    to shutdown running ZNC instance
  3. Edit znc.conf
  4. znc
    to start it again with new configuration

Config file structure

The following pseudo content illustrates the config structure with single listener, user, network and channel. Naturally, there can be multiple instances of each.

Key = Value

<Listener name>
    Key = Value
</Listener>

<User name>
    Key = Value

    <Network name>
        Key = Value

        <Chan name>
            Key = Value
        </Chan>
    </Network>
    
    <Pass password>
        Key = Value
    </Pass>
</User>

Config file settings

ZNC 1.6 configuration file consists of the following settings. All values are examples.

Global

AnonIPLimit The limit of anonymous unidentified connections per IP.
AnonIPLimit = 10
BindHost The list of allowed bindhosts. Users can select one of these values.
BindHost = ...
BindHost = ...
ConnectDelay The number of seconds every IRC connection is delayed. IRC servers may refuse a connection when reconnecting too fast. NOTE: Affects connections between ZNC and IRC servers; not connections between IRC clients and ZNC.
ConnectDelay = 5
LoadModule The list of global modules loaded on ZNC startup.
LoadModule = webadmin
LoadModule = modperl
LoadModule = modpython
MaxBufferSize The maximum playback buffer size. Only admin users can exceed the limit.
MaxBufferSize = 500
Motd The list of "message of the day" lines that are sent to clients on connect via notice from *status.
Motd = ...
Motd = ...
PidFile An optional PID file location. See the FAQ for how to crontab ZNC.
PidFile = /home/znc/.znc/znc.pid
ProtectedWebSessions Whether IP changing during each web session is disallowed.
ProtectedWebSessions = true
ServerThrottle The number of seconds between connect attempts to the same hostname.
ServerThrottle = 30
Skin The default web interface skin. Users can override the value.
Skin = _default_
SSLCertFile The TLS/SSL certificate file from which ZNC reads its server certificate.
SSLCertFile = /home/znc/.znc/znc.pem
SSLCiphers The allowed SSL ciphers.
SSLCiphers = RC4:HIGH:!aNULL:!MD5
StatusPrefix The default prefix for status and module queries. Users can override the value.
StatusPrefix = *
TrustedProxy The list of trusted proxies.
TrustedProxy = ...
TrustedProxy = ...
Version The version of ZNC that was used to write the config file.
Version = 1.6.0

Listener

Definition of a port that ZNC listens on. There can be multiple ports, and they can allow different protocols.

AllowIRC Whether the port allows IRC connections.
AllowIRC = true
AllowWeb Whether the port allows web connections.
AllowWeb = true
Host An optional host or IP on which ZNC listens.
Host = ...
IPv4 Whether the port listens using IPv4.
IPv4 = true
IPv6 Whether the port listens using IPv6.
IPv6 = true
Port The port number. WARNING: Some web browsers reject port 6667.
Port = 12345
SSL Whether the port is listening using SSL.
SSL = true
URIPrefix An optional URI prefix for the ZNC web interface. Can be used to make ZNC available behind a reverse proxy.
URIPrefix = /znc/

User

Definition of a user. There can be multiple users and each can have multiple networks.

Admin Whether the user has admin rights.
Admin = true
Allow The list of allowed IPs for the user. Wildcards (*) are supported.
Allow = *
AltNick The default alternate nick used if the primary nick is reserved. Networks can override the value.
AltNick = somebody_
AppendTimestamp Whether timestamps are appended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
AppendTimestamp = false
AutoClearChanBuffer Whether channel buffers are automatically cleared after playback. When disabled, messages are buffered even while clients are attached, and already seen messages may be repeated each time clients connect.
AutoClearChanBuffer = true
AutoClearQueryBuffer Whether query buffers are automatically cleared after playback. When disabled, messages are buffered even while clients are attached, and already seen messages may be repeated each time clients connect.
AutoClearQueryBuffer = true
BindHost An optional bindhost for the user. Must be one of the values specified in the global list of allowed bindhosts.
BindHost = ...
Buffer The maximum amount of lines stored for each channel or query playback buffer. The buffers are stored in memory, and oldest lines are discarded when the limit is reached. Only admin users can exceed the maximum buffer size specified in the global section.
Buffer = 300
ChanModes The default modes ZNC sets when joining an empty channel.
ChanModes = +stn
ClientEncoding The client encoding.
ClientEncoding = UTF-8
CTCPReply An optional list of CTCP request-reply-pairs. Syntax: <request> <reply>.
CTCPReply = VERSION unknown v1.0
DCCBindHost An optional bindhost for DCC connections.
DCCBindHost = ...
DenyLoadMod Whether the user is denied access to load modules.
DenyLoadMod = false
DenySetBindHost Whether the user is denied access to set a bindhost.
DenySetBindHost = false
Ident The default ident. Networks can override the value.
Ident = znc
JoinTries The amount of times channels are attempted to join in case of a failure eg. due to channel modes +i/+k/+b.
JoinTries = 3
LoadModule The list of user modules loaded on ZNC startup.
LoadModule = controlpanel
LoadModule = chansaver
MaxJoins The maximum number of channels ZNC joins at once. Lower the value in case getting disconnected for 'Excess flood'.
MaxJoins = 3
MaxNetworks The maximum number of networks the user is allowed to have.
MaxNetworks = 5
MaxQueryBuffers The maximum number of query buffers that are stored. 0 is unlimited.
MaxQueryBuffers = 50
MultiClients Whether multiple clients are allowed to connect simultaneously.
MultiClients = true
Nick The default primary nick. Networks can override the value.
Nick = somebody
PrependTimestamp Whether timestamps are prepended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
PrependTimestamp = true
QuitMsg The default quit message ZNC uses when disconnecting or shutting down. Networks can override the value.
QuitMsg = ZNC - http://znc.in
RealName The default real name. Networks can override the value.
Real Name = Got ZNC?
Skin The web interface skin.
Skin = _default_
StatusPrefix The prefix for status and module queries.
StatusPrefix = *
TimestampFormat The format of the timestamps used in buffer playback messages. NOTE: Only used for clients that do not support server-time.
TimestampFormat = [%H:%M:%S]
Timezone The timezone used for timestamps in buffer playback messages. NOTE: Only used for clients that do not support server-time.
Timezone = Europe/Berlin

Network

Definition of a network. A user can have multiple networks, up to the limit specified by MaxNetworks.

AltNick An optional network specific alternate nick used if the primary nick is reserved.
AltNick = somebody_
BindHost An optional bindhost for the network. Must be one of the values specified in the global list of allowed bindhosts.
BindHost = ...
Encoding An optional network specific encoding.
Encoding = UTF-8
FloodBurst The maximum amount of lines ZNC sends at once.
FloodBurst = 4
FloodRate The number of lines per second ZNC sends after reaching the FloodBurst limit.
FloodRate = 1.00
Ident An optional network specific ident.
Ident = znc
IRCConnectEnabled Whether the network is enabled ie. connects to IRC.
IRCConnectEnabled = false
JoinDelay The delay in seconds, until channels are joined after getting connected.
JoinDelay = 0
LoadModule The list of network modules loaded on ZNC startup.
LoadModule = simple_away
LoadModule = route_replies
Nick An optional network specific primary nick.
Nick = somebody
QuitMsg An optional network specific quit message ZNC uses when disconnecting or shutting down.
QuitMsg = ZNC - http://znc.in
RealName An optional network specific real name.
RealName = Got ZNC?
Server The list of IRC servers. Prefix the port number with a '+' to enable SSL. Syntax: <host> [[+]port] [password].
Server = irc.freenode.net +6697

Chan

Channels you want ZNC to join when connecting.

AutoClearChanBuffer Whether the channel specific buffer is automatically cleared after playback.
AutoClearChanBuffer = false
Buffer The maximum amount of lines stored for the channel specific playback buffer.
Buffer = 100
Detached Whether the channel is detached. Detached channels are not visible to clients.
Detached = true
Disabled Whether the channel is disabled. ZNC does not join disabled channels.
Disabled = true
Key An optional channel key.
Key = secret
Modes An optional set of default channel modes ZNC sets when joining an empty channel.
Modes = +stn

Pass

Used by the client to connect to ZNC. A hash may be generated using znc --makepass.

Hash The hash of a salted password.
Hash = 44ccdd8655fb2c9bf8e6026fc51dfeabfd3e361f696c9373c00a496a4dcaed6f
Method The password hashing method.
Method = sha256
Salt A random set of 20 characters for salting the password.
Salt = ,e9a+t9WwSCjR_5:XAQu

Config file change history

Added in 1.6

  • SSLCiphers and TrustedProxy (Global)
  • URIPrefix (Listener)
  • AutoClearQueryBuffer, ClientEncoding, and MaxQueryBuffers (User)
  • Encoding, JoinDelay and QuitMsg (Network)
  • Disabled (Chan)

Added in 1.2

  • MaxJoins (User)

Older pre 1.x settings

  • DCCVHost - This is the IP address used for DCC bouncing.
  • BounceDCCs - If set to true, the DCCs will be bounced by ZNC.
  • DCCLookupMethod - If set to default, ZNC will use the IP the clients sends for the DCC connections; if set to client, ZNC will use the IP the client connects from.
  • Listener = [web_only|irc_only] [host or IP] [+]port - Configuration of listening port. Use web_only or irc_only, if you don't want port to be universal. Put host/IP before the port with a space between to bind to a specific IP (notice that in this case the listener can't listen on both ipv4 and ipv6). Then goes the port ZNC will listen on. If the port is prepended with a '+' (without space) then ZNC listens using SSL. You can have several listeners in one ZNC. (Introduced in 0.090, see next chapter for older versions)
  • Listener4 or Listener6 - Exactly the same as Listener, but will use only IPv4 or IPv6.
  • ISpoofFile - ZNC will write the ident of the user trying to connect to this file. Very useful if your shell supports oidentd.
  • ISpoofFormat - The format of the ISpoofFile.

Before 0.096

  • BindHost was named vHost

Before 0.090:

  • Listen was similar to Listener4 from last version, without irc_only/web_only support.
  • Listen6 was similar to Listener or Listener6 (depending on your OS) from last version, without irc_only/web_only support.
  • TODO: When did Listeners become their own substructure?