How to install ZNC

ZNC is an IRC network bouncer or BNC. It can detach the client from the actual IRC server, and also from selected channels.

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.

Which way should I choose for installing ZNC?
If you don't have root access, the only way is to use source tarball. You'll need to use ./configure --prefix="$HOME/.local" as described.
If you have root access, you can use either 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!

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. A good way to install this and other dependencies is the build dependency feature of package managers (apt-get build-dep / yum-builddep / zypper source-install --build-deps-only).

  1. Download the latest source tarball
  2. tar -xzvf znc-1.8.2.tar.gz
  3. cd znc-1.8.2
  4. mkdir build
  5. cd build
  6. ./configure
    make
    (if you are on a dedicated server and your CPU has more than one core, you can use make -jX where X is the number of CPU cores to speed up compilation)
  7. make install

How to configure ZNC

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

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>

 

  • how to install znc, setup ZNC, install znc, compile znc, how to configure znc
  • 37 Users Found This Useful
Was this answer helpful?

Related Articles

How To Install psyBNC

psyBNC is small, lightweight software for usage in IRC (Internet Relay Chat). Bouncers have...

psyBNC FAQ

| psyBNC-FAQ (Frequently Asked Questions) for psyBNC | This FAQ does not...

Frequently Asked Questions

Frequently Asked Questions - up to version 2.3.2 Q: I tried to add a User for getting Op from...

How to recover psyBNC password

To reset password of your psybnc follow the steps mentioned below: Login to the shell account...

How to install sBNC

shroudBNC  or sBNC is a modular IRC proxy written in C++. It is capable of proxying IRC...

Powered by WHMCompleteSolution