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.

Installation and Configuration: Difference between pages

From ZNC
(Difference between pages)
Jump to navigation Jump to search
build cmake
 
add NoTrafficTimeout
 
Line 1: Line 1:
{{Languages|Installation}}
{{Languages|Configuration}}
There are several possibilities to install ZNC on your machine. The latest version is always available using the source tarball from https://znc.in/releases.


A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.
== Creating a config file ==
You can also read more about [[Portability|ZNC's portability]].
To generate a basic configuration file, run <code>znc --makeconf</code> after installation.
It is NOT a good idea to create a new config file manually, please use <code>znc --makeconf</code>!


;Which way should I choose for installing ZNC?
== File locations ==
:If you don't have root access, the only way is to use [[#Source Tarball|source tarball]]. You'll need to use <code>./configure --prefix="$HOME/.local"</code> as described.
:If you have root access, you can use either [[#Source Tarball|source tarball]] or the convenient way for your distro. Check section about your distro for details, but be aware that these may contain old versions of ZNC!


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


== Development Versions ==
== Editing config ==
Read the [[git]] page if you want to get the current development version. Beware that this might have more bugs, more features, be a little unstable and eat your first born. You have been warned!
In most cases you '''should NOT''' edit znc.conf directly.
Use [[webadmin]] instead.


== Source Tarball ==
If you ''really'' need to edit znc.conf by hand, do the following:
Official source tarballs can be found [https://znc.in/releases/ here].
# pkill -SIGUSR1 znc
#: to save current runtime configuration to znc.conf
# pkill znc
#: to shutdown running ZNC instance
# Edit znc.conf
# znc
#: to start it again with new configuration


If you want to compile ZNC with OpenSSL support, you need the OpenSSL development package. On Debian/Ubuntu this is called '''libssl-dev''', on CentOS/Fedora/Red Hat it's '''openssl-devel''', and on openSUSE it's '''libopenssl-devel'''.
== Config file structure ==
A good way to install this and other dependencies is the build dependency feature of package managers (<code>apt-get build-dep</code> / <code>yum-builddep</code> / <code>zypper source-install --build-deps-only</code>).


# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]
The following pseudo content illustrates the config structure with single listener, user, network and channel. Naturally, there can be multiple instances of each.
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code>
# <code>cd znc-{{ZNC-Version}}</code>
# <code>./configure</code><br />(use '''<code>--prefix="$HOME/.local"</code>''' ('''<code>cmake -DCMAKE_INSTALL_PREFIX="$HOME/.local"</code>''') if you don't want a system wide installation or simply don't have root access; use <code>--with-openssl=/path/to/openssl</code> (<code>cmake -DOPENSSL_ROOT_DIR=/path/to/openssl</code>) if you have a non-standard SSL path)<br />(use <code>--help</code> to see other configure options)
# <code>make</code><br />(if you are on a dedicated server and your CPU has more than one core, you can use <code>make -jX</code> where X is the number of CPU cores to speed up compilation)
# <code>make install</code>


''Please note that compiling can take 5-10 minutes or more.''
<pre>
Key = Value


Once you have installed znc, you can use <code>znc --makeconf</code> to make a configuration file for ZNC. This config is stored in ~/.znc under the user you run it as. You should create a dedicated non root user to run znc under.
<Listener name>
    Key = Value
</Listener>


ZNC is run by just executing <code>znc</code> under the dedicated znc user, at which stage it goes to background. It does automatically not make an init.d service for itself (which can be done by following the instructions to [[running ZNC as a system daemon]]) nor does it need to be run in screen or something similar.
<User name>
    Key = Value


;See the [[FAQ|FAQ page]] if you encounter problems.
    <Network name>
        Key = Value


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


=== Docker ===
== Config file settings ==
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:


<code>docker pull znc</code>
ZNC 1.6 configuration file consists of the following settings. All values are examples.


Follow the link above for additional instructions.
=== Global ===


=== Debian ===
{| class="wikitable" style="width:100%"
{{ambox | type = delete | text = Prior to Debian Sid (Unstable) including Wheezy the ZNC packages included in the repositories for those older releases are '''extremely old'''. There could be '''security issues and even bugs in the code'''. If you are having issues with ZNC from your Debian package manager (prior to Sid), it is recommended to uninstall that package and build from source, or use the third-party repository (noted below).}}
|-
| rowspan="2" style="width:20%" | '''AnonIPLimit'''
| The limit of anonymous unidentified connections per IP.
|-
| <tt>AnonIPLimit = 10</tt>
|-
| rowspan="2" | '''BindHost'''
| The list of allowed bindhosts. Users can select one of these values.
|-
| <tt>BindHost = ...<br/>BindHost = ...</tt>
|-
| rowspan="2" | '''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.
|-
| <tt>ConnectDelay = 5</tt>
|-
| rowspan="2" | '''HideVersion'''<br/><sub>(since 1.6)</sub>
| Whether the version number is hidden from the web interface and CTCP VERSION replies.
|-
| <tt>HideVersion = true</tt>
|-
| rowspan="2" | '''LoadModule'''
| The list of global [[Modules|modules]] loaded on ZNC startup.
|-
| <tt>LoadModule = webadmin<br/>LoadModule = modperl<br/>LoadModule = modpython</tt>
|-
| rowspan="2" | '''MaxBufferSize'''
| The maximum playback buffer size. Only admin users can exceed the limit.
|-
| <tt>MaxBufferSize = 500</tt>
|-
| rowspan="2" | '''Motd'''
| The list of "message of the day" lines that are sent to clients on connect via notice from *status.
|-
| <tt>Motd = ...<br/>Motd = ...</tt>
|-
| rowspan="2" | '''PidFile'''
| 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>
|-
| rowspan="2" | '''ProtectWebSessions'''
| Whether IP changing during each web session is disallowed.
|-
| <tt> ProtectWebSessions = true</tt>
|-
| rowspan="2" | '''ServerThrottle'''
| The number of seconds between connect attempts to the same hostname.
|-
| <tt>ServerThrottle = 30</tt>
|-
| rowspan="2" | '''Skin'''
| The default web interface skin. Users can override the value.
|-
| <tt>Skin = _default_</tt>
|-
| rowspan="2" | '''SSLCertFile'''
| The file with SSL/TLS certificate, used for ZNC's listening port. Defaults to ~/.znc/znc.pem
|-
| <tt>SSLCertFile = /home/znc/.znc/znc.pem</tt>
|-
| rowspan="2" | '''SSLCiphers'''<br/><sub>(since 1.6)</sub>
| The allowed [https://www.openssl.org/docs/apps/ciphers.html SSL ciphers]. Default value is from [https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 Mozilla's recomendations]
|-
| <tt>SSLCiphers = EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH</tt>
|-
| rowspan="2" | '''SSLDHParamFile'''<br/><sub>(since 1.7)</sub>
| The file with Diffie-Hellman parameters of SSL/TLS, used for ZNC's listening port. Defaults to ~/.znc/znc.pem. If the file doesn't contain DH parameters, ciphers which use DH can't be used.
|-
| <tt>SSLDHParamFile = /home/znc/.znc/znc.pem</tt>
|-
| rowspan="2" | '''SSLKeyFile'''<br/><sub>(since 1.7)</sub>
| The file with private key of SSL/TLS certificate, used for ZNC's listening port. Defaults to ~/.znc/znc.pem
|-
| <tt>SSLKeyFile = /home/znc/.znc/znc.pem</tt>
|-
| rowspan="2" | '''SSLProtocols'''<br/><sub>(since 1.6)</sub>
| The accepted SSL protocols. Available protocols are All, SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2. A non-prefixed value overrides any existing values, whereas a '-' or '+' prefixed value disables or enables an additional protocol. It is recommended to keep the ZNC defaults that may change in future versions, and only disable (or enable) additional protocols if necessary. NOTE: ZNC 1.6 disables SSLv2 and SSLv3 by default.
|-
| <tt>SSLProtocols = -SSLv2 -SSLv3 -TLSv1 +TLSv1.1 +TLSv1.2</tt>
|-
| rowspan="2" | '''StatusPrefix'''
| The default prefix for status and module queries. Users can override the value.
|-
| <tt>StatusPrefix = *</tt>
|-
| rowspan="2" | '''TrustedProxy'''<br/><sub>(since 1.6)</sub>
| The list of trusted proxies.
|-
| <tt>TrustedProxy = ...<br/>TrustedProxy = ...</tt>
|-
| rowspan="2" | '''Version'''
| The version of ZNC that was used to write the config file.
|-
| <tt>Version = 1.6.0</tt>
|}


Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using (stretch/stable, buster/testing, sid)
=== Listener ===
apt install znc


Debian Jessie LTS [https://wiki.debian.org/Backports#Using_the_command_line backports]
Definition of a port that ZNC listens on. There can be multiple ports, and they can allow different protocols.
apt -t jessie-backports install znc


If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:
{| class="wikitable" style="width:100%"
  build-essential
|-
  libssl-dev
| rowspan="2" style="width:20%" | '''AllowIRC'''
libperl-dev
| Whether the port allows IRC connections.
pkg-config
|-
libicu-dev
| <tt>AllowIRC = true</tt>
|-
| rowspan="2" | '''AllowWeb'''
| Whether the port allows web connections.
|-
| <tt>AllowWeb = true</tt>
|-
| rowspan="2" | '''Host'''
| An optional host or IP on which ZNC listens.
|-
| <tt>Host = ...</tt>
|-
| rowspan="2" | '''IPv4'''
| Whether the port listens using IPv4.
|-
| <tt>IPv4 = true</tt>
|-
| rowspan="2" | '''IPv6'''
| Whether the port listens using IPv6.
|-
| <tt>IPv6 = true</tt>
|-
| rowspan="2" | '''Port'''
| The port number. WARNING: Some web browsers reject port 6667.
|-
| <tt>Port = 12345</tt>
|-
| rowspan="2" | '''SSL'''
| Whether the port is listening using SSL.
|-
| <tt>SSL = true</tt>
|-
| rowspan="2" | '''URIPrefix'''<br/><sub>(since 1.6)</sub>
| An optional URI prefix for the ZNC web interface. Can be used to make ZNC available behind a reverse proxy.
|-
| <tt>URIPrefix = /znc/</tt>
|}


You can use the command
=== User ===
aptitude build-dep znc
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.


=== Fedora/CentOS/Red Hat Enterprise Linux ===
Definition of a user. There can be multiple users and each can have multiple networks.
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.


If using RHEL install the EPEL repository by downloading the appropriate package linked on [https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F EPEL's website].
{| class="wikitable" style="width:100%"
|-
| rowspan="2" style="width:20%" | '''Admin'''
| Whether the user has admin rights.
|-
| <tt>Admin = true</tt>
|-
| rowspan="2" | '''Allow'''
| The list of allowed IPs for the user. Wildcards (*) are supported.
|-
| <tt>Allow = *</tt>
|-
| rowspan="2" | '''AltNick'''
| The default alternate nick used if the primary nick is reserved. Networks can override the value.
|-
| <tt>AltNick = somebody_</tt>
|-
| rowspan="2" | '''AppendTimestamp'''
| Whether [[timestamps]] are appended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
| <tt>AppendTimestamp = false</tt>
|-
| rowspan="2" | '''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.
|-
| <tt>AutoClearChanBuffer = true</tt>
|-
| rowspan="2" | '''AutoClearQueryBuffer'''<br/><sub>(since 1.6)</sub>
| 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>
|-
| 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>
|-
| rowspan="2" | '''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.
|-
| <tt>Buffer = 300</tt>
|-
| rowspan="2" | '''ChanBufferSize'''<br/><sub>(since 1.7)</sub>
| The maximum amount of lines stored for each channel 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> ChanBufferSize = 300</tt>
|-
| rowspan="2" | '''ChanModes'''
| The default modes ZNC sets when joining an empty channel.
|-
| <tt>ChanModes = +stn</tt>
|-
| rowspan="2" | '''ClientEncoding'''<br/><sub>(since 1.6)</sub>
| The client encoding.
|-
| <tt>ClientEncoding = UTF-8</tt>
|-
| rowspan="2" | '''CTCPReply'''
| An optional list of CTCP request-reply-pairs. Syntax: <tt><request> <reply></tt>.
|-
| <tt>CTCPReply = VERSION unknown v1.0</tt>
|-
| rowspan="2" | '''DCCBindHost'''
| An optional bindhost for DCC connections.
|-
| <tt>DCCBindHost = ...</tt>
|-
| rowspan="2" | '''DenyLoadMod'''
| Whether the user is denied access to load modules.
|-
| <tt>DenyLoadMod = false</tt>
|-
| rowspan="2" | '''DenySetBindHost'''
| Whether the user is denied access to set a bindhost.
|-
| <tt>DenySetBindHost = false</tt>
|-
| rowspan="2" | '''Ident'''
| The default ident. Networks can override the value.
|-
| <tt>Ident = znc</tt>
|-
| rowspan="2" | '''JoinTries'''
| The amount of times channels are attempted to join in case of a failure eg. due to channel modes +i/+k/+b.
|-
| <tt>JoinTries = 3</tt>
|-
| rowspan="2" | '''Language'''<br/><sub>(since 1.7)</sub>
| Language of UI translation shown for this user. If not specified, English is used.
|-
| <tt>Language = ru-RU</tt>
|-
| rowspan="2" | '''LoadModule'''
| The list of user [[Modules|modules]] loaded on ZNC startup.
|-
| <tt>LoadModule = controlpanel<br/>LoadModule = chansaver</tt>
|-
| rowspan="2" | '''MaxJoins'''<br/><sub>(since 1.2)</sub>
| The maximum number of channels ZNC joins at once. Lower the value in case getting disconnected for 'Excess flood'.
|-
| <tt>MaxJoins = 3</tt>
|-
| rowspan="2" | '''MaxNetworks'''
| The maximum number of networks the user is allowed to have.
|-
| <tt>MaxNetworks = 5</tt>
|-
| rowspan="2" | '''MaxQueryBuffers'''<br/><sub>(since 1.6)</sub>
| The maximum number of query buffers that are stored. <code>0</code> is unlimited.
|-
| <tt>MaxQueryBuffers = 50</tt>
|-
| rowspan="2" | '''MultiClients'''
| Whether multiple clients are allowed to connect simultaneously.
|-
| <tt>MultiClients = true</tt>
|-
| rowspan="2" | '''Nick'''
| The default primary nick. Networks can override the value.
|-
| <tt>Nick = somebody</tt>
|-
| rowspan="2" | '''NoTrafficTimeout'''<br/><sub>(since 1.7)</sub>
| How much time ZNC waits (in seconds) until it receives something from network or declares the connection timeout. This happens after attempts to ping the peer.
|-
| <tt>NoTrafficTimeout = 180</tt>
|-
| rowspan="2" | '''PrependTimestamp'''
| Whether [[timestamps]] are prepended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
|-
| <tt>PrependTimestamp = true</tt>
|-
| rowspan="2" | '''QueryBufferSize'''<br/><sub>(since 1.7)</sub>
| The maximum amount of lines stored for each 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> QueryBufferSize = 300</tt>
|-
| rowspan="2" | '''QuitMsg'''
| The default quit message ZNC uses when disconnecting or shutting down. Networks can override the value.
|-
| <tt>QuitMsg = ZNC - http://znc.in</tt>
|-
| rowspan="2" | '''RealName'''
| The default real name. Networks can override the value.
|-
| <tt>Real Name = Got ZNC?</tt>
|-
| rowspan="2" | '''Skin'''
| The web interface skin.
|-
| <tt>Skin = _default_</tt>
|-
| rowspan="2" | '''StatusPrefix'''
| The prefix for status and module queries.
|-
| <tt>StatusPrefix = *</tt>
|-
| rowspan="2" | '''TimestampFormat'''
| 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>
|-
| rowspan="2" | '''Timezone'''
| 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>
|}


Once you have EPEL installed (or are on Fedora), execute:
=== Network ===
sudo yum install znc
or dnf
sudo dnf install znc


Once installed you can configure znc by running:
Definition of a network. A user can have multiple networks, up to the limit specified by '''MaxNetworks'''.
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''


Then finally to start it you can run:
{| class="wikitable" style="width:100%"
  sudo systemctl start znc # or ''enable'' if you want it to autostart
|-
| rowspan="2" style="width:20%" | '''AltNick'''
| An optional network specific alternate nick used if the primary nick is reserved.
|-
| <tt>AltNick = somebody_</tt>
|-
| rowspan="2" | '''BindHost'''
| An optional bindhost for the network. Must be one of the values specified in the global list of allowed bindhosts.
|-
| <tt>BindHost = ...</tt>
|-
| rowspan="2" | '''Encoding'''<br/><sub>(since 1.6)</sub>
| An optional network specific encoding.
|-
| <tt>Encoding = UTF-8</tt>
|-
| rowspan="2" | '''FloodBurst'''
| The maximum amount of lines ZNC sends at once.
|-
| <tt>FloodBurst = 4</tt>
|-
| rowspan="2" | '''FloodRate'''
| The seconds between lines ZNC sends after reaching the '''FloodBurst''' limit.
|-
| <tt>FloodRate = 1.00</tt>
|-
| rowspan="2" | '''Ident'''
| An optional network specific ident.
|-
| <tt>Ident = znc</tt>
|-
| rowspan="2" | '''IRCConnectEnabled'''
| Whether the network is enabled ie. connects to IRC.
|-
| <tt>IRCConnectEnabled = false</tt>
|-
| rowspan="2" | '''JoinDelay'''<br/><sub>(since 1.6)</sub>
| The delay in seconds, until channels are joined after getting connected.
|-
| <tt>JoinDelay = 0</tt>
|-
| rowspan="2" | '''LoadModule'''
| The list of network [[Modules|modules]] loaded on ZNC startup.
|-
| <tt>LoadModule = simple_away<br/>LoadModule = route_replies</tt>
|-
| rowspan="2" | '''Nick'''
| An optional network specific primary nick.
|-
| <tt>Nick = somebody</tt>
|-
| rowspan="2" | '''QuitMsg'''<br/><sub>(since 1.6)</sub>
| An optional network specific quit message ZNC uses when disconnecting or shutting down.
|-
| <tt>QuitMsg = ZNC - http://znc.in</tt>
|-
| rowspan="2" | '''RealName'''
| An optional network specific real name.
|-
| <tt>RealName = Got ZNC?</tt>
|-
| rowspan="2" | '''Server'''
| The list of IRC servers. Prefix the port number with a '+' to enable SSL. Syntax: <tt><host> [[+]port] [password]</tt>.
|-
| <tt>Server = irc.freenode.net +6697</tt>
|-
| rowspan="2" | '''TrustedServerFingerprint'''<br/><sub>(since 1.6)</sub>
| The list of trusted server fingerprints.
|-
| <tt>TrustedServerFingerprint = fi:ng:er</tt>
|}


==== Build from Source: CentOS 7+ only ====
=== Chan ===


If you really wish to build from source, then please follow the instructions [https://wiki.znc.in/User:Teward/ZNC_From_Source:_CentOS_7 here, written by Thomas Ward].  Note that these instructions do utilize the EPEL repository in order to get all the necessary build dependencies (and there's a lot of them).  These instructions work properly to create a basic ZNC installation. CentOS 7 or newer is needed because of the C++ standards being used, and older CentOS not having the required compilers for those standards.
Definition of a channel that ZNC joins when it connects to IRC. A network can have multiple channels.


=== Ubuntu ===
{| class="wikitable" style="width:100%"
[http://packages.ubuntu.com/search?keywords=znc&searchon=names&exact=1&suite=all&section=all This page lists all of the ZNC packages in the Ubuntu repositories.]
|-
| rowspan="2" style="width:20%" | '''AutoClearChanBuffer'''
| Whether the channel specific buffer is automatically cleared after playback.
|-
| <tt>AutoClearChanBuffer = false</tt>
|-
| rowspan="2" | '''Buffer'''
| The maximum amount of lines stored for the channel specific playback buffer.
|-
| <tt>Buffer = 100</tt>
|-
| rowspan="2" | '''Detached'''
| Whether the channel is [[Detaching|detached]]. Detached channels are not visible to clients.
|-
| <tt>Detached = true</tt>
|-
| rowspan="2" | '''Disabled'''<br/><sub>(since 1.6)</sub>
| Whether the channel is disabled. ZNC does not join disabled channels.
|-
| <tt>Disabled = true</tt>
|-
| rowspan="2" | '''Key'''
| An optional channel key.
|-
| <tt>Key = secret</tt>
|-
| rowspan="2" | '''Modes'''
| An optional set of default channel modes ZNC sets when joining an empty channel.
|-
| <tt>Modes = +stn</tt>
|}


You can either build ZNC from source, or use a PPA that was made by a community member to contain pre-built ZNC packages for all supported Ubuntu releases.  '''Note that the PPA does not contain packages for every Ubuntu release''', and the support dates for various Ubuntu versions is detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|here]].  If the release of Ubuntu you are on is not supported on the PPA, you will have to compile it from source yourself.
=== Pass ===


==== Build From Source ====
Definition of a password, used by clients to connect to ZNC. Generated using <code>znc --makepass</code>.
If you want to build znc from source to get a newer version than Ubuntu provides, you may need to determine capability of your system to build ZNC 1.6.0 (and newer) based on the version of Ubuntu.


===== Building from Git Master =====
{| class="wikitable alternating" style="width:100%"
{{ambox | type = notice | text = If you are building from a source tarball for a stable release, '''skip this section'''''.  It is only needed for those building the development release (the master branch) on [[Git]].}}
|-
| rowspan="2" style="width:20%" | '''Hash'''
| The hash of a salted password.
|-
| <tt>Hash = 44ccdd8655fb2c9bf8e6026fc51dfeabfd3e361f696c9373c00a496a4dcaed6f</tt>
|-
| rowspan="2" | '''Method'''
| The password hashing method.
|-
| <tt>Method = sha256</tt>
|-
| rowspan="2" | '''Salt'''
| A random set of 20 characters for salting the password.
|-
| <tt>Salt = ,e9a+t9WwSCjR_5:XAQu</tt>
|}


If you are trying to use the Git master version of the source code, then you will also need to ensure the following packages are also installed.  You will '''not''' need to install these if you are using a stable release tarball, only if you are using Git master:
== Config file change history ==
aclocal
pkg-config
automake
autoconf


After you have installed these packages, then continue onward for the additional dependencies you will need.
=== Added in 1.7 ===
* '''SSLDHParamFile''' and '''SSLKeyFile''' (Global)
* '''Language''', '''ChanBufferSize''' and '''QueryBufferSize''' (User)
* '''AuthOnlyViaModule''' (Global, User)


After installing dependencies, you will have to run autogen.sh to generate the configure script.
=== Added in 1.6 ===
* '''HideVersion''', '''SSLCiphers''', '''SSLProtocols''' and '''TrustedProxy''' (Global)
* '''URIPrefix''' (Listener)
* '''AutoClearQueryBuffer''', '''ClientEncoding''', and '''MaxQueryBuffers''' (User)
* '''Encoding''', '''JoinDelay''' and '''QuitMsg''', '''TrustedServerFingerprint''' (Network)
* '''Disabled''' (Chan)


===== Add Build Dependency Sources =====
=== Added in 1.2 ===
* '''MaxJoins''' (User)


====== Older than Ubuntu 12.04 ======
=== Older pre 1.x settings ===
If you have any version of Ubuntu older than 12.04, you are incapable of building ZNC 1.6 or newer, due to the inability to install or build the ZNC build dependencies.
* '''DCCVHost''' - This is the IP address used for DCC bouncing.
 
* '''BounceDCCs''' - If set to <code>true</code>, the DCCs will be bounced by ZNC.
====== Ubuntu 12.04 ======
* '''DCCLookupMethod''' - If set to <code>default</code>, ZNC will use the IP the clients sends for the DCC connections; if set to <code>client</code>, ZNC will use the IP the client connects from.
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:
* '''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 [[ChangeLog/0.090|0.090]], see next chapter for older versions)
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
* '''Listener4''' or '''Listener6''' - Exactly the same as '''Listener''', but will use only IPv4 or IPv6.
sudo add-apt-repository -y ppa:teward/swig3.0
* '''ISpoofFile''' - ZNC will write the ident of the user trying to connect to this file. Very useful if your shell supports oidentd.
sudo add-apt-repository -y ppa:teward/icu-backports
* '''ISpoofFormat''' - The format of the ISpoofFile.
 
Before 0.096
====== Ubuntu 14.04 ======
* '''BindHost''' was named '''vHost'''
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:
Before 0.090:
sudo add-apt-repository -y ppa:teward/swig3.0
* '''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.
====== Newer than Ubuntu 14.04 ======
* TODO: When did Listeners become their own substructure?
You will not need any additional PPAs or sources for build dependencies.
 
===== Other Build Dependencies =====
After verifying you have the required build dependency sources, you will need to install the following packages:
build-essential
libssl-dev
libperl-dev
pkg-config
swig3.0
libicu-dev
 
If you are on Ubuntu 12.04, you will also need to install the following package:
g++-4.7
 
After you have done this, you can follow the instructions on this page for compiling from the source tarball.
 
==== Install via PPA ====
 
{{ambox | type = delete | text = '''Debian users:''' '''''do not''''' use this PPA or you will risk forfeiting all support from Debian or breaking your system! Use the Debian repository described on the [[Installation#Debian|Debian section]] instead.}}
 
A Personal Package Archive (PPA) has been created by [https://launchpad.net/~teward Thomas W.], and contains the latest stable ZNC release as exists in Debian.  It contains packages for all releases of Ubuntu that are currently supported.  It does not contain packages for versions of Ubuntu that are past their [https://wiki.ubuntu.com/Releases end of life dates].  [https://launchpad.net/~teward/+archive/znc/+packages Click here if you wish to see the details of the packages in the PPA]. '''NOTE: This PPA contains packages for only certain Ubuntu releases, as detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|here]].'''
 
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].
 
First, make sure you have the python-software-properties package installed:
sudo apt-get install python-software-properties software-properties-common
 
Then, add the PPA to your sources, and update the apt information:
sudo add-apt-repository ppa:teward/znc
sudo apt-get update
 
Then, install the znc packages:
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl
 
ZNC is now installed.  You can create the configuration normally with this, when run on the user that you want to run ZNC as:
znc --makeconf
 
=== (open)SUSE ===
ZNC is part of the [https://software.opensuse.org/package/znc official repositories]. To install, use the YaST GUI or install via commandline by typing
zypper install znc
 
=== Gentoo ===
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:
emerge -av net-irc/znc
 
Several USE Flags can be used for znc:
 
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.
* debug (global): enable debug
* ipv6 (global): adds support for ipv6
* perl (global): adds support for writing perl modules
* python (global): adds support for writing python 3 modules
* ssl (global): enable secure socket layer connections
* sasl (global): sasl support
* tcl (global): adds support for writing tcl modules
 
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc
 
=== Slackware ===
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]
 
=== Alpine Linux ===
 
To install znc from the package manager, enter the following command:
<!--- Some modules exist in znc-extra. This is by design on this OS. --->
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates
 
If you want to build znc from source to get a newer version than Alpine provides, you need to install packages with the following command:
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev
 
If you want to run [[git]], [[Debugging]], [[modperl|perl]], (requires swig), [[modpython|python]], (requires swig), [[modtcl|tcl]], or [[cyrusauth|cyrus]] then install the packages that correspond:
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev
 
=== Archlinux ===
 
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:
 
pacman -S znc
 
Additionally you can install the following optional dependencies to add support for additional modules.
 
* '''cyrus-sasl''' - saslauth module
* '''perl''' - modperl module
* '''python''' - modpython module
* '''tcl''' - modtcl module
 
==== rc.d scripts (deprecated)====
 
You may also be interested in rc.d scripts for znc which can be installed with:
 
pacman -U https://github.com/downloads/kylef/znc-arch/znc-system-wide-1.0-1-any.pkg.tar.xz
 
You can read more about these scripts [https://github.com/kylef/znc-arch here]. As of November 2012, initscripts support is being phased-out and expected to be totally deprecated in early 2013. Systemd scripts are already distributed in the package. The Archlinux wiki has some helpful information for new users who are getting started with [https://wiki.archlinux.org/index.php/Znc znc].
 
==== Unstable/Testing ====
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].
 
== FreeBSD ==
ZNC is in FreeBSD ports, just do:
cd /usr/ports/irc/znc
make config
make install clean
 
or pkg_add
 
pkg_add -r znc
 
or pkgng
 
pkg install znc
 
== Mac OS X ==
 
There are two ways to install ZNC on OS X, either using a package manager such as Homebrew or installing it yourself from source. See [http://henrik.nyh.se/2009/02/using-the-znc-irc-bouncer-with-os-x-and-iphone this blog post] for a tutorial on how to compile ZNC from source.
 
* NOTE: If you are running on PPC architecture and cannot make the ''./configure && make && sudo make install'' dance work, you'll want to do the following:
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''
 
=== Homebrew ===
 
==== Installing Homebrew ====
 
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local
 
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
Homebrew requires Xcode and Mac OS X >= 10.5
 
==== Installing znc with Homebrew ====
 
  brew install znc
 
=== Installing znc with MacPorts ===
 
  port install znc
 
 
== Microsoft Windows ==
 
'''Warning: If you're going to install ZNC on your local Windows machine, it will probably be useless. You should run it on some machine (Windows or not), which is connected to internet 24/7.'''
 
=== Cygwin ===
 
ZNC is available in list of cygwin packages.
 
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".
 
If you don't want to use the provided packages, you can compile ZNC from source; for that you'll need the following packages installed: automake, gcc-g++, libicu-devel, make, mpfr, pkg-config, openssl-devel, zlib-devel. After installing these packages proceed to [[#Source Tarball|source tarball]] section (or [[git]])


[[Category:ZNC]]
[[Category:ZNC]]

Revision as of 23:05, 7 May 2018

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
HideVersion
(since 1.6)
Whether the version number is hidden from the web interface and CTCP VERSION replies.
HideVersion = true
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
ProtectWebSessions Whether IP changing during each web session is disallowed.
ProtectWebSessions = 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 file with SSL/TLS certificate, used for ZNC's listening port. Defaults to ~/.znc/znc.pem
SSLCertFile = /home/znc/.znc/znc.pem
SSLCiphers
(since 1.6)
The allowed SSL ciphers. Default value is from Mozilla's recomendations
SSLCiphers = EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLDHParamFile
(since 1.7)
The file with Diffie-Hellman parameters of SSL/TLS, used for ZNC's listening port. Defaults to ~/.znc/znc.pem. If the file doesn't contain DH parameters, ciphers which use DH can't be used.
SSLDHParamFile = /home/znc/.znc/znc.pem
SSLKeyFile
(since 1.7)
The file with private key of SSL/TLS certificate, used for ZNC's listening port. Defaults to ~/.znc/znc.pem
SSLKeyFile = /home/znc/.znc/znc.pem
SSLProtocols
(since 1.6)
The accepted SSL protocols. Available protocols are All, SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2. A non-prefixed value overrides any existing values, whereas a '-' or '+' prefixed value disables or enables an additional protocol. It is recommended to keep the ZNC defaults that may change in future versions, and only disable (or enable) additional protocols if necessary. NOTE: ZNC 1.6 disables SSLv2 and SSLv3 by default.
SSLProtocols = -SSLv2 -SSLv3 -TLSv1 +TLSv1.1 +TLSv1.2
StatusPrefix The default prefix for status and module queries. Users can override the value.
StatusPrefix = *
TrustedProxy
(since 1.6)
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
(since 1.6)
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
(since 1.6)
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
ChanBufferSize
(since 1.7)
The maximum amount of lines stored for each channel 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.
ChanBufferSize = 300
ChanModes The default modes ZNC sets when joining an empty channel.
ChanModes = +stn
ClientEncoding
(since 1.6)
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
Language
(since 1.7)
Language of UI translation shown for this user. If not specified, English is used.
Language = ru-RU
LoadModule The list of user modules loaded on ZNC startup.
LoadModule = controlpanel
LoadModule = chansaver
MaxJoins
(since 1.2)
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
(since 1.6)
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
NoTrafficTimeout
(since 1.7)
How much time ZNC waits (in seconds) until it receives something from network or declares the connection timeout. This happens after attempts to ping the peer.
NoTrafficTimeout = 180
PrependTimestamp Whether timestamps are prepended to buffer playback messages. NOTE: Only used for clients that do not support server-time.
PrependTimestamp = true
QueryBufferSize
(since 1.7)
The maximum amount of lines stored for each 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.
QueryBufferSize = 300
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
(since 1.6)
An optional network specific encoding.
Encoding = UTF-8
FloodBurst The maximum amount of lines ZNC sends at once.
FloodBurst = 4
FloodRate The seconds between lines 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
(since 1.6)
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
(since 1.6)
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
TrustedServerFingerprint
(since 1.6)
The list of trusted server fingerprints.
TrustedServerFingerprint = fi:ng:er

Chan

Definition of a channel that ZNC joins when it connects to IRC. A network can have multiple channels.

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
(since 1.6)
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

Definition of a password, used by clients to connect to ZNC. 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.7

  • SSLDHParamFile and SSLKeyFile (Global)
  • Language, ChanBufferSize and QueryBufferSize (User)
  • AuthOnlyViaModule (Global, User)

Added in 1.6

  • HideVersion, SSLCiphers, SSLProtocols and TrustedProxy (Global)
  • URIPrefix (Listener)
  • AutoClearQueryBuffer, ClientEncoding, and MaxQueryBuffers (User)
  • Encoding, JoinDelay and QuitMsg, TrustedServerFingerprint (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?