https://wiki.znc.in/api.php?action=feedcontributions&user=Teward&feedformat=atomZNC - User contributions [en]2024-03-28T20:47:34ZUser contributionsMediaWiki 1.42.0-alphahttps://wiki.znc.in/index.php?title=Installation&diff=3027Installation2023-10-28T23:46:52Z<p>Teward: /* Install via PPA */ PPA is dead, and unsupported. Removing from install instructions.</p>
<hr />
<div>{{Languages|Installation}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
:If you don't have root access, the only way is to use [[#Source Tarball|source tarball]]. You'll need to use <code>cmake .. -DCMAKE_INSTALL_PREFIX="$HOME/.local"</code> as described. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <code>mkdir build</code><br />
# <code>cd build</code><br />
# <code>cmake ..</code><br />(use <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>cmake -DOPENSSL_ROOT_DIR=/path/to/openssl</code> if you have a non-standard SSL path)<br />(use <code>ccmake</code> or <code>cmake-gui</code> to see other configure options)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
ZNC is run by just executing <code>znc</code> under the dedicated znc user, at which stage it goes to background. It does not automatically 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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions.<br />
<br />
If you want to test great new features (and bugs!), unstable ZNC image is [https://hub.docker.com/r/zncbouncer/znc-git/ here].<br />
<br />
=== Debian ===<br />
{{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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using (stretch/stable, buster/testing, sid)<br />
apt install znc<br />
<br />
Debian Jessie LTS [https://wiki.debian.org/Backports#Using_the_command_line backports]<br />
apt -t jessie-backports install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
or dnf<br />
sudo dnf install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7+ only ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
{{ambox | type = delete | text = '''DO NOT''' add these dependency sources or PPAs if you are only trying to install from the ZNC PPA; instead skip this section and go to the [[Installation#Install_via_PPA|Install via PPA]] second instead. This section is only for those intending to compile themselves from-source.}}<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or pkg_add<br />
<br />
pkg_add -r znc<br />
<br />
or pkgng<br />
<br />
pkg install znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
=== WSL ===<br />
After ensuring that WSL (Windows Subsystem for Linux) itself works, follow the [[#Linux|Linux]] instructions above.<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=Template:Providers/table&diff=2657Template:Providers/table2020-01-30T17:03:00Z<p>Teward: IRCNow removed due to multiple complaints of discrimination and hate activities by its administrators.</p>
<hr />
<div><noinclude><br />
<!-- <br />
======================================================================<br />
For location codes, please refer to https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2<br />
Use exceptions, most notably UK instead of GB, listed here https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Exceptional_reservations<br />
====================================================================== <br />
Providers are sorted by "Date Started", which is either the date in which the provider officially started delivering services, the date <br />
their domain was registered (if reliable information), or the date added to the ZNC table list.<br />
--><br />
</noinclude>[<span class="plain links">[{{fullurl:Template:Providers/table|action=edit}} Edit data]</span>]<br />
{| class="wikitable sortable" border="1"<br />
! rowspan="2" | Provider<br />
! colspan="2" | Max Networks per User<br />
! rowspan="2" | ZNC Version<br />
! rowspan="2" | Language<br />
! rowspan="2" | Connectivity<br />
! rowspan="2" class="unsortable" | IRC Support<br />
! rowspan="2" | Date Started<br />
! rowspan="2" class="unsortable" | ZNC locations<br><small style="font-weight:normal">([[wikipedia:ISO 3166-1 alpha-2#Officially_assigned_code_elements|country codes]], using [[wikipedia:ISO 3166-1 alpha-2#Exceptional_reservations|exceptions]])</small><br />
|-<br />
! Default<br />
! Premium<br />
|-<br />
|[https://www.xshellz.com xShellz]<br />
| 2<br />
| data-sort-value="30" | 12, 20, or 30<br />
| 1.6.1<br />
| English<br />
| both<br />
| {{irc|chat.freenode.net|xShellz}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2009-03-01<br />
| <abbr title="United States of America">US</abbr>, <abbr title="United Kingdom">UK</abbr><br />
|-<br />
|[https://lunarbnc.net LunarBNC]<br />
| unlimited<br />
|<br />
| 1.7.3<br />
| English<br />
| IPv6-only<br />
| {{irc|irc.lunarirc.net|lunarbnc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2014-09-03<br />
| <abbr title="Germany">DE</abbr><br />
|-<br />
|[https://znc.bg ZNC.BG]<br />
| 1<br />
|<br />
| 1.6.3* <br />
| English<br />
| both<br />
| {{irc|irc.v.bg|znc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2016-01-25<br />
| <abbr title="Bulgaria">BG</abbr>, <abbr title="Czech Republic">CZ</abbr>, <abbr title="Germany">DE</abbr>, <abbr title="Italy">IT</abbr><br />
|-<br />
|[https://znc-de.librient.com QZ]<br />
| 3<br />
| 10<br />
| 1.7.2<br />
| English<br />
| IPv6-only<br />
| {{irc|chat.freenode.net|qz}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-11-02<br />
| <abbr title="Germany">DE</abbr><br />
|-<br />
|[http://viaplus.weebly.com/viabnc.html viaBNC]<br />
| 5 (specified from a whitelist)<br />
| <br />
| 1.6.6<br />
| Spanish / English<br />
| both<br />
| {{irc|chat.freenode.net|viaBNC}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-02-21<br />
| <abbr title="Canada">CA</abbr>, <abbr title="United States of America">US</abbr><br />
|-<br />
|[https://pastebin.com/raw/eDaeLZhn bnc4you]<br />
| 2 (freenode + 1 choice)<br />
| <br />
| 1.7.5<br />
| English<br />
| IPv4-only<br />
| [http://irc.lc/freenode/bnc4you/bnc4you@@@ #bnc4you@chat.freenode.net]<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-03-03<br />
| <abbr title="Turkey">TR</abbr><br />
|-<br />
|}</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2573Installation2019-07-07T20:15:12Z<p>Teward: /* Install via PPA */</p>
<hr />
<div>{{Languages|Installation}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <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)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
ZNC is run by just executing <code>znc</code> under the dedicated znc user, at which stage it goes to background. It does not automatically 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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions.<br />
<br />
If you want to test great new features (and bugs!), unstable ZNC image is [https://hub.docker.com/r/zncbouncer/znc-git/ here].<br />
<br />
=== Debian ===<br />
{{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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using (stretch/stable, buster/testing, sid)<br />
apt install znc<br />
<br />
Debian Jessie LTS [https://wiki.debian.org/Backports#Using_the_command_line backports]<br />
apt -t jessie-backports install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
or dnf<br />
sudo dnf install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7+ only ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
{{ambox | type = delete | text = '''DO NOT''' add these dependency sources or PPAs if you are only trying to install from the ZNC PPA; instead skip this section and go to the [[Installation#Install_via_PPA|Install via PPA]] second instead. This section is only for those intending to compile themselves from-source.}}<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
{{ambox | type = delete | text = '''NOTICE:''' The PPA here has recently had its signing keys updated (as of approx. Jan 9, 2019); you may need to go through the process of downloading missing keys if <code>apt</code> starts to complain about <code>NO_PUBKEY</code> errors with the PPA.}}<br />
<br />
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].<br />
<br />
The versions of ZNC currently available in the PPA are detailed [https://launchpad.net/~teward/+archive/ubuntu/znc on the repository's information page] but will only receive updates for currently-supported, non End of Life Ubuntu Releases.<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or pkg_add<br />
<br />
pkg_add -r znc<br />
<br />
or pkgng<br />
<br />
pkg install znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=Cert&diff=2553Cert2019-05-09T17:58:11Z<p>Teward: </p>
<hr />
<div>{{Core Module}}<br />
<br />
This module lets users use their own SSL client certificate to connect to a server, such as [https://www.oftc.net/NickServ/CertFP/ CertFP]. <br />
<br />
You will have to generate an SSL client certificate to use with this module. Either place it at `~/.znc/users/<user>/networks/<network>/moddata/cert/user.pem`, or use the web interface to upload the certificate.<br />
<br />
You can usually test if Cert is supported by services simply by sending <code>/msg NickServ cert</code>. If you get an error about “Insufficient parameters for CERT,” CertFP is supported. If you get an error about unknown command, or no response at all, it may not supported. While this is a fairly reliable test, it may vary by IRC network, for example [http://rizon.net Rizon] supports Cert but uses the command <code>/msg NickServ access</code> instead.<br />
<br />
{{Module arguments|type=user/network}}<br />
<br />
===Commands===<br />
<pre><br />
+---------+-----------+--------------------------------+<br />
| Command | Arguments | Description |<br />
+---------+-----------+--------------------------------+<br />
| Help | | Generate this output |<br />
| delete | | Delete the current certificate |<br />
| info | | |<br />
+---------+-----------+--------------------------------+<br />
</pre><br />
<br />
==Generating a certificate ==<br />
You can use the following openssl commands to generate a certificate<br />
<br />
This command would produce a 4096-bit certificate which would expire in 3650 days. You can modify the arguments to openssl to change this. user.pem is the certificate you will need to add to ZNC.<br />
<br />
<pre>openssl req -nodes -newkey rsa:4096 -keyout user.pem -x509 -days 3650 -out user.pem -subj "/CN=YourNickname"</pre><br />
<br />
''If you are following instructions from [[certauth]], you can stop here. Your certificate is <code>user.pem</code>, and [https://freenode.net/kb/answer/certfp you must tell your client to use it.]''<br />
<br />
==Utilizing the certificate==<br />
<br />
This part of the article is written generically, and the instructions might differ from network to network dependent on a myriad of variables. If something doesn't work, consult your network's website and support venues.<br />
<br />
To get a SHA-1 fingerprint, enter the following command:<br />
openssl x509 -sha1 -noout -fingerprint -in user.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'<br />
'''''note: Not all networks use sha-1 fingerprints, consult the network you're connecting to for this information.'''''<br />
<br />
Add the fingerprint to your NickServ account:<br />
/msg NickServ cert add ''fingerprint''<br />
'''''note: some services support adding fingerprint if you're connected with a certificate, and <code>/msg NickServ cert add</code> alone will work. It is also often possible to WHOIS yourself for the fingerprint.'''''<br />
<br />
Now move the cert your folder:<br />
mv user.pem ~/.znc/users/<user>/networks/<network>/moddata/cert/</div>Tewardhttps://wiki.znc.in/index.php?title=MIRC&diff=2532MIRC2019-02-07T17:39:17Z<p>Teward: /* Connecting to ZNC */</p>
<hr />
<div>== Connecting to ZNC ==<br />
=== SSL ===<br />
In order to use SSL, you must check that SSL is installed and ready to use.<br />
==== Checking ====<br />
To check if your mIRC is ready for SSL, enter the following command into any mIRC window:<br />
//echo -ag $sslready<br />
<br />
If the output is $true, then SSL is installed, if $false, then you need to install ssl.<br />
<br />
'''Note:''' mIRC 7.35 and newer versions include SSL by default.<br />
<br />
==== Installing ====<br />
In order to use SSL, you need [http://www.mirc.com/ssl.html OpenSSL] installed.<br />
* Exit mIRC (This is required).<br />
* Install SSL.<br />
* Start mIRC<br />
* You can either manually accept the invalid certificates (if they are invalid)<br />
* Tools -> Options -> Connect -> Options -> SSL... -> Automatically accept invalid certificates -> OK -> OK<br />
<br />
<br />
==== Connecting to ZNC ====<br />
<br />
Connecting to ZNC, with MIRC without having to provide logon details every single time or re-connect.<br />
<br />
# Select Server<br />
# Edit your ZNC server<br />
# In the first password field, fill in your username followed a : and finally, the password, like this: username:password<br /><br />[[File:File_MIRCConfig.png]]<br /><br />This way MIRC will automatically authenticate with ZNC without /quote pass.<br />
# Also works on reconnect (WIFi loss or wake up from sleep laptop)<br />
<br />
==== Connecting (the old way) ====<br />
Connections to ZNC using SSL via script:<br />
<br />
on *:start: {<br />
server my.bouncer.net:+6697 username/network:password<br />
server -m my.bouncer.net:+6697 username/network:password<br />
server -m my.bouncer.net:+6697 username/network:password<br />
}<br />
<br />
<br />
==== Troubleshooting ====<br />
It does not connect.<br />
<br />
If port 6697 is the SSL port, you need to specify the "+" before the port.<br />
<br />
This is a failed attempt due to not specifying the "+"<br />
[02:17:38] * Connect retry #1 my.bouncer.net (6697)<br />
[02:17:39] * [10053] Software caused connection abort<br />
<br />
<br />
=== Non SSL ===<br />
<br />
This is for plain non-ssl connections.<br />
==== Connecting ====<br />
Connecting to ZNC using non SSL via script:<br />
on *:start: {<br />
server my.bouncer.net:6667 username/network:password<br />
server -m my.bouncer.net:6667 username/network:password<br />
server -m my.bouncer.net:6667 username/network:password<br />
}<br />
<br />
<br />
== ZNC Scripts ==<br />
<br />
* [[Buffextras/mIRC]]<br />
* [[Savebuff/mIRC]]<br />
* [[Privmsg/mIRC]]<br />
<br />
[[Category:Clients]]</div>Tewardhttps://wiki.znc.in/index.php?title=File:File_MIRCConfig.png&diff=2531File:File MIRCConfig.png2019-02-07T17:34:27Z<p>Teward: </p>
<hr />
<div></div>Tewardhttps://wiki.znc.in/index.php?title=Privmsg&diff=2530Privmsg2019-02-05T17:06:23Z<p>Teward: </p>
<hr />
<div>{{DISPLAYTITLE:privmsg}}<br />
{{External Module}}<br />
<br />
privmsg is a user module which will send all the private messages you send to all your attached clients. This module is designed to work with znc from git. You can find the source at https://raw.githubusercontent.com/kylef/znc-contrib/master/privmsg.cpp<br />
<br />
== Supported Clients ==<br />
<br />
Not all clients support receiving private messages from ourself to another query window. The following list is of all clients that are known to work with this module.<br />
<br />
* Palaver<br />
* Textual 2.1<br />
* Weechat<br />
* Colloquy<br />
* Colloquy mobile<br />
* XChat 2.8.6 with [[Privmsg/XChat|this script]]<br />
* mIRC 7.27 with [[Privmsg/mIRC|this script]]<br />
* [[HexChat]] 2.9.6+ with [https://github.com/TingPing/plugins/blob/master/HexChat/mymsg.lua this script]<br />
* IRCCloud.com<br />
* [http://www.amazon.com/CounterCultured-Android-IRC-Internet-Chat/dp/B004R1D10Y Android IRC] 2.1.15<br />
<br />
If your IRC client is not listed here, you can still try it, maybe it's supported, but just not in the list, or you can try [[privmsg_prefix]] module, which looks uglier, but doesn't depend on your client. If you have some clients which support this module and some that do not, consider trying [[privmsg auto]] module.<br />
<br />
=== Bugs related to other clients ===<br />
<br />
* irssi http://bugs.irssi.org/index.php?do=details&task_id=833<br />
<br />
== How this works ==<br />
<br />
In this example, my own nick is "kylef":<br />
<br />
:kylef!kylef@amnesia.darkscience.net PRIVMSG Derecho :Hello world!<br />
<br />
Currently, this will display the private message in a query window titled "kylef". The RFC doesn't really define how this should be handled, but to me it makes sense for this message to go in the query window for Derecho, and the sender should be kylef (myself).<br />
<br />
In most IRC servers, you wont receive PRIVMSG's formatted this way. But it would make sense for uses with IRC bouncers where we could send messages we sent to all connected clients.</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2508Installation2019-01-15T16:53:58Z<p>Teward: /* Add Build Dependency Sources */</p>
<hr />
<div>{{Languages|Installation}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <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)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
ZNC is run by just executing <code>znc</code> under the dedicated znc user, at which stage it goes to background. It does not automatically 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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions.<br />
<br />
If you want to test great new features (and bugs!), unstable ZNC image is [https://hub.docker.com/r/zncbouncer/znc-git/ here].<br />
<br />
=== Debian ===<br />
{{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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using (stretch/stable, buster/testing, sid)<br />
apt install znc<br />
<br />
Debian Jessie LTS [https://wiki.debian.org/Backports#Using_the_command_line backports]<br />
apt -t jessie-backports install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
or dnf<br />
sudo dnf install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7+ only ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
{{ambox | type = delete | text = '''DO NOT''' add these dependency sources or PPAs if you are only trying to install from the ZNC PPA; instead skip this section and go to the [[Installation#Install_via_PPA|Install via PPA]] second instead. This section is only for those intending to compile themselves from-source.}}<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
{{ambox | type = delete | text = '''NOTICE:''' The PPA here has recently had its signing keys updated (as of approx. Jan 9, 2019); you may need to go through the process of downloading missing keys if <code>apt</code> starts to complain about <code>NO_PUBKEY</code> errors with the PPA.}}<br />
<br />
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]].'''<br />
<br />
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or pkg_add<br />
<br />
pkg_add -r znc<br />
<br />
or pkgng<br />
<br />
pkg install znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2502Installation2019-01-09T17:48:00Z<p>Teward: /* Install via PPA */ PPA Signing key is in the process of being regenerated within the next few days, so add a notice about the signing keys</p>
<hr />
<div>{{Languages|Installation}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <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)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
ZNC is run by just executing <code>znc</code> under the dedicated znc user, at which stage it goes to background. It does not automatically 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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions.<br />
<br />
If you want to test great new features (and bugs!), unstable ZNC image is [https://hub.docker.com/r/zncbouncer/znc-git/ here].<br />
<br />
=== Debian ===<br />
{{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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using (stretch/stable, buster/testing, sid)<br />
apt install znc<br />
<br />
Debian Jessie LTS [https://wiki.debian.org/Backports#Using_the_command_line backports]<br />
apt -t jessie-backports install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
or dnf<br />
sudo dnf install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7+ only ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
{{ambox | type = delete | text = '''NOTICE:''' The PPA here has recently had its signing keys updated (as of approx. Jan 9, 2019); you may need to go through the process of downloading missing keys if <code>apt</code> starts to complain about <code>NO_PUBKEY</code> errors with the PPA.}}<br />
<br />
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]].'''<br />
<br />
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or pkg_add<br />
<br />
pkg_add -r znc<br />
<br />
or pkgng<br />
<br />
pkg install znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=FAQ&diff=2478FAQ2018-09-25T17:43:40Z<p>Teward: /* How can I restart ZNC automatically (in case of a machine reboot, crash, etc.)? */</p>
<hr />
<div>{{Languages}}<br />
<br />
== Compiling ZNC ==<br />
=== General ===<br />
<br />
==== The compiler dies saying it has not enough memory! / g++: internal compiler error: Killed (program cc1plus) ====<br />
<br />
Starting from ZNC 0.062, you can use the <code>--disable-optimization</code> to configure. This will disable <code>-O2</code> and instead use <code>-O0"</code>. GCC should need less memory now.<br />
<br />
If you still can't compile ZNC, try <code>./configure --disable-optimization CXXFLAGS="--param ggc-min-expand=2 --param ggc-min-heapsize=20000"</code> but be prepared for looong wait.<br />
<br />
You could also try compiling ZNC without [[modpython]] / [[modperl]] or if you need the modules, you could try adding swap.<br />
<br />
1GB swap has usually been enough with 512MB RAM, to create a swap file of 1 GB, e.g.<br />
sudo fallocate -l 1G /swap<br />
sudo chmod 600 /swap<br />
mkswap /swap<br />
<br />
Now you can either <code>swapon /swap</code> or edit ''/etc/fstab'' and add:<br />
/swap none swap sw 0 0<br />
and run <code>swapon -a</code>. This enables the swap now and on boot.<br />
<br />
==== configure: error: pkg-config could not find znc (znc.pc) ====<br />
Use <code>PKG_CONFIG_PATH=~/znc/lib/pkgconfig ./configure</code> and replace <code>~/znc</code> with the path you installed ZNC to.<br />
<br />
==== Upgrade your compiler. GCC 4.7+ and Clang 3.2+ are known to work. ====<br />
<br />
As the error says, your compiler is too old. We cannot help you with it, because it's issue with your operating system and not ZNC.<br />
<br />
You have two options for getting help:<br />
# [https://duckduckgo.com/?q=YOUR_DISTRIBUTION_HERE+install+gcc+4.7| Using your favourite search engine.]<br />
# Asking on IRC support channel of '''your distribution''', ''NOT #znc''.<br />
<br />
==== Upgrading / updating from a previous release, to a new version ====<br />
This is really simple. You can just follow the instructions on the [[Installation]] page again, but ''DON'T RUN'' <code>--makeconf</code>. Your configuration won't be deleted. If you'd like to make a backup before, however, you can backup ZNC's config folder. It is usually located at ~/.znc. You can use tar to make a backup, like this: <code>tar cfvj znc-backup.tar.gz ~/.znc</code>.<br />
<br />
Your existing configuration will be upgraded to new version when you start it. If new ZNC will complain about few missing modules, you may need to remove them from znc.conf. That can happen if some modules which were loaded to your ZNC are removed in new version. See [[:Category:ChangeLog|ChangeLog]] for details.<br />
<br />
===== Why should I keep my ZNC up-to-date? =====<br />
<br />
ZNC is like any other software, it has bugs and security issues that are fixed in new versions and also gets improvements. By not upgrading you risk all kinds of security issues, don't trust your distribution to patch old releases as ZNC's code has changed so much that it's often impossible to apply patch from newer version to older version.<br />
<br />
For reasons to upgrade, take a look at [[:Category:ChangeLog|ChangeLog]]s starting from the next version to what you are currently running to the newest version.<br />
<br />
''Starting from ZNC 1.6.0 there have been two [[branches]], e.g. 1.6.x gets only bug/security fixes and later becomes 1.6.1 which distributions can package as bugfix release.''<br />
<br />
====== Why should I upgrade from ZNC 0.206? ======<br />
<br />
''ZNC 0.206 was released on 2012-04-05 and while being ancient, it's sadly still widely used (mainly, because of distributions shipping it).''<br />
<br />
* [[ChangeLog/1.0|1.0]]<br />
** IPv6 isn't attempted when it's not available.<br />
** Doesn't crash when admin unloads *admin (now [[controlpanel]]) module.<br />
* [[ChangeLog/1.2|1.2]]<br />
** Doesn't crash when user with attached client is removed.<br />
* [[ChangeLog/1.4|1.4]]<br />
** [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9403 CVE-2014-9403] - Denial of Service attack by adding channel that already exists without the "#", the reason why 1.4 was released.<br />
* [[ChangeLog/1.6.0|1.6.0]]<br />
** Disable SSLv3, because of [https://en.wikipedia.org/wiki/POODLE POODLE] and follow [https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 Mozilla's server-side TLS recommendations.]<br />
** Validate SSL certificates.<br />
*** See also [https://mikaela.info/english/2015/02/24/znc160-ssl.html mikaela.info: ZNC 1.6.0 & SSL certificate verification]<br />
** Fix memory leak in webadmin if gzip compression is enabled (accessing webadmin is enough, no login required).<br />
** Fix round-robins.<br />
*** e.g. don't only resolve chat.freenode.net as rajaniemi.freenode.net even if rajaniemi.freenode.net is down.<br />
* [[ChangeLog/1.6.2|1.6.2]]<br />
** Fix use-after-delete (similar to why 1.4 was released, but more difficult to trigger)<br />
** Build with ancient OpenSSL & OpenSSL with SSLv3 disabled<br />
** Fix <code>CAP :END</code> parsing which caused some clients to timeout.<br />
** Fix memory leak with invalid config<br />
** Fix [[modpython]] memory leak<br />
** Avoid infinite loops with [[stickychan]]<br />
<br />
''These are only the main points and might not be up-to-date when new versions are released. It's also entirely possible that there are security issues that haven't been found yet, but are fixed in newer versions.''<br />
<br />
Look at [[ChangeLog]] for more details and more bug-fixes.<br />
<br />
:Someone more technical should check this list and remove this comment, I don't understand e.g. the CSocket changes and do they fix issues. [[User:Mkaysi|Mikaela Suomalainen]] ([[User talk:Mkaysi|talk]]) 13:34, 16 September 2015 (CEST)<br />
<br />
==== Do I have to shut down and restart ZNC during an upgrade to a new version? ====<br />
Yes. You have to. There's no way to avoid it and also no feasible technical way to do it in a future version, sorry.<br />
<br />
=== BSD ===<br />
==== I get a "Need an operator" error when running make in bsd ====<br />
Try using gmake instead.<br />
====ZNC crashes at making a config file or adding a user via webadmin on FreeBSD 7.x 64bit====<br />
Try to compile znc from source with g++42/gcc42 from the ports instead of the default gcc (<code>./configure CXX=g++42</code>) and check your compile output for g++42.<br />
<br />
=== Debian ===<br />
==== I'm getting the error: configure: error: C++ compiler cannot create executables ====<br />
There are missing some compiler packages, you need to install them via:<br />
sudo apt-get update <br />
sudo apt-get install build-essential make bin86<br />
If you aren't on Debian, Ubuntu, or related distro, you need to install <code>g++</code>, <code>make</code> and possibly other things using your package manager.<br />
<br />
==== I'm compiling under debian and I don't have an openssl/include directory available ====<br />
Try using <code>sudo apt-get install libssl-dev</code> to get the development version of OpenSSL. (Something similar may be the case for other distros with package managers.)<br />
<br />
==== I've installed znc, but when i try to compile modules it says that there is no command znc-buildmod ====<br />
You need to add the development files to your debian/ubuntu:<br />
sudo apt-get install znc-dev<br />
<br />
== Starting ZNC ==<br />
=== Why do I get an "Incorrect Password" every time I connect even though my pass is correct? ===<br />
There're few ways to supply password:<br />
# If you have decent IRC client, you can just use "username" (or "ident") field for username, optional client identifier and network (for example <code>User@phone/freenode</code>) and "server password" field for password.<br />
# You can supply all four in the password field like "user@phone/network:pass" (without quotes)<br />
# Just do "/quote pass PA$$WORD" manually every time you connect to ZNC<br />
<br />
Also, make sure you did not accidentally load one of the [[cyrusauth]] or [[imapauth]] modules.<br />
<br />
Avoid using special character <code>:</code> in your password, as this can cause errors when trying to parse the password field to look for username, client, network, and password (user@client/network:pass). If the password has <code>:</code> in it, everything before first <code>:</code> is considered to be username (also network and client), and the username sent in the normal way is ignored.<br />
<br />
''@client-identifier was added with 1.6.0 and is entirely optional. It's used by modules such as [[chanfilter]] or [[clientbuffer]].''<br />
<br />
=== How can I restart ZNC automatically (in case of a machine reboot, crash, etc.)? ===<br />
If you installed ZNC using your distribution's package manager, it may have came with a set of scripts or configuration files for the distribution's init system. For systemd, run:<br />
<br />
sudo systemctl enable znc.service<br />
<br />
(Note that this does not work on the packages in the repositories of Debian; those do not include an init script)<br />
<br />
<br />
If you installed ZNC manually (from a tarball), you can add a cron entry to execute ZNC regularly. If there is already one copy of ZNC running on a particular config file, new copies won't be spawned. Example cron entry:<br />
*/10 * * * * /usr/local/bin/znc >/dev/null 2>&1<br />
This will check if ZNC is running every 10 minutes. If you load a module (like [[awaystore]]) that needs user input to run, you can add the input to the '''LoadModule''' line in your config file (ie. <code>LoadModule = awaystore yourpassword</code>).<br />
<br />
If you're using Vixie's cron, you can start it on start-up like this.<br />
<br />
@reboot /usr/local/bin/znc >/dev/null 2>&1<br />
<br />
You can also write an init script / configuration file to start ZNC using the init system, see [[Running ZNC as a system daemon]] for details.<br />
<br />
== Using ZNC ==<br />
<br />
=== ZNC dies when I power off the device it's running on! ===<br />
<br />
Of course, ZNC isn't magic. Like any other software, it doesn't run when you turn off or sleep your PC.<br />
<br />
If you want to stay connected while your own device is off/sleeping, ZNC must be running on some other machine somewhere. That could be an always-on PC/server in your home, a remote server that you control, or a [[providers|ZNC server run by someone else]]. If you were going to run it on your home PC—which you often power-off or sleep—consider getting a [[Wikipedia:Virtual private server|VPS]] or using a [[providers|ZNC provider]] instead. That way you can stay connected even when your device is off or sleeping.<br />
<br />
=== How do I tell ZNC which network/server a channel belongs to? ===<br />
<br />
<!--<br />
You don't. That's not how ZNC works (because the IRC protocol isn't capable of handling multiple servers in one connection and therefore no IRC clients can support it). You need to add one ZNC user per network (Note: since 0.207 it has been changed, user can have several networks now, see [[#Networks|Networks]]). Please also read the next question.<br />
--><br />
<br />
You have separate connection for all network. Please also read the next question.<br />
<br />
=== How to use multiple networks like with psybnc? ===<br />
ZNC works a bit differently since version 1.0. Each user can have multiple networks, but you need to connect ZNC multiple times; once per network. See [[FAQ#Why_do_I_get_an_.22Incorrect_Password.22_every_time_I_connect_even_though_my_pass_is_correct.3F|Why do I get an incorrect password every time I connect though my password is correct?]]<br />
<!--<br />
In order to choose which network, you format your server password like this:<br />
<br />
username/network:password<br />
<br />
For example, when you wish to connect to both freenode and efnet, open two separate connections with your client, one pointing at<br />
<br />
username/freenode:password<br />
<br />
and the other pointing at<br />
<br />
username/efnet:password<br />
<br />
For more detailed documentation on how to connect with several clients, refer to [[FAQ#How_do_I_connect_to_my_networks.3F|How do I connect to my networks?]]<br />
<br />
''Note: if you don't see options for multiple networks in your webadmin, it is strongly recommended you upgrade to the latest version of ZNC.''<br />
--><br />
<br />
=== I added several different servers, but ZNC connects only to one of them! ===<br />
You need to have separate user per IRC network (see previous question).<br />
(Note: since 0.207 it has been changed, user can have several networks now, see [[#Networks|Networks]])<br />
Additional servers for the same user are for fallback.<br />
If one server doesn't work, ZNC tries to connect to another server.<br />
So you can add several servers of one network to server list of one user.<br />
<br />
=== How do I choose which IP to use for connecting to IRC? ===<br />
<br />
By default user can choose any bindhost which means the host to use for connecting to IRC:<br />
/znc setuserbindhost 1.2.3.5<br />
/znc jump<br />
<br />
If you want to limit users to only one bindhost, go to webadmin and set the user bindhost as whatever you want and check the "deny setbindhost" checkbox.<br />
<br />
==== How can I force IPv4/IPv6 when connecting to the IRC ====<br />
<br />
To force IPv4:<br />
/znc setuserbindhost 0.0.0.0<br />
To force IPv6 bindhost:<br />
/znc setuserbindhost ::<br />
<br />
==== How can I have separate bindhost for IPv4 and IPv6? ====<br />
<br />
''IMPORTANT: ZNC cannot connect from IP address that is not available on your system.''<br />
<br />
===== If you have root access =====<br />
<br />
Edit the <code>hosts</code> file of your operating system and add:<br />
<br />
<pre><br />
0.0.0.0 my.awesome.vhost.example.com<br />
2001:4860:4860::8888 my.awesome.vhost.example.com<br />
</pre><br />
<br />
and tell ZNC to use it as bindhost:<br />
/znc setuserbindhost my.awesome.vhost.example.com<br />
<br />
With this configuration when IPv6 was used the bindhost would be 2001:4860:4860::8888 and when IPv4 was used, any available IPv4 address was used.<br />
<br />
===== If you don't have root access =====<br />
<br />
You must own a domain and set the A and AAAA records however you want into it or preferably subdomain. Then tell ZNC to bind on it with <code>/znc setuserbindhost my.awesome.vhost.example.com</code><br />
<br />
=== How do I add a new user? ===<br />
There are (at least) two ways to add a new user.<br />
<br />
The easiest way is to load and use the [[webadmin]] module.<br />
<br />
If you want to do it from IRC, load the [[controlpanel]] module and check out <code>/msg *controlpanel help</code>.<br />
<!--<br />
<br />
It's not suggested if you are new to ZNC, but it's also possible to add a new user via the config file. To do that, edit znc.conf and add a new <User> section. After that, rehash ZNC by issuing ''/msg *status rehash'' from IRC or ''kill -SIGHUP `pidof znc`'' from the shell.<br />
<br />
--><br />
<br />
=== Connecting with mIRC ===<br />
See [[MIRC]] for a detailed explanation on how to connect with mIRC.<br />
<br />
=== Connecting with Eggdrop ===<br />
<br />
See [[Eggdrop]] for a detailed explanation on how to connect Eggdrop.<br />
<br />
=== I got banned from #channel and ZNC keeps trying to rejoin ===<br />
Just do <code>/part #channel</code> and ZNC will remove the channel.<br />
<br />
=== How to use the loaded modules? ===<br />
/msg *modulename command<br />
or<br />
/znc *modulename command<br />
"*" is the StatusPrefix, which you can change in config file. You could start trying the help command which should work on all modules.<br />
<br />
=== I keep getting kicked for flood when I ... ===<br />
==== .. reattach bnc! ====<br />
This happens if you use "many" channels, due to IRC clients flooding the server with commands upon reattach. A workaround is decreasing size of buffer for each channel. (You should experiment how many is enough.)<br />
<br />
==== ... start bnc! ====<br />
<br />
There is [[Configuration|a per-User setting]] to control this:<br />
* '''MaxJoins''' - How many channels should ZNC join at once. Lower this if you get disconnected for 'Excess flood.<br />
<br />
==== Other tips ====<br />
<br />
Enable [[Configuration#Network|Flood]] settings and/or set them to be less generous (by increasing their values). Disabling Flood settings may lead to some cases where you are simply sending too much information to the server. This can be done via the Web Panel<br />
<br />
=== Every time I connect to my BNC, I see the channel buffers from the last time I connected! ===<br />
If you have a large channel buffer, it may be annoying to see the channel buffer every time you reconnect. To have ZNC erase the channel buffer every time you connect, set ''AutoClear Chan Buffer'' and ''AutoClear Query Buffer'' to true using either the [[webadmin]] or [[controlpanel]] module.<br />
<br />
/msg *controlpanel set AutoClearChanBuffer $me True<br />
/msg *controlpanel set AutoClearQueryBuffer $me True<br />
<br />
This will result in only the missed messages being played back to you upon reconnecting. Be careful if you use more than one client as znc will still see you as connected when one drops off and messages will not be buffered. Also, if your connection to znc dies unnaturally, znc might take a little bit to realize you're gone and thus not buffer a few of the messages that you haven't yet seen. The external [[playback]] module can help with this if your client supports it.<br />
<br />
==== I don't see buffer playback when attaching to ZNC! ====<br />
<br />
See also the previous question.<br />
<br />
If ''AutoClear Chan Buffer'' and ''AutoClear Query Buffer'' (commonly referred as ''AutoClear*Buffer'') are true, ZNC clears the buffers after they have been sent to client. This has some drawbacks such as sometimes the messages getting lost when client has lost network connection or another client not receiving messages, because one was already running and clearing buffers.<br />
<br />
/msg *controlpanel set AutoClearChanBuffer $me False<br />
/msg *controlpanel set AutoClearQueryBuffer $me False<br />
<br />
In case you wish to only clear buffers automatically for specific clients, take a look at the external [[clientbuffer]] module which is basically ''AutoClear*Buffer'' for clients added to it.<br />
<br />
Check also that your ''ChanBufferSize'' and ''QueryBufferSize'' are higher than 0 (disabled). They default to 50 meaning you get 50 lines of what was said before you attached to ZNC.<br />
<br />
=== What are BINDHOSTS and why can't I make mine work? ===<br />
<br />
̈́''VHOSTS were renamed into BINDHOSTs very long time ago, if you still see it in your ZNC, [[installation|upgrade]] immediately!''<br />
<br />
ZNC bindhost option controls the IP address ZNC will attempt to make connections to the IRC servers from. For this to be successful the computer you're running ZNC on '''must''' have this IP address configured and usable for your user. For it to show up as a host name on IRC there '''must''' be matching forward and reverse DNS in place. You can check this with:<br />
% host demo.znc.in<br />
demo.znc.in has address 208.84.148.90<br />
% host 208.84.148.90<br />
90.148.84.208.in-addr.arpa domain name pointer demo.znc.in.<br />
As long as the response looks similar then you should be able to<br />
/msg *status SetUserBindHost 208.84.148.90<br />
connect to IRC and check that it's working.<br />
<br />
If you find you are unable to connect to IRC after attempting to set bindhost options then it is likely you have set an IP address or host name that is not available on your computer. The easiest way to resolve this and get connected to IRC is to<br />
/msg *status ClearUserBindhost<br />
and try to connect again.<br />
<br />
To get rid of several misunderstandings vhost was renamed to bindhost since version [[ChangeLog/0.096|0.096]].<br />
<br />
=== I get 'Could not find znc-config. Please (re)install' when using znc-buildmod ===<br />
Your ZNC is too old, [[Installation|upgrade]].<br />
<br />
=== I keep getting a lot of stuff like /who replies when connected with multiple clients to one znc-user ===<br />
see user-module [[Route_replies]]<br />
<br />
=== How can I access webadmin with my browser? ===<br />
By default [[webadmin]] runs on the same PORT as your ZNC is accessible. So if you connect your IRC client to ZNC with server '''example.com''' and port '''6667''', then you would access webadmin by opening your web browser and going to the address '''<nowiki>http://example.com:6667</nowiki>'''.<br />
<br />
If ZNC listens using SSL, use the HTTP'''S''' protocol (http'''s'''://) instead of just HTTP (http://). If your web interface won't come up, please ensure that you are using the correct protocol for connecting. <br />
<br />
If you are using Google Chrome and keep getting an <tt>Error 312 (net::ERR_UNSAFE_PORT)</tt>, then try calling Chrome with the parameter <code>--explicitly-allowed-ports=<ZNC's port></code>.<br />
<br />
; Examples:<br />
:* Plaintext port on IPv4 localhost: <code><nowiki>http://127.0.0.1:8080</nowiki></code><br />
:* SSL port on IPv6 localhost: <code><nowiki>https://[::1]:8081</nowiki></code><br />
<br />
=== My IRC-Client doesn't allow multiple connections to one server/host ===<br />
Try to use different local aliases for the bnc-host.<br />
<br />
=== How to reload ZNC config without restart? ===<br />
The best way is '''NOT''' to change znc.conf and other files manually while ZNC is running.<br />
Use [[webadmin]] or [[controlpanel]] instead, or use <code>/msg *status help</code><br />
<br />
If you really need to do something in znc.conf, stop ZNC, make your changes and start it again.<br />
<br />
If you ''really'' need to rehash config from file without restart, there're 2 ways to do that: from IRC (<code>/msg *status rehash</code>)<br />
and from shell (<code>pkill -SIGHUP znc</code>). But don't complain if something is broken (because it ''will'' be broken for sure)<br />
<br />
=== [10053] Software caused connection abort ===<br />
Socket error 10053 can be caused by attempting to connect without SSL to a znc bouncer with SSL enabled (or vice versa). Refer to your IRC-client's documentation on how to establish a SSL-secured connection to a server.<br />
<br />
=== How to store private messages even when user is attached, so other clients can see them? ===<br />
<br />
Upgrade to ZNC 1.6.0+ (see [[query_buffers]]) and disable "Auto Clear Query Buffer" (for storing channel messages, disable "Auto Clear Chan Buffer") using either [[webadmin]] or [[controlpanel]].<br />
<!--<br />
<br />
''Pre-1.6.0:'' Here's simple workaround.<br />
<br />
First, you should know number of wanted clients. Let's say that you want 3 clients: 1 hexchat and 2 irssi-s. Let's say that your username is johndoe.<br />
<br />
Make following users: johndoe_ircd, johndoe_hexchat, johndoe_irssi1, johndoe_irssi2. This naming scheme isn't strict - everything is up to you.<br />
Set StatusPrefix for "client users" to something else, for example ^, because otherwise you won't be able to speak to both *status-es.<br />
<br />
Connect user johndoe_ircd to IRC server. Connect users johndoe_hexchat, johndoe_irssi1 and johndoe_irssi2 to 127.0.0.1 to the same ZNC, to user johndoe_ircd.<br />
<br />
Connect hexchat to johndoe_hexchat, and irssis to johndoe_irssiN.<br />
<br />
<pre><br />
___________________________________________________<br />
/ \<br />
| ZNC |<br />
| via 127.0.0.1 |<br />
hexchat ----|> user "johndoe_hexchat"----------\ |<br />
| v |<br />
irssi1 -----|> user "johndoe_irssi1" ---|> user "johndoe_ircd" -----|> IRC server<br />
| ^ |<br />
irssi2 -----|> user "johndoe_irssi2" ----------/ |<br />
| |<br />
\___________________________________________________/<br />
</pre><br />
This way, every private message that johndoe_ircd gets, is sent to all "client users", and they remain in those buffers until that client reads them.<br />
<br />
--><br />
<!-- Note: in 1.0+ you can use either networks instead of users, if that suits you better. (uncomment this if/when network can have own statusprefix) --><br />
<br />
=== Networks ===<br />
<br />
==== What is this new network support? ====<br />
<br />
It means you can add multiple IRC networks such as EFnet and freenode onto a single user. Instead of creating multiple users for each network like you did in versions before 1.0.<br />
<br />
==== How do I connect to my networks? ====<br />
<br />
When you supply your username to ZNC in your client, you can include the network as `username/network`. If you send your username in the server password field you can use `username/network:password`.<br />
<br />
There needs to be one connection between the client and the ZNC if you wish to connect to multiple networks at the same time.<br />
<br />
As every IRC client is slightly different, please consult the documentation for your IRC client on where to put the server password, or if you wish to configure autoconnect when the IRC client starts.<br />
<br />
'''Examples for mIRC, irssi, and HexChat:'''<br />
<br />
'''Note:''' Where ''1.2.3.4'' is an IP your ZNC instance is listening on, ''7777'' and ''7778'' are the port numbers the listeners are using, ''ZNCUser'' is the name of the ZNC user account, and ''PassWord'' is the password. In these examples, the second line uses SSL whereas the first one does not.<br />
<br />
'''Note:''' The network name is arbitrarily defined when setting it up in ZNC, though many users will use the name of the actual network for clarity.<br />
<br />
[[HexChat]]:<br />
<pre><br />
/server 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -ssl 1.2.3.4 7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
[[Irssi]]:<br />
<pre><br />
/server 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -SSL 1.2.3.4 7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
[[mIRC]]:<br />
<pre><br />
/server -m 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -m 1.2.3.4 +7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
==== Is it the same as in psybnc? ====<br />
<br />
No, ZNC doesn't use stupid tags for networks, which mix up different channels and nick together to one big network with prefixes.<br />
Instead, you should connect to ZNC multiple times, once for each network, see previous question on how to do that.<br />
Also you may switch between networks on the fly via <code>/msg *status JumpNetwork</code> command.<br />
<br />
If ZNC ever supports connecting to all networks together, it will be done properly, without those prefixes, but via an IRC protocol extension instead.<br />
Also that extension should be standardized at [http://ircv3.net IRCv3], to allow client developers to support it easier.<br />
<br />
''[https://github.com/ircv3/ircv3-specifications/pull/92 There is proposal to IRCv3 about this.]''<br />
<br />
=== How much memory does ZNC need to run? ===<br />
<br />
This question is very difficult to answer because it depends highly on how much you use it. However, personal ZNC instances, where you are the only user, are unlikely to require a great deal of memory to run.<br />
<br />
In an effort to give a better idea of how much memory ZNC may use in different situations, a page with anecdotal reports from users has been added. It may be found here: [[ZNC_Memory_Usage|ZNC Memory Usage]]<br />
<br />
Please update the page with your reports.<br />
<br />
=== My NickServ password is stored in plaintext! ===<br />
<br />
Of course, how could ZNC identify you to services otherwise?<br />
<br />
Your ZNC password is hashed in the config file as ZNC doesn't have to know your password, because when you login your password is hashed and compared to the hash in the config file. ZNC cannot do hashing or anything else to other passwords without losing ability to use them.<br />
<br />
In theory storing passwords encrypted some way would be possible, but that would require password inputting during ZNC startup preventing starting ZNC automatically and your passwords would still be readable from memory.<br />
<br />
If you are using a provider and do not trust them with your credentials, seek a different provider or host ZNC yourself.<br />
<br />
Note also that [[cert]] isn't any more secure then password if you don't trust the provider. Malicious provider can use it to identify as you and do everything as you including changing your password.<br />
<br />
=== Why does ZNC connect with my altnick? ===<br />
<br />
The exact answer is impossible, other than check <code>znc -D</code> for what happens. Most likely there was connection issue between ZNC and the server.<br />
<br />
[[Keepnick]] should always take your primary nick when it becomes free. Alternatively if you want to get your primary nick on connect you can configure [[SASL]] and set [[perform]] to regain your nick (with Atheme IRC services) <code>/msg *perform add NICKSERV REGAIN %defnick%</code>.<br />
<br />
=== How can I make ZNC disconnect when I'm not using it? ===<br />
<br />
[[File:Overview network scheme.png|thumb|128px|ZNC's reason to exist]]The primary reason ZNC exists is to keep you connected to IRC while your client is disconnected. However, some people have found other uses for ZNC and want it to disconnect or even shut down when their IRC client isn't connected.<br />
<br />
==== Disconnect ZNC from IRC when the client quits ====<br />
<br />
You can use the [[:Category:External Modules|external module]] '''[[simple_disconnect]]''' to cause ZNC to disconnect from the IRC server when your client quits. If, for whatever reason, ZNC doesn't connect to the IRC network the next time you connect your IRC client to ZNC, simply issue the command <code>/znc connect</code> to manually initiate the connection between ZNC and the IRC network.<br />
<br />
==== Quit ZNC when the client quits ====<br />
<br />
You probably just want to disconnect ZNC rather than shut it down (see [[{{FULLPAGENAME}}#Disconnect ZNC from IRC when the client quits|previous section]]). You can make ZNC quit when you disconnect, but you will then need to access the host machine (via physical access or SSH) and restart ZNC to connect your IRC client to ZNC again; obviously you can't connect your client to ZNC if ZNC is not running.<br />
<br />
You can use the [[:Category:External Modules|external module]] '''[[antiperform]]''' to issue commands at the time your IRC client disconnects from ZNC. Add the antiperform command <code>PRIVMSG *status :shutdown</code> to quit ZNC upon disconnecting your IRC client from ZNC. To reconnect, you must first re-launch ZNC on the host machine (for example, <code>ssh user@host.com 'znc'</code>) before connecting your IRC client to ZNC again.<br />
<br />
=== I forgot my password! How do I reset my ZNC password? ===<br />
<br />
On the host running ZNC, open a terminal and issue the command:<br />
znc --makepass<br />
<br />
You will then be able to create a new password:<br />
[ ** ] Type your new password.<br />
[ ?? ] Enter password:<br />
[ ?? ] Confirm password:<br />
<br />
Once the new password is entered, you will be instructed on how to update your config file to use the new password:<br />
[ ** ] Kill ZNC process, if it's running.<br />
[ ** ] Then replace password in the <User> section of your config with this:<br />
<Pass password><br />
Method = sha256<br />
Hash = 846696ed153511170264b41b51008d2c0ccc96929f9e268926857677b50d98dd<br />
Salt = +zHiaj0~Ci:d6]/`nPizT:+e<br />
</Pass><br />
[ ** ] After that start ZNC again, and you should be able to login with the new password.<br />
<br />
=== How do I reload znc.pem? ===<br />
<br />
znc.pem is currently (1.6.2) reloaded every time client connects to ZNC. It'll be fixed in future (https://github.com/znc/znc/issues/1215)<br />
<br />
== Troubleshooting ==<br />
<br />
=== My SSL certificate has expired ===<br />
<br />
If your ZNC SSL certificate has expired, you can delete the old one (the filename is znc.pem) and generate a new one with the following command:<br />
znc --makepem<br />
<br />
=== My client supports server-time and all timestamps are wrong ===<br />
<br />
Your clock is in wrong time either on your PC or the server you run ZNC on. Consider using NTP (Network Time Protocol) to keep your clocks on the right time.<br />
<br />
''[http://support.ntp.org/bin/view/Support/WindowsTimeService Windows users: time.windows.com isn't known for its accuracy. ]''<br />
<br />
* If you use systemd: <code>sudo timedatectl set-ntp true</code><br />
* Windows/Linux/OS using ntp: [http://www.pool.ntp.org/en/use.html using pool.ntp.org]<br />
** Windows (10): Start → Settings → Time and language → Add clocks for different timezones → Internet-time → Change settings, type <code>pool.ntp.org</code> and click OK.<br />
* OS X: System Preferences → Date and Time → (click the lock and) check "Set date and time automatically:" and enter <code>pool.ntp.org</code>.<br />
<br />
=== My question isn't answered here ===<br />
<br />
Hop on [irc://chat.freenode.net/#znc #znc@chat.freenode.net] and ask! Usually someone's around, but if no one replies, just wait for a while.<br />
<br />
=== Where do I report bugs? ===<br />
<br />
Create a new issue [https://github.com/znc/znc on GitHub].<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=FAQ&diff=2477FAQ2018-09-25T17:43:25Z<p>Teward: /* How can I restart ZNC automatically (in case of a machine reboot, crash, etc.)? */</p>
<hr />
<div>{{Languages}}<br />
<br />
== Compiling ZNC ==<br />
=== General ===<br />
<br />
==== The compiler dies saying it has not enough memory! / g++: internal compiler error: Killed (program cc1plus) ====<br />
<br />
Starting from ZNC 0.062, you can use the <code>--disable-optimization</code> to configure. This will disable <code>-O2</code> and instead use <code>-O0"</code>. GCC should need less memory now.<br />
<br />
If you still can't compile ZNC, try <code>./configure --disable-optimization CXXFLAGS="--param ggc-min-expand=2 --param ggc-min-heapsize=20000"</code> but be prepared for looong wait.<br />
<br />
You could also try compiling ZNC without [[modpython]] / [[modperl]] or if you need the modules, you could try adding swap.<br />
<br />
1GB swap has usually been enough with 512MB RAM, to create a swap file of 1 GB, e.g.<br />
sudo fallocate -l 1G /swap<br />
sudo chmod 600 /swap<br />
mkswap /swap<br />
<br />
Now you can either <code>swapon /swap</code> or edit ''/etc/fstab'' and add:<br />
/swap none swap sw 0 0<br />
and run <code>swapon -a</code>. This enables the swap now and on boot.<br />
<br />
==== configure: error: pkg-config could not find znc (znc.pc) ====<br />
Use <code>PKG_CONFIG_PATH=~/znc/lib/pkgconfig ./configure</code> and replace <code>~/znc</code> with the path you installed ZNC to.<br />
<br />
==== Upgrade your compiler. GCC 4.7+ and Clang 3.2+ are known to work. ====<br />
<br />
As the error says, your compiler is too old. We cannot help you with it, because it's issue with your operating system and not ZNC.<br />
<br />
You have two options for getting help:<br />
# [https://duckduckgo.com/?q=YOUR_DISTRIBUTION_HERE+install+gcc+4.7| Using your favourite search engine.]<br />
# Asking on IRC support channel of '''your distribution''', ''NOT #znc''.<br />
<br />
==== Upgrading / updating from a previous release, to a new version ====<br />
This is really simple. You can just follow the instructions on the [[Installation]] page again, but ''DON'T RUN'' <code>--makeconf</code>. Your configuration won't be deleted. If you'd like to make a backup before, however, you can backup ZNC's config folder. It is usually located at ~/.znc. You can use tar to make a backup, like this: <code>tar cfvj znc-backup.tar.gz ~/.znc</code>.<br />
<br />
Your existing configuration will be upgraded to new version when you start it. If new ZNC will complain about few missing modules, you may need to remove them from znc.conf. That can happen if some modules which were loaded to your ZNC are removed in new version. See [[:Category:ChangeLog|ChangeLog]] for details.<br />
<br />
===== Why should I keep my ZNC up-to-date? =====<br />
<br />
ZNC is like any other software, it has bugs and security issues that are fixed in new versions and also gets improvements. By not upgrading you risk all kinds of security issues, don't trust your distribution to patch old releases as ZNC's code has changed so much that it's often impossible to apply patch from newer version to older version.<br />
<br />
For reasons to upgrade, take a look at [[:Category:ChangeLog|ChangeLog]]s starting from the next version to what you are currently running to the newest version.<br />
<br />
''Starting from ZNC 1.6.0 there have been two [[branches]], e.g. 1.6.x gets only bug/security fixes and later becomes 1.6.1 which distributions can package as bugfix release.''<br />
<br />
====== Why should I upgrade from ZNC 0.206? ======<br />
<br />
''ZNC 0.206 was released on 2012-04-05 and while being ancient, it's sadly still widely used (mainly, because of distributions shipping it).''<br />
<br />
* [[ChangeLog/1.0|1.0]]<br />
** IPv6 isn't attempted when it's not available.<br />
** Doesn't crash when admin unloads *admin (now [[controlpanel]]) module.<br />
* [[ChangeLog/1.2|1.2]]<br />
** Doesn't crash when user with attached client is removed.<br />
* [[ChangeLog/1.4|1.4]]<br />
** [https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9403 CVE-2014-9403] - Denial of Service attack by adding channel that already exists without the "#", the reason why 1.4 was released.<br />
* [[ChangeLog/1.6.0|1.6.0]]<br />
** Disable SSLv3, because of [https://en.wikipedia.org/wiki/POODLE POODLE] and follow [https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 Mozilla's server-side TLS recommendations.]<br />
** Validate SSL certificates.<br />
*** See also [https://mikaela.info/english/2015/02/24/znc160-ssl.html mikaela.info: ZNC 1.6.0 & SSL certificate verification]<br />
** Fix memory leak in webadmin if gzip compression is enabled (accessing webadmin is enough, no login required).<br />
** Fix round-robins.<br />
*** e.g. don't only resolve chat.freenode.net as rajaniemi.freenode.net even if rajaniemi.freenode.net is down.<br />
* [[ChangeLog/1.6.2|1.6.2]]<br />
** Fix use-after-delete (similar to why 1.4 was released, but more difficult to trigger)<br />
** Build with ancient OpenSSL & OpenSSL with SSLv3 disabled<br />
** Fix <code>CAP :END</code> parsing which caused some clients to timeout.<br />
** Fix memory leak with invalid config<br />
** Fix [[modpython]] memory leak<br />
** Avoid infinite loops with [[stickychan]]<br />
<br />
''These are only the main points and might not be up-to-date when new versions are released. It's also entirely possible that there are security issues that haven't been found yet, but are fixed in newer versions.''<br />
<br />
Look at [[ChangeLog]] for more details and more bug-fixes.<br />
<br />
:Someone more technical should check this list and remove this comment, I don't understand e.g. the CSocket changes and do they fix issues. [[User:Mkaysi|Mikaela Suomalainen]] ([[User talk:Mkaysi|talk]]) 13:34, 16 September 2015 (CEST)<br />
<br />
==== Do I have to shut down and restart ZNC during an upgrade to a new version? ====<br />
Yes. You have to. There's no way to avoid it and also no feasible technical way to do it in a future version, sorry.<br />
<br />
=== BSD ===<br />
==== I get a "Need an operator" error when running make in bsd ====<br />
Try using gmake instead.<br />
====ZNC crashes at making a config file or adding a user via webadmin on FreeBSD 7.x 64bit====<br />
Try to compile znc from source with g++42/gcc42 from the ports instead of the default gcc (<code>./configure CXX=g++42</code>) and check your compile output for g++42.<br />
<br />
=== Debian ===<br />
==== I'm getting the error: configure: error: C++ compiler cannot create executables ====<br />
There are missing some compiler packages, you need to install them via:<br />
sudo apt-get update <br />
sudo apt-get install build-essential make bin86<br />
If you aren't on Debian, Ubuntu, or related distro, you need to install <code>g++</code>, <code>make</code> and possibly other things using your package manager.<br />
<br />
==== I'm compiling under debian and I don't have an openssl/include directory available ====<br />
Try using <code>sudo apt-get install libssl-dev</code> to get the development version of OpenSSL. (Something similar may be the case for other distros with package managers.)<br />
<br />
==== I've installed znc, but when i try to compile modules it says that there is no command znc-buildmod ====<br />
You need to add the development files to your debian/ubuntu:<br />
sudo apt-get install znc-dev<br />
<br />
== Starting ZNC ==<br />
=== Why do I get an "Incorrect Password" every time I connect even though my pass is correct? ===<br />
There're few ways to supply password:<br />
# If you have decent IRC client, you can just use "username" (or "ident") field for username, optional client identifier and network (for example <code>User@phone/freenode</code>) and "server password" field for password.<br />
# You can supply all four in the password field like "user@phone/network:pass" (without quotes)<br />
# Just do "/quote pass PA$$WORD" manually every time you connect to ZNC<br />
<br />
Also, make sure you did not accidentally load one of the [[cyrusauth]] or [[imapauth]] modules.<br />
<br />
Avoid using special character <code>:</code> in your password, as this can cause errors when trying to parse the password field to look for username, client, network, and password (user@client/network:pass). If the password has <code>:</code> in it, everything before first <code>:</code> is considered to be username (also network and client), and the username sent in the normal way is ignored.<br />
<br />
''@client-identifier was added with 1.6.0 and is entirely optional. It's used by modules such as [[chanfilter]] or [[clientbuffer]].''<br />
<br />
=== How can I restart ZNC automatically (in case of a machine reboot, crash, etc.)? ===<br />
If you installed ZNC using your distribution's package manager, it may have came with a set of scripts or configuration files for the distribution's init system. For systemd, run:<br />
<br />
sudo systemctl enable znc.service<br />
<br />
(Note that this does not work on the packages in the Debian repository itself; those do not include an init script)<br />
<br />
<br />
If you installed ZNC manually (from a tarball), you can add a cron entry to execute ZNC regularly. If there is already one copy of ZNC running on a particular config file, new copies won't be spawned. Example cron entry:<br />
*/10 * * * * /usr/local/bin/znc >/dev/null 2>&1<br />
This will check if ZNC is running every 10 minutes. If you load a module (like [[awaystore]]) that needs user input to run, you can add the input to the '''LoadModule''' line in your config file (ie. <code>LoadModule = awaystore yourpassword</code>).<br />
<br />
If you're using Vixie's cron, you can start it on start-up like this.<br />
<br />
@reboot /usr/local/bin/znc >/dev/null 2>&1<br />
<br />
You can also write an init script / configuration file to start ZNC using the init system, see [[Running ZNC as a system daemon]] for details.<br />
<br />
== Using ZNC ==<br />
<br />
=== ZNC dies when I power off the device it's running on! ===<br />
<br />
Of course, ZNC isn't magic. Like any other software, it doesn't run when you turn off or sleep your PC.<br />
<br />
If you want to stay connected while your own device is off/sleeping, ZNC must be running on some other machine somewhere. That could be an always-on PC/server in your home, a remote server that you control, or a [[providers|ZNC server run by someone else]]. If you were going to run it on your home PC—which you often power-off or sleep—consider getting a [[Wikipedia:Virtual private server|VPS]] or using a [[providers|ZNC provider]] instead. That way you can stay connected even when your device is off or sleeping.<br />
<br />
=== How do I tell ZNC which network/server a channel belongs to? ===<br />
<br />
<!--<br />
You don't. That's not how ZNC works (because the IRC protocol isn't capable of handling multiple servers in one connection and therefore no IRC clients can support it). You need to add one ZNC user per network (Note: since 0.207 it has been changed, user can have several networks now, see [[#Networks|Networks]]). Please also read the next question.<br />
--><br />
<br />
You have separate connection for all network. Please also read the next question.<br />
<br />
=== How to use multiple networks like with psybnc? ===<br />
ZNC works a bit differently since version 1.0. Each user can have multiple networks, but you need to connect ZNC multiple times; once per network. See [[FAQ#Why_do_I_get_an_.22Incorrect_Password.22_every_time_I_connect_even_though_my_pass_is_correct.3F|Why do I get an incorrect password every time I connect though my password is correct?]]<br />
<!--<br />
In order to choose which network, you format your server password like this:<br />
<br />
username/network:password<br />
<br />
For example, when you wish to connect to both freenode and efnet, open two separate connections with your client, one pointing at<br />
<br />
username/freenode:password<br />
<br />
and the other pointing at<br />
<br />
username/efnet:password<br />
<br />
For more detailed documentation on how to connect with several clients, refer to [[FAQ#How_do_I_connect_to_my_networks.3F|How do I connect to my networks?]]<br />
<br />
''Note: if you don't see options for multiple networks in your webadmin, it is strongly recommended you upgrade to the latest version of ZNC.''<br />
--><br />
<br />
=== I added several different servers, but ZNC connects only to one of them! ===<br />
You need to have separate user per IRC network (see previous question).<br />
(Note: since 0.207 it has been changed, user can have several networks now, see [[#Networks|Networks]])<br />
Additional servers for the same user are for fallback.<br />
If one server doesn't work, ZNC tries to connect to another server.<br />
So you can add several servers of one network to server list of one user.<br />
<br />
=== How do I choose which IP to use for connecting to IRC? ===<br />
<br />
By default user can choose any bindhost which means the host to use for connecting to IRC:<br />
/znc setuserbindhost 1.2.3.5<br />
/znc jump<br />
<br />
If you want to limit users to only one bindhost, go to webadmin and set the user bindhost as whatever you want and check the "deny setbindhost" checkbox.<br />
<br />
==== How can I force IPv4/IPv6 when connecting to the IRC ====<br />
<br />
To force IPv4:<br />
/znc setuserbindhost 0.0.0.0<br />
To force IPv6 bindhost:<br />
/znc setuserbindhost ::<br />
<br />
==== How can I have separate bindhost for IPv4 and IPv6? ====<br />
<br />
''IMPORTANT: ZNC cannot connect from IP address that is not available on your system.''<br />
<br />
===== If you have root access =====<br />
<br />
Edit the <code>hosts</code> file of your operating system and add:<br />
<br />
<pre><br />
0.0.0.0 my.awesome.vhost.example.com<br />
2001:4860:4860::8888 my.awesome.vhost.example.com<br />
</pre><br />
<br />
and tell ZNC to use it as bindhost:<br />
/znc setuserbindhost my.awesome.vhost.example.com<br />
<br />
With this configuration when IPv6 was used the bindhost would be 2001:4860:4860::8888 and when IPv4 was used, any available IPv4 address was used.<br />
<br />
===== If you don't have root access =====<br />
<br />
You must own a domain and set the A and AAAA records however you want into it or preferably subdomain. Then tell ZNC to bind on it with <code>/znc setuserbindhost my.awesome.vhost.example.com</code><br />
<br />
=== How do I add a new user? ===<br />
There are (at least) two ways to add a new user.<br />
<br />
The easiest way is to load and use the [[webadmin]] module.<br />
<br />
If you want to do it from IRC, load the [[controlpanel]] module and check out <code>/msg *controlpanel help</code>.<br />
<!--<br />
<br />
It's not suggested if you are new to ZNC, but it's also possible to add a new user via the config file. To do that, edit znc.conf and add a new <User> section. After that, rehash ZNC by issuing ''/msg *status rehash'' from IRC or ''kill -SIGHUP `pidof znc`'' from the shell.<br />
<br />
--><br />
<br />
=== Connecting with mIRC ===<br />
See [[MIRC]] for a detailed explanation on how to connect with mIRC.<br />
<br />
=== Connecting with Eggdrop ===<br />
<br />
See [[Eggdrop]] for a detailed explanation on how to connect Eggdrop.<br />
<br />
=== I got banned from #channel and ZNC keeps trying to rejoin ===<br />
Just do <code>/part #channel</code> and ZNC will remove the channel.<br />
<br />
=== How to use the loaded modules? ===<br />
/msg *modulename command<br />
or<br />
/znc *modulename command<br />
"*" is the StatusPrefix, which you can change in config file. You could start trying the help command which should work on all modules.<br />
<br />
=== I keep getting kicked for flood when I ... ===<br />
==== .. reattach bnc! ====<br />
This happens if you use "many" channels, due to IRC clients flooding the server with commands upon reattach. A workaround is decreasing size of buffer for each channel. (You should experiment how many is enough.)<br />
<br />
==== ... start bnc! ====<br />
<br />
There is [[Configuration|a per-User setting]] to control this:<br />
* '''MaxJoins''' - How many channels should ZNC join at once. Lower this if you get disconnected for 'Excess flood.<br />
<br />
==== Other tips ====<br />
<br />
Enable [[Configuration#Network|Flood]] settings and/or set them to be less generous (by increasing their values). Disabling Flood settings may lead to some cases where you are simply sending too much information to the server. This can be done via the Web Panel<br />
<br />
=== Every time I connect to my BNC, I see the channel buffers from the last time I connected! ===<br />
If you have a large channel buffer, it may be annoying to see the channel buffer every time you reconnect. To have ZNC erase the channel buffer every time you connect, set ''AutoClear Chan Buffer'' and ''AutoClear Query Buffer'' to true using either the [[webadmin]] or [[controlpanel]] module.<br />
<br />
/msg *controlpanel set AutoClearChanBuffer $me True<br />
/msg *controlpanel set AutoClearQueryBuffer $me True<br />
<br />
This will result in only the missed messages being played back to you upon reconnecting. Be careful if you use more than one client as znc will still see you as connected when one drops off and messages will not be buffered. Also, if your connection to znc dies unnaturally, znc might take a little bit to realize you're gone and thus not buffer a few of the messages that you haven't yet seen. The external [[playback]] module can help with this if your client supports it.<br />
<br />
==== I don't see buffer playback when attaching to ZNC! ====<br />
<br />
See also the previous question.<br />
<br />
If ''AutoClear Chan Buffer'' and ''AutoClear Query Buffer'' (commonly referred as ''AutoClear*Buffer'') are true, ZNC clears the buffers after they have been sent to client. This has some drawbacks such as sometimes the messages getting lost when client has lost network connection or another client not receiving messages, because one was already running and clearing buffers.<br />
<br />
/msg *controlpanel set AutoClearChanBuffer $me False<br />
/msg *controlpanel set AutoClearQueryBuffer $me False<br />
<br />
In case you wish to only clear buffers automatically for specific clients, take a look at the external [[clientbuffer]] module which is basically ''AutoClear*Buffer'' for clients added to it.<br />
<br />
Check also that your ''ChanBufferSize'' and ''QueryBufferSize'' are higher than 0 (disabled). They default to 50 meaning you get 50 lines of what was said before you attached to ZNC.<br />
<br />
=== What are BINDHOSTS and why can't I make mine work? ===<br />
<br />
̈́''VHOSTS were renamed into BINDHOSTs very long time ago, if you still see it in your ZNC, [[installation|upgrade]] immediately!''<br />
<br />
ZNC bindhost option controls the IP address ZNC will attempt to make connections to the IRC servers from. For this to be successful the computer you're running ZNC on '''must''' have this IP address configured and usable for your user. For it to show up as a host name on IRC there '''must''' be matching forward and reverse DNS in place. You can check this with:<br />
% host demo.znc.in<br />
demo.znc.in has address 208.84.148.90<br />
% host 208.84.148.90<br />
90.148.84.208.in-addr.arpa domain name pointer demo.znc.in.<br />
As long as the response looks similar then you should be able to<br />
/msg *status SetUserBindHost 208.84.148.90<br />
connect to IRC and check that it's working.<br />
<br />
If you find you are unable to connect to IRC after attempting to set bindhost options then it is likely you have set an IP address or host name that is not available on your computer. The easiest way to resolve this and get connected to IRC is to<br />
/msg *status ClearUserBindhost<br />
and try to connect again.<br />
<br />
To get rid of several misunderstandings vhost was renamed to bindhost since version [[ChangeLog/0.096|0.096]].<br />
<br />
=== I get 'Could not find znc-config. Please (re)install' when using znc-buildmod ===<br />
Your ZNC is too old, [[Installation|upgrade]].<br />
<br />
=== I keep getting a lot of stuff like /who replies when connected with multiple clients to one znc-user ===<br />
see user-module [[Route_replies]]<br />
<br />
=== How can I access webadmin with my browser? ===<br />
By default [[webadmin]] runs on the same PORT as your ZNC is accessible. So if you connect your IRC client to ZNC with server '''example.com''' and port '''6667''', then you would access webadmin by opening your web browser and going to the address '''<nowiki>http://example.com:6667</nowiki>'''.<br />
<br />
If ZNC listens using SSL, use the HTTP'''S''' protocol (http'''s'''://) instead of just HTTP (http://). If your web interface won't come up, please ensure that you are using the correct protocol for connecting. <br />
<br />
If you are using Google Chrome and keep getting an <tt>Error 312 (net::ERR_UNSAFE_PORT)</tt>, then try calling Chrome with the parameter <code>--explicitly-allowed-ports=<ZNC's port></code>.<br />
<br />
; Examples:<br />
:* Plaintext port on IPv4 localhost: <code><nowiki>http://127.0.0.1:8080</nowiki></code><br />
:* SSL port on IPv6 localhost: <code><nowiki>https://[::1]:8081</nowiki></code><br />
<br />
=== My IRC-Client doesn't allow multiple connections to one server/host ===<br />
Try to use different local aliases for the bnc-host.<br />
<br />
=== How to reload ZNC config without restart? ===<br />
The best way is '''NOT''' to change znc.conf and other files manually while ZNC is running.<br />
Use [[webadmin]] or [[controlpanel]] instead, or use <code>/msg *status help</code><br />
<br />
If you really need to do something in znc.conf, stop ZNC, make your changes and start it again.<br />
<br />
If you ''really'' need to rehash config from file without restart, there're 2 ways to do that: from IRC (<code>/msg *status rehash</code>)<br />
and from shell (<code>pkill -SIGHUP znc</code>). But don't complain if something is broken (because it ''will'' be broken for sure)<br />
<br />
=== [10053] Software caused connection abort ===<br />
Socket error 10053 can be caused by attempting to connect without SSL to a znc bouncer with SSL enabled (or vice versa). Refer to your IRC-client's documentation on how to establish a SSL-secured connection to a server.<br />
<br />
=== How to store private messages even when user is attached, so other clients can see them? ===<br />
<br />
Upgrade to ZNC 1.6.0+ (see [[query_buffers]]) and disable "Auto Clear Query Buffer" (for storing channel messages, disable "Auto Clear Chan Buffer") using either [[webadmin]] or [[controlpanel]].<br />
<!--<br />
<br />
''Pre-1.6.0:'' Here's simple workaround.<br />
<br />
First, you should know number of wanted clients. Let's say that you want 3 clients: 1 hexchat and 2 irssi-s. Let's say that your username is johndoe.<br />
<br />
Make following users: johndoe_ircd, johndoe_hexchat, johndoe_irssi1, johndoe_irssi2. This naming scheme isn't strict - everything is up to you.<br />
Set StatusPrefix for "client users" to something else, for example ^, because otherwise you won't be able to speak to both *status-es.<br />
<br />
Connect user johndoe_ircd to IRC server. Connect users johndoe_hexchat, johndoe_irssi1 and johndoe_irssi2 to 127.0.0.1 to the same ZNC, to user johndoe_ircd.<br />
<br />
Connect hexchat to johndoe_hexchat, and irssis to johndoe_irssiN.<br />
<br />
<pre><br />
___________________________________________________<br />
/ \<br />
| ZNC |<br />
| via 127.0.0.1 |<br />
hexchat ----|> user "johndoe_hexchat"----------\ |<br />
| v |<br />
irssi1 -----|> user "johndoe_irssi1" ---|> user "johndoe_ircd" -----|> IRC server<br />
| ^ |<br />
irssi2 -----|> user "johndoe_irssi2" ----------/ |<br />
| |<br />
\___________________________________________________/<br />
</pre><br />
This way, every private message that johndoe_ircd gets, is sent to all "client users", and they remain in those buffers until that client reads them.<br />
<br />
--><br />
<!-- Note: in 1.0+ you can use either networks instead of users, if that suits you better. (uncomment this if/when network can have own statusprefix) --><br />
<br />
=== Networks ===<br />
<br />
==== What is this new network support? ====<br />
<br />
It means you can add multiple IRC networks such as EFnet and freenode onto a single user. Instead of creating multiple users for each network like you did in versions before 1.0.<br />
<br />
==== How do I connect to my networks? ====<br />
<br />
When you supply your username to ZNC in your client, you can include the network as `username/network`. If you send your username in the server password field you can use `username/network:password`.<br />
<br />
There needs to be one connection between the client and the ZNC if you wish to connect to multiple networks at the same time.<br />
<br />
As every IRC client is slightly different, please consult the documentation for your IRC client on where to put the server password, or if you wish to configure autoconnect when the IRC client starts.<br />
<br />
'''Examples for mIRC, irssi, and HexChat:'''<br />
<br />
'''Note:''' Where ''1.2.3.4'' is an IP your ZNC instance is listening on, ''7777'' and ''7778'' are the port numbers the listeners are using, ''ZNCUser'' is the name of the ZNC user account, and ''PassWord'' is the password. In these examples, the second line uses SSL whereas the first one does not.<br />
<br />
'''Note:''' The network name is arbitrarily defined when setting it up in ZNC, though many users will use the name of the actual network for clarity.<br />
<br />
[[HexChat]]:<br />
<pre><br />
/server 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -ssl 1.2.3.4 7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
[[Irssi]]:<br />
<pre><br />
/server 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -SSL 1.2.3.4 7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
[[mIRC]]:<br />
<pre><br />
/server -m 1.2.3.4 7778 ZNCUser/EFnet:PassWord<br />
/server -m 1.2.3.4 +7777 ZNCUser/freenode:PassWord<br />
</pre><br />
<br />
==== Is it the same as in psybnc? ====<br />
<br />
No, ZNC doesn't use stupid tags for networks, which mix up different channels and nick together to one big network with prefixes.<br />
Instead, you should connect to ZNC multiple times, once for each network, see previous question on how to do that.<br />
Also you may switch between networks on the fly via <code>/msg *status JumpNetwork</code> command.<br />
<br />
If ZNC ever supports connecting to all networks together, it will be done properly, without those prefixes, but via an IRC protocol extension instead.<br />
Also that extension should be standardized at [http://ircv3.net IRCv3], to allow client developers to support it easier.<br />
<br />
''[https://github.com/ircv3/ircv3-specifications/pull/92 There is proposal to IRCv3 about this.]''<br />
<br />
=== How much memory does ZNC need to run? ===<br />
<br />
This question is very difficult to answer because it depends highly on how much you use it. However, personal ZNC instances, where you are the only user, are unlikely to require a great deal of memory to run.<br />
<br />
In an effort to give a better idea of how much memory ZNC may use in different situations, a page with anecdotal reports from users has been added. It may be found here: [[ZNC_Memory_Usage|ZNC Memory Usage]]<br />
<br />
Please update the page with your reports.<br />
<br />
=== My NickServ password is stored in plaintext! ===<br />
<br />
Of course, how could ZNC identify you to services otherwise?<br />
<br />
Your ZNC password is hashed in the config file as ZNC doesn't have to know your password, because when you login your password is hashed and compared to the hash in the config file. ZNC cannot do hashing or anything else to other passwords without losing ability to use them.<br />
<br />
In theory storing passwords encrypted some way would be possible, but that would require password inputting during ZNC startup preventing starting ZNC automatically and your passwords would still be readable from memory.<br />
<br />
If you are using a provider and do not trust them with your credentials, seek a different provider or host ZNC yourself.<br />
<br />
Note also that [[cert]] isn't any more secure then password if you don't trust the provider. Malicious provider can use it to identify as you and do everything as you including changing your password.<br />
<br />
=== Why does ZNC connect with my altnick? ===<br />
<br />
The exact answer is impossible, other than check <code>znc -D</code> for what happens. Most likely there was connection issue between ZNC and the server.<br />
<br />
[[Keepnick]] should always take your primary nick when it becomes free. Alternatively if you want to get your primary nick on connect you can configure [[SASL]] and set [[perform]] to regain your nick (with Atheme IRC services) <code>/msg *perform add NICKSERV REGAIN %defnick%</code>.<br />
<br />
=== How can I make ZNC disconnect when I'm not using it? ===<br />
<br />
[[File:Overview network scheme.png|thumb|128px|ZNC's reason to exist]]The primary reason ZNC exists is to keep you connected to IRC while your client is disconnected. However, some people have found other uses for ZNC and want it to disconnect or even shut down when their IRC client isn't connected.<br />
<br />
==== Disconnect ZNC from IRC when the client quits ====<br />
<br />
You can use the [[:Category:External Modules|external module]] '''[[simple_disconnect]]''' to cause ZNC to disconnect from the IRC server when your client quits. If, for whatever reason, ZNC doesn't connect to the IRC network the next time you connect your IRC client to ZNC, simply issue the command <code>/znc connect</code> to manually initiate the connection between ZNC and the IRC network.<br />
<br />
==== Quit ZNC when the client quits ====<br />
<br />
You probably just want to disconnect ZNC rather than shut it down (see [[{{FULLPAGENAME}}#Disconnect ZNC from IRC when the client quits|previous section]]). You can make ZNC quit when you disconnect, but you will then need to access the host machine (via physical access or SSH) and restart ZNC to connect your IRC client to ZNC again; obviously you can't connect your client to ZNC if ZNC is not running.<br />
<br />
You can use the [[:Category:External Modules|external module]] '''[[antiperform]]''' to issue commands at the time your IRC client disconnects from ZNC. Add the antiperform command <code>PRIVMSG *status :shutdown</code> to quit ZNC upon disconnecting your IRC client from ZNC. To reconnect, you must first re-launch ZNC on the host machine (for example, <code>ssh user@host.com 'znc'</code>) before connecting your IRC client to ZNC again.<br />
<br />
=== I forgot my password! How do I reset my ZNC password? ===<br />
<br />
On the host running ZNC, open a terminal and issue the command:<br />
znc --makepass<br />
<br />
You will then be able to create a new password:<br />
[ ** ] Type your new password.<br />
[ ?? ] Enter password:<br />
[ ?? ] Confirm password:<br />
<br />
Once the new password is entered, you will be instructed on how to update your config file to use the new password:<br />
[ ** ] Kill ZNC process, if it's running.<br />
[ ** ] Then replace password in the <User> section of your config with this:<br />
<Pass password><br />
Method = sha256<br />
Hash = 846696ed153511170264b41b51008d2c0ccc96929f9e268926857677b50d98dd<br />
Salt = +zHiaj0~Ci:d6]/`nPizT:+e<br />
</Pass><br />
[ ** ] After that start ZNC again, and you should be able to login with the new password.<br />
<br />
=== How do I reload znc.pem? ===<br />
<br />
znc.pem is currently (1.6.2) reloaded every time client connects to ZNC. It'll be fixed in future (https://github.com/znc/znc/issues/1215)<br />
<br />
== Troubleshooting ==<br />
<br />
=== My SSL certificate has expired ===<br />
<br />
If your ZNC SSL certificate has expired, you can delete the old one (the filename is znc.pem) and generate a new one with the following command:<br />
znc --makepem<br />
<br />
=== My client supports server-time and all timestamps are wrong ===<br />
<br />
Your clock is in wrong time either on your PC or the server you run ZNC on. Consider using NTP (Network Time Protocol) to keep your clocks on the right time.<br />
<br />
''[http://support.ntp.org/bin/view/Support/WindowsTimeService Windows users: time.windows.com isn't known for its accuracy. ]''<br />
<br />
* If you use systemd: <code>sudo timedatectl set-ntp true</code><br />
* Windows/Linux/OS using ntp: [http://www.pool.ntp.org/en/use.html using pool.ntp.org]<br />
** Windows (10): Start → Settings → Time and language → Add clocks for different timezones → Internet-time → Change settings, type <code>pool.ntp.org</code> and click OK.<br />
* OS X: System Preferences → Date and Time → (click the lock and) check "Set date and time automatically:" and enter <code>pool.ntp.org</code>.<br />
<br />
=== My question isn't answered here ===<br />
<br />
Hop on [irc://chat.freenode.net/#znc #znc@chat.freenode.net] and ask! Usually someone's around, but if no one replies, just wait for a while.<br />
<br />
=== Where do I report bugs? ===<br />
<br />
Create a new issue [https://github.com/znc/znc on GitHub].<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2473Signed SSL certificate2018-08-31T17:58:40Z<p>Teward: /* Certbot */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Certbot ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 2 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,fullchain}.pem > znc.pem<br />
<br />
If you are using an older version of the Let's Encrypt client that does not create fullchain.pem, use this one:<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
===== Automating znc.pem creation =====<br />
<br />
You can automate the process of creating a <code>znc.pem</code> file every time your certificate is renewed by adding a deploy hook to <code>/etc/letsencrypt/renewal-hooks/deploy</code> like so:<br />
<br />
<pre><br />
$ cd /etc/letsencrypt/renewal-hooks/deploy<br />
$ touch update-znc.pem<br />
$ chmod +x update-znc.pem<br />
$ vim update-znc.pem<br />
</pre><br />
<br />
<pre><br />
#!/bin/bash<br />
YOURDOMAIN="example.com"<br />
<br />
[[ $RENEWED_LINEAGE != "/etc/letsencrypt/live/$YOURDOMAIN" ]] && exit 0<br />
echo "Updating certs"<br />
cat /etc/letsencrypt/live/$YOURDOMAIN/{privkey,fullchain}.pem > /var/lib/znc.pem<br />
</pre><br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt dh2048.pem > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2471Signed SSL certificate2018-08-31T16:38:51Z<p>Teward: /* Official Client */ fullchain includes both the endpoint cert and the intermediate chain, this should be sufficient going forward</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 2 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,fullchain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt dh2048.pem > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.</div>Tewardhttps://wiki.znc.in/index.php?title=Template:Providers/table&diff=2446Template:Providers/table2018-07-10T16:34:57Z<p>Teward: Remove EliteBNC per their request - their service management is offline with no ETA on restoration, meaning they can't operate as a service at the moment.</p>
<hr />
<div><noinclude><br />
<!-- <br />
======================================================================<br />
For location codes, please refer to https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2<br />
Use exceptions, most notably UK instead of GB, listed here https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Exceptional_reservations<br />
====================================================================== <br />
Providers are sorted by "Date Started", which is either the date in which the provider officially started delivering services, the date <br />
their domain was registered (if reliable information), or the date added to the ZNC table list.<br />
--><br />
</noinclude>[<span class="plain links">[{{fullurl:Template:Providers/table|action=edit}} Edit data]</span>]<br />
{| class="wikitable sortable" border="1"<br />
! rowspan="2" | Provider<br />
! colspan="2" | Max Networks per User<br />
! rowspan="2" | ZNC Version<br />
! rowspan="2" | Language<br />
! rowspan="2" class="unsortable" | IRC Support<br />
! rowspan="2" | Date Started<br />
! rowspan="2" class="unsortable" | ZNC locations<br><small style="font-weight:normal">([[wikipedia:ISO 3166-1 alpha-2#Officially_assigned_code_elements|country codes]], using [[wikipedia:ISO 3166-1 alpha-2#Exceptional_reservations|exceptions]])</small><br />
|-<br />
! Default<br />
! Premium<br />
|-<br />
|[https://www.xshellz.com xShellz]<br />
| 2<br />
| data-sort-value="30" | 12, 20, or 30<br />
| 1.6.1<br />
| English<br />
| {{irc|chat.freenode.net|xShellz}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2009-03-01<br />
| <abbr title="United States of America">US</abbr>, <abbr title="United Kingdom">UK</abbr><br />
|-<br />
|[https://panicbnc.net/ PanicBNC]<br />
| 2<br />
| unlimited<br />
| 1.5-git*<br />
| English<br />
| {{irc|irc.esper.net|PanicBNC}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2012-02-01<br />
| <abbr title="Australia">AU</abbr>, <abbr title="Canada">CA</abbr>, <abbr title="Germany">DE</abbr>, <abbr title="France">FR</abbr>, <abbr title="Japan">JP</abbr>, <abbr title="Netherlands">NL</abbr>, <abbr title="Poland">PL</abbr>, <abbr title="Singapur">SG</abbr>, <abbr title="United Kingdom">UK</abbr>, <abbr title="United States of America">US</abbr><br />
|-<br />
|[https://znc.bg ZNC.BG]<br />
| 1<br />
|<br />
| 1.6.3* <br />
| English<br />
| {{irc|irc.v.bg|znc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2016-01-25<br />
| <abbr title="Bulgaria">BG</abbr>, <abbr title="Czech Republic">CZ</abbr>, <abbr title="Germany">DE</abbr>, <abbr title="Italy">IT</abbr><br />
|-<br />
|[https://suchznc.net SuchZNC]<br />
| unlimited<br />
|<br />
| 1.7-git*<br />
| English<br />
| {{irc|chat.freenode.net|suchznc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-05-09<br />
| <abbr title="Netherlands">NL</abbr><br />
|-<br />
|[https://znc.gamers.bg ZNC Gamers]<br />
| 1<br />
|<br />
| 1.6.5* <br />
| English<br />
| {{irc|irc.gamers.bg|znc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2017-11-15<br />
| <abbr title="Bulgaria">BG</abbr><br />
|-<br />
|[https://bncfor.me bncforme]<br />
| 4<br />
| unlimited<br />
| 1.6.5 <br />
| English<br />
| {{irc|chat.freenode.net|bncforme}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-01-01<br />
| <abbr title="United States of America">US</abbr>, <abbr title="United Kingdom">UK</abbr>, <abbr title="Netherlands">NL</abbr><br />
|-<br />
|[http://viaplus.weebly.com/bouncers.html Viaplus BNC]<br />
| 6 (specified)<br />
| <br />
| 1.6.6<br />
| Spanish / English<br />
| {{irc|chat.freenode.net|viaplus-bnc}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-02-21<br />
| <abbr title="Canada">CA</abbr>, <abbr title="United States of America">US</abbr><br />
|-<br />
|[http://bnc4you.ml bnc4you]<br />
| 2<br />
| <br />
| 1.6.6<br />
| English<br />
| {{irc|chat.freenode.net|bnc4you}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-03-03<br />
| <abbr title="Turkey">TR</abbr><br />
|-<br />
|[http://www.bnc-house.com BNC-House]<br />
| 3<br />
| Unlimited<br />
| 1.7.0<br />
| English<br />
| {{irc|chat.freenode.net|BNC-House}}<br />
| <span style="display:none">&{{#expr:3e11+{{#time:U|..}}}}</span>2018-04-20<br />
| <abbr title="Italy">IT</abbr><br />
|-<br />
|}</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2407Signed SSL certificate2018-04-23T04:11:45Z<p>Teward: /* CA-specific application of the general advice above */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt dh2048.pem > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2406Signed SSL certificate2018-04-23T04:11:25Z<p>Teward: /* CACert */ Unencrypted privkey data recommendation was moved to General Advice.</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt dh2048.pem > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2405Signed SSL certificate2018-04-23T04:08:54Z<p>Teward: /* CACert */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt dh2048.pem > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.<br />
<br />
Note that it is critical to use an unencrypted, non-passworded private key here as ZNC is not able to be given the password for a password-protected key file. This prevents ZNC from reading the encrypted keyfile, and leads to SSL handshake failures and issues; it is therefore critical to use a non-encrypted, non-password-protected private key file for the certificate.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2404Signed SSL certificate2018-04-23T04:08:43Z<p>Teward: /* CACert */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. As per the 'general' advice above, create DH parameters to include with the certificate ('''Warning: this will take some time to complete'''): <code>openssl dhparam 2048 -out dh2048.pem</code><br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.<br />
<br />
Note that it is critical to use an unencrypted, non-passworded private key here as ZNC is not able to be given the password for a password-protected key file. This prevents ZNC from reading the encrypted keyfile, and leads to SSL handshake failures and issues; it is therefore critical to use a non-encrypted, non-password-protected private key file for the certificate.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2403Signed SSL certificate2018-04-23T04:06:56Z<p>Teward: /* General advice */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
Make sure that the certificate private key file is not encrypted and does not have password protection on it, ZNC is unable to properly handle encrypted private key files.<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.<br />
<br />
Note that it is critical to use an unencrypted, non-passworded private key here as ZNC is not able to be given the password for a password-protected key file. This prevents ZNC from reading the encrypted keyfile, and leads to SSL handshake failures and issues; it is therefore critical to use a non-encrypted, non-password-protected private key file for the certificate.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2402Signed SSL certificate2018-04-23T03:57:32Z<p>Teward: /* CACert */</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for this, do the following steps:<br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.<br />
<br />
Note that it is critical to use an unencrypted, non-passworded private key here as ZNC is not able to be given the password for a password-protected key file. This prevents ZNC from reading the encrypted keyfile, and leads to SSL handshake failures and issues; it is therefore critical to use a non-encrypted, non-password-protected private key file for the certificate.</div>Tewardhttps://wiki.znc.in/index.php?title=Signed_SSL_certificate&diff=2401Signed SSL certificate2018-04-23T03:54:21Z<p>Teward: /* CA-specific application of the general advice above */ Add CACert help guildelines.</p>
<hr />
<div>If you're not going to be the only person using the ZNC instance, you may want to consider using signed SSL certificates. Signed SSL certificates are generated by third-party companies, such as [https://letsencrypt.org/ Let's Encrypt], [http://www.positivessl.com/ PositiveSSL], [http://www.verisign.com/ VeriSign], or others, and will not cause "self-signed certificate" errors when used with an IRC client.<br />
<br />
== General advice ==<br />
<br />
<code>znc.pem</code> '''must''' contain everything in order from the "most private" to the "most public" entries, except for the root certificate.<br />
<br />
E.g. it may be something like this:<br />
<br />
cat your-certificate-private.key > znc.pem<br />
cat your-certificate.crt >> znc.pem<br />
cat intermediate-certificate-of-ca.crt >> znc.pem # If your certificate wasn't signed by CA root certificate directly.<br />
# cat ca-root.crt >> znc.pem # Possible, but useless. If client knows this CA, this is redundant. If client doesn't know this CA, it's not trusted anyway.<br />
<br />
You should also generate the Diffie–Hellman key exchange parameters, also appended to znc.pem:<br />
<br />
openssl dhparam -out dhparam.pem 2048<br />
cat dhparam.pem >> znc.pem<br />
<br />
The dhparam file doesn't have to be kept secret, and can be used multiple times; substitute 2048 for your private key's bit size.<br />
<br />
To apply this new certificate file to ZNC, just put (replace) it in ZNC's work folder.<br/><br />
As of 1.6.2, ZNC will reload <code>znc.pem</code> each time a client connects, but it'll be fixed in future.<br />
<br />
Below you may find more specific instructions how to configure certs from few CAs, contributed by various people.<br />
<br />
== CA-specific application of the general advice above ==<br />
:Why this section is even needed?... --[[User:DarthGandalf|DarthGandalf]] ([[User talk:DarthGandalf|talk]]) 09:11, 4 December 2015 (UTC)<br />
<br />
=== PositiveSSL ===<br />
<br />
This is how I ([[User:Wayne_Arthurton|Wayne_Arthurton]]) created a Positive SSL certificate for znc.<br />
<br />
# <code>openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr</code><br />
# Submit server.csr to PositiveSSL<br />
# Once you receive your SSL Bundle zip, uncompress<br />
# <code>cat myserver.key > ~/.znc/znc.pem</code><br />
# <code>cat host_domain_com.crt >> ~/.znc/znc.pem</code><br />
# <code>cat PositiveSSLCA2.crt >> ~/.znc/znc.pem</code><br />
# <code>cat AddTrustExternalCARoot.crt >> ~/.znc/znc.pem</code><br />
<br />
That should do it. Drop a note on my Wiki Page if you need any more help.<br />
<br />
To use a PositiveSSL, this seemed to be the recipe<br />
<br />
=== LetsEncrypt ===<br />
<br />
'''Caveat:''' Let's Encrypt does not currently support IP addresses, if you want to use a Let's Encrypt certificate you'll need to be on a (sub-)domain. Additionally, they have a 90-day expiry, so it's a good idea to set up a cron job to reissue a cert every so often (monthly works).<br />
<br />
==== Official Client ====<br />
<br />
If you're using the official Let's Encrypt client, assuming you have your certificate in ''/etc/letsencrypt/live/example.org/'', here is how you can make a ''znc.pem'' from it (concatenate the 3 files together):<br />
<br />
cat /etc/letsencrypt/live/example.org/{privkey,cert,chain}.pem > znc.pem<br />
<br />
You need to repeat this every time you obtain a new certificate.<br />
<br />
==== Caddy ====<br />
<br />
[https://caddyserver.com/ Caddy] is a web server (alike Apache or nginx) with automatic HTTPS through LetsEncrypt.<br />
The certificate files generated through Caddy can be used for ZNC, although they have to be concatenated just like with the official client.<br />
<br />
Here's how you can make a ''znc.pem'' from them:<br />
<br />
cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
Just like with the official client, you will need to repeat this every time Caddy obtains a new certificate.<br />
This can be automated to copy every month using a cronjob, like so:<br />
<br />
0 0 1 * * cat /etc/ssl/caddy/.caddy/acme/acme-v01.api.letsencrypt/sites/example.org/example.org.{key,crt} > /var/lib/znc/znc.pem<br />
<br />
==== Alternative Setup ====<br />
<br />
This is a very quick install using a small, dependency-free, auditable python script: [https://github.com/diafygi/acme-tiny acme-tiny]. I recommend working in a separate directory, and then moving/symlinking the final cert into the config file afterward.<br />
<br />
First, generate some RSA keys. The account key is your letsencrypt account, and can be reused for multiple domain keys if you're managing a lot of servers. For a private install it's easiest to just generate a new throwaway. Do replace <nowiki>yoursite.com</nowiki> with the appropriate value, here.<br />
<br />
openssl genrsa 4096 > account.key<br />
openssl genrsa 4096 > domain.key<br />
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr<br />
<br />
Next, we need to set up a challenge-response folder available from port 80. If your server has a web server available you'll need to hook into it temporarily (see the docs on the acme-tiny repo). If you do not have a web server, you can spin up a temporary one with python:<br />
<br />
mkdir -p .well-known/acme-challenge/<br />
sudo python -m SimpleHTTPServer 80 &<br />
<br />
Now, download that script (and audit it if you're paranoid about malicious code), and run it get your signed cert. Then, we pull down the cross-signed cert to build our certificate chain, and smush all the files together for our final znc.pem:<br />
<br />
python acme_tiny.py \<br />
--account-key ./account.key \<br />
--csr ./domain.csr \<br />
--acme-dir ./.well-known/acme-challenge/ \<br />
> ./signed.crt<br />
<br />
wget <nowiki>https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem</nowiki><br />
cat domain.key signed.crt lets-encrypt-x3-cross-signed.pem > znc.pem<br />
<br />
Don't forget to kill the temporary web server if you started it up, and then copy/symlink the certificate into place.<br />
<br />
If you want/need to set up automatic renewals, you'll probably need to set up a permanent web server hosting the acme-challenge folder, and otherwise the shell script is identical to the last code block above, <br />
except with absolute paths.<br />
<br />
<br />
=== CACert ===<br />
<br />
To use a [http://www.cacert.org CACert] certificate, you need to do several things. Within a dedicated folder for these <br />
<br />
#. Create an '''unencrypted''' key for the server and the corresponding CSR: <code>openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr</code><br />
#. Send the CSR to CACert and wait for them to issue you a certificate. Once you retrieve the certificate in text format from their site, copy that text and put it into the file called <code>server.crt</code><br />
#. Download both the [https://www.cacert.org/certs/root.crt CACert Root CA certificate] and the [https://www.cacert.org/certs/class3.crt CACert Intermediate certificate] to the same folder.<br />
#. Concatenate all the certificates and the key together with the following code: <code>cat server.key server.crt class3.crt root.crt > znc.pem</code><br />
#. Take the complete <code>znc.pem</code> file and put it in the ZNC configuration directory, overwriting any preexisting <code>znc.pem</code> file in the directory (or move the <code>znc.pem</code> file to another name and create a new <code>znc.pem</code> file with the certificate from CACert).<br />
<br />
Once this is completed you can now use the CACert certificate for your ZNC.</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2271Installation2017-12-11T03:22:43Z<p>Teward: /* Build from Source: CentOS 7 */</p>
<hr />
<div>{{Languages}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <code>./configure</code><br />(use '''<code>--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> if you have a non-standard SSL path)<br />(use <code>--help</code> to see other configure options)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions. <br />
<br />
=== Debian ===<br />
{{ambox | type = delete | text = Prior to Debian Sid (Unstable) including Wheezy, Squeeze, and Lenny, 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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using:<br />
aptitude install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7+ only ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
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]].'''<br />
<br />
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== rc.d scripts (deprecated)====<br />
<br />
You may also be interested in rc.d scripts for znc which can be installed with:<br />
<br />
pacman -U https://github.com/downloads/kylef/znc-arch/znc-system-wide-1.0-1-any.pkg.tar.xz<br />
<br />
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].<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or <br />
<br />
pkg_add -r znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2270Installation2017-12-11T03:21:51Z<p>Teward: /* Fedora/CentOS/Red Hat Enterprise Linux */ Add CentOS 7 "Build from Source" link to instructions written by Thomas Ward</p>
<hr />
<div>{{Languages}}<br />
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.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [https://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [https://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <code>./configure</code><br />(use '''<code>--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> if you have a non-standard SSL path)<br />(use <code>--help</code> to see other configure options)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions. <br />
<br />
=== Debian ===<br />
{{ambox | type = delete | text = Prior to Debian Sid (Unstable) including Wheezy, Squeeze, and Lenny, 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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using:<br />
aptitude install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
==== Build from Source: CentOS 7 ====<br />
<br />
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.<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
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]].'''<br />
<br />
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== rc.d scripts (deprecated)====<br />
<br />
You may also be interested in rc.d scripts for znc which can be installed with:<br />
<br />
pacman -U https://github.com/downloads/kylef/znc-arch/znc-system-wide-1.0-1-any.pkg.tar.xz<br />
<br />
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].<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or <br />
<br />
pkg_add -r znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=User:Teward/ZNC_From_Source:_CentOS_7&diff=2269User:Teward/ZNC From Source: CentOS 72017-12-11T03:14:02Z<p>Teward: Created page with "'''''Compiling ZNC from Source on CentOS 7 is non-trivial and requires us to enable EPEL in order to properly get build dependencies, as well as install some tools that may no..."</p>
<hr />
<div>'''''Compiling ZNC from Source on CentOS 7 is non-trivial and requires us to enable EPEL in order to properly get build dependencies, as well as install some tools that may not exist on a standard CentOS box.''''' YMMV here.<br />
<br />
The following is a step-by-step guide to get ZNC 1.6.5 to compile properly from source on CentOS 7, for the bare minimum (that is, it does not include the Perl, Python, Cyrus, or TCL build dependency options necessary for some of the optional plugins in ZNC).<br />
<br />
'''NOTE: These instructions all assume you are operating as the system superuser (aka 'root'). If you are not a superuser, but instead use 'sudo', then if you get permission errors you should prepend 'sudo' to the commands listed - but only if you get permission denied errors or such. Alternatively, drop to a 'root' user prompt and execute all these commands.'''<br />
<br />
<ol><br />
<li />Install some dependencies and tools we'll need.<br /><br />
<pre>yum install yum-utils wget</pre><br />
<li />Install the CentOS 7 EPEL repository, so we can get a valid set of build dependencies for ZNC.<br /><br />
<pre>wget -O /tmp/epel-release-latest-7.noarch.rpm http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm<br />
rpm -ivh /tmp/epel-release-latest-7.noarch.rpm</pre><br />
<li />Update your <code>yum</code> cache.<br /><pre>yum makecache</pre><br />
<li />Install build-dependencies for ZNC, using the existing ZNC package in EPEL as a base for dependencies only.<br /><br />
<pre>yum-builddep znc</pre><br />
<li />Install additional build-environment tools (thank you to [https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/ this blog post on CyberCiti.biz for installing some dev tools in CentOS7]). Just installing the ZNC build dependencies doesn't put everything we need on, so we have to explicitly install things.<br /><br />
<pre>yum install autoconf automake gcc gcc-c++ make pkgconfig patch gettext</pre><br />
<li />Download the ZNC source code from the [https://wiki.znc.in/ZNC main page], and extract the data.<br />
<li />Go into the extracted source directory, and then begin the configuration, compiling, and installation of ZNC. (This set of steps could take some time, especially for compiling.)<br /><br />
<pre>./configure<br />
make<br />
make install</pre><br />
</ol><br />
<br />
Just a note that when you run <code>./configure</code> you should see output similar to this, indicating you can install and use it properly:<br />
<br />
<pre>ZNC 1.6.5 configured<br />
<br />
prefix: /usr/local<br />
debug: no<br />
ipv6: yes<br />
openssl: yes<br />
dns: threads<br />
perl: no<br />
python: no<br />
swig: not needed<br />
cyrus: no<br />
tcl: no<br />
charset: yes<br />
zlib: yes<br />
run from src: no</pre></div>Tewardhttps://wiki.znc.in/index.php?title=User:Teward/Debian_Package_Repository_for_ZNC&diff=2115User:Teward/Debian Package Repository for ZNC2017-05-14T17:32:59Z<p>Teward: Restore from WayBack machine; add "OFFLINE" notice for now.</p>
<hr />
<div>{{ambox | type = delete | text = This Repository is currently offline due to server death causing issues. The maintainer is looking into potential alternative solutions for running this repository, but will very likely have to reissue all the data on new domains. }}<br />
<br />
<br />
== About ==<br />
<br />
There is a ZNC repository available for Debian. It is built in local builders by the same person who provides the Ubuntu PPAs. The packages included here are the same as in the PPA, and are derived from the latest packages already available in Debian. It is provided from the domain <code>packages.temporal-intelligence.net</code>.<br />
<br />
===Repository Limitations===<br />
This repository only supports i386 and amd64 architectures. Virtualizing an armhf build environment allows packages to build, but the resultant packages themselves are glitchy and do not work correctly nor do they correctly install most of the time.<br />
<br />
Currently, the repository only supports certain releases of Debian. Refer to the table at the end of this page for more information on this.<br />
<br />
== Using the Repository ==<br />
<br />
The repository can be used by adding a file to <code>/etc/apt/sources.list.d/</code> with the package support lines here. You will also need to add the repository GPG keys.<br />
<br />
<br />
First, create a file named <code>znc.list</code> in <code>/etc/apt/sources.list.d</code>, and add the following line to the file, replacing <code>!RELEASE!</code> with the Debian version you are on. Uncomment the second line if you intend to sue <code>apt-get source znc</code> to download the source package itself, otherwise leave the file alone so that it is just able to install the built packages:<br />
<br />
<pre>deb http://packages.temporal-intelligence.net/znc/debian/ !RELEASE! main<br />
#deb-src http://packages.temporal-intelligence.net/znc/debian/ !RELEASE! main</pre><br />
<br />
<br />
Secondly, download the GPG key and add it to the APT keyring (you will need superuser access to use <code>apt-key</code>):<br />
<br />
<pre>wget --quiet http://packages.temporal-intelligence.net/repo.gpg.key -O - | apt-key add -</pre><br />
<br />
<br />
Finally, run <code>apt-get update; apt-get install znc</code> after doing the above steps. You should now be able to install ZNC from this repository.<br />
<br />
<br />
<br />
== Repository Information Chart ==<br />
<br />
The following is a list of information in the repository:<br />
<br />
<!-- <br />
#FF6666 red<br />
#FFFF00 yellow<br />
#66FF66 green<br />
--><br />
{| class="wikitable" style="text-align: center;"<br />
|+VERSIONS OF DEBIAN SUPPORTED BY REPOSITORY<br />
! Release (Codename/Version)<br />
! Supported?<br />
! Repository Version<br />
! Supported Architectures<br />
! Other Details<br />
|- style="background-color:#66FF66;"<br />
!Wheezy (7 / Old Stable)<br />
|Yes<br />
|<code>1.6.1-1+wheezy0</code><br />
|i386,amd64<br />
|Uses backported build dependencies.<br />
|- style="background-color:#66FF66;"<br />
!Jessie (8 / Stable)<br />
|Yes<br />
|<code>1.6.1-1+jessie0</code><br />
|i386, amd64<br />
|<br />
|- style="background-color:#FFFF00;"<br />
!Stretch (9? / Testing)<br />
|No<br />
| -<br />
| -<br />
|Debian Testing already has the latest version from Debian available to it.<br />
|- style="background-color:#FFFF00;"<br />
!Sid (Unstable)<br />
|No<br />
| -<br />
| -<br />
|Debian Unstable already has the latest version from Debian available to it.<br />
|- style="background-color:#FFFF00;"<br />
!Experimental<br />
|No<br />
| -<br />
| -<br />
|Debian Experimental already has the latest version from Debian available to it.<br />
|}<br />
<br />
NOTE: When a version number is VERSION-#+RELEASE# (where # is a number and RELEASE is a Debian release codename), it indicates a Debian package revision number. Exact changes exist in the changelogs for the package, but usually do not change features as much. (Usually these are just fixes, or inclusion of things that got missed initially)<br />
<br />
<br />
== Frequently Asked Questions (FAQ) ==<br />
<br />
* "Is there going to be ARM support in the repository?"<br />
** Hopefully, at some point. I'm trying to get my hands on a couple of RPi devices to act as my building cluster, because virtualized/chrooted ARM builds don't produce packages that reliably work. No ETA on when this will be available, though.<br />
<br />
* "Can you apply feature XYZ that was not included in ZNC on the version on the repos?"<br />
** '''Do Not Ask This'''. Features are only added as compatibility fixes (say, to fix a Fail to Build problem), and are not added to this repository - it's as close to stock ZNC as it will ever be.</div>Tewardhttps://wiki.znc.in/index.php?title=Installation&diff=2114Installation2017-05-14T17:28:54Z<p>Teward: /* Debian */ Third party repo offline indefinitely - server death is evil.</p>
<hr />
<div>{{Languages}}<br />
There are several possibilities to install ZNC on your machine. The latest version is always available using the source tarball from http://znc.in/releases.<br />
<br />
A [[:Category:ChangeLog|ChangeLog]] is available in the wiki.<br />
You can also read more about [[Portability|ZNC's portability]].<br />
<br />
;Which way should I choose for installing ZNC?<br />
: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. <br />
: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!<br />
<br />
Once you have installed ZNC, you can create a config file with <code>znc --makeconf</code>.<br />
<br />
== Development Versions ==<br />
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!<br />
<br />
== Source Tarball ==<br />
Official source tarballs can be found [http://znc.in/releases/ here].<br />
<br />
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'''.<br />
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>).<br />
<br />
# Download the latest [http://znc.in/releases/znc-{{ZNC-Version}}.tar.gz source tarball]<br />
# <code>tar -xzvf znc-{{ZNC-Version}}.tar.gz</code><br />
# <code>cd znc-{{ZNC-Version}}</code><br />
# <code>./configure</code><br />(use '''<code>--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> if you have a non-standard SSL path)<br />(use <code>--help</code> to see other configure options)<br />
# <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)<br />
# <code>make install</code><br />
<br />
''Please note that compiling can take 5-10 minutes or more.''<br />
<br />
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. <br />
<br />
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.<br />
<br />
;See the [[FAQ|FAQ page]] if you encounter problems.<br />
<br />
== Linux ==<br />
<br />
=== Docker ===<br />
ZNC is available as an image in [https://hub.docker.com/_/znc/ Docker Hub], and can be downloaded with:<br />
<br />
<code>docker pull znc</code><br />
<br />
Follow the link above for additional instructions. <br />
<br />
=== Debian ===<br />
{{ambox | type = delete | text = Prior to Debian Sid (Unstable) including Wheezy, Squeeze, and Lenny, 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).}}<br />
<br />
Debian provides [http://packages.debian.org/znc ZNC packages] which may be installed using:<br />
aptitude install znc<br />
<br />
If you want to build znc from source to get a newer version than Debian provides, you may need the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
libicu-dev<br />
<br />
You can use the command<br />
aptitude build-dep znc<br />
to install build dependencies automatically. Note that sometimes these build-depedencies are outdated and won't work with the current version of ZNC.<br />
<br />
=== Fedora/CentOS/Red Hat Enterprise Linux ===<br />
Fedora has znc packaged in it's main repository and their Extra Packages for Enterprise Linux (EPEL) repository provides them for CentOS/RHEL.<br />
<br />
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].<br />
<br />
Once you have EPEL installed (or are on Fedora), execute:<br />
sudo yum install znc<br />
<br />
Once installed you can configure znc by running:<br />
sudo -u znc znc --makeconf # this creates ''/var/lib/znc/.znc''<br />
<br />
Then finally to start it you can run:<br />
sudo systemctl start znc # or ''enable'' if you want it to autostart<br />
<br />
=== Ubuntu ===<br />
[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.]<br />
<br />
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.<br />
<br />
==== Build From Source ====<br />
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.<br />
<br />
===== Building from Git Master =====<br />
{{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]].}}<br />
<br />
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:<br />
aclocal<br />
pkg-config<br />
automake<br />
autoconf<br />
<br />
After you have installed these packages, then continue onward for the additional dependencies you will need.<br />
<br />
After installing dependencies, you will have to run autogen.sh to generate the configure script.<br />
<br />
===== Add Build Dependency Sources =====<br />
<br />
====== Older than Ubuntu 12.04 ======<br />
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.<br />
<br />
====== Ubuntu 12.04 ======<br />
If you are on Ubuntu 12.04, you will need to add three PPAs to your system, with the following commands:<br />
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
sudo add-apt-repository -y ppa:teward/icu-backports<br />
<br />
====== Ubuntu 14.04 ======<br />
If you are on Ubuntu 14.04, you will need to add one PPA to your system, with the following command:<br />
sudo add-apt-repository -y ppa:teward/swig3.0<br />
<br />
====== Newer than Ubuntu 14.04 ======<br />
You will not need any additional PPAs or sources for build dependencies.<br />
<br />
===== Other Build Dependencies =====<br />
After verifying you have the required build dependency sources, you will need to install the following packages:<br />
build-essential<br />
libssl-dev<br />
libperl-dev<br />
pkg-config<br />
swig3.0<br />
libicu-dev<br />
<br />
If you are on Ubuntu 12.04, you will also need to install the following package:<br />
g++-4.7<br />
<br />
After you have done this, you can follow the instructions on this page for compiling from the source tarball.<br />
<br />
==== Install via PPA ====<br />
<br />
{{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.}}<br />
<br />
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]].'''<br />
<br />
The versions of ZNC currently available in the PPA are detailed [[User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu|on this page]].<br />
<br />
First, make sure you have the python-software-properties package installed:<br />
sudo apt-get install python-software-properties software-properties-common<br />
<br />
Then, add the PPA to your sources, and update the apt information:<br />
sudo add-apt-repository ppa:teward/znc<br />
sudo apt-get update<br />
<br />
Then, install the znc packages:<br />
sudo apt-get install znc znc-dbg znc-dev znc-perl znc-python znc-tcl<br />
<br />
ZNC is now installed. You can create the configuration normally with this, when run on the user that you want to run ZNC as:<br />
znc --makeconf<br />
<br />
=== (open)SUSE ===<br />
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<br />
zypper install znc<br />
<br />
=== Gentoo ===<br />
Gentoo provides [http://packages.gentoo.org/package/net-irc/znc ZNC packages] which may be installed using:<br />
emerge -av net-irc/znc<br />
<br />
Several USE Flags can be used for znc:<br />
<br />
* daemon (local): (not offically supported) Allow znc to run as a system-wide service. Installs an init script and creates a znc user:group.<br />
* debug (global): enable debug<br />
* ipv6 (global): adds support for ipv6<br />
* perl (global): adds support for writing perl modules<br />
* python (global): adds support for writing python 3 modules <br />
* ssl (global): enable secure socket layer connections<br />
* sasl (global): sasl support<br />
* tcl (global): adds support for writing tcl modules<br />
<br />
<pre>equery uses znc -a</pre> Will print you a list of USE flags that will be used for znc<br />
<br />
=== Slackware ===<br />
[http://slackbuilds.org/result/?search=znc&sv= Latest Slackware SBo Slackbuild]<br />
<br />
=== Alpine Linux ===<br />
<br />
To install znc from the package manager, enter the following command:<br />
<!--- Some modules exist in znc-extra. This is by design on this OS. ---><br />
sudo apk add znc znc-extra znc-modperl znc-modpython znc-modtcl ca-certificates<br />
<br />
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:<br />
sudo apk add autoconf automake gettext-dev g++ make openssl-dev pkgconfig zlib-dev <br />
<br />
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:<br />
sudo apk add git gdb perl-dev python3-dev swig tcl-dev cyrus-sasl-dev<br />
<br />
=== Archlinux ===<br />
<br />
ZNC is part of the [http://www.archlinux.org/packages/?q=znc archlinux package repository], and can be installed with the following:<br />
<br />
pacman -S znc<br />
<br />
Additionally you can install the following optional dependencies to add support for additional modules.<br />
<br />
* '''cyrus-sasl''' - saslauth module<br />
* '''perl''' - modperl module<br />
* '''python''' - modpython module<br />
* '''tcl''' - modtcl module<br />
<br />
==== rc.d scripts (deprecated)====<br />
<br />
You may also be interested in rc.d scripts for znc which can be installed with:<br />
<br />
pacman -U https://github.com/downloads/kylef/znc-arch/znc-system-wide-1.0-1-any.pkg.tar.xz<br />
<br />
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].<br />
<br />
==== Unstable/Testing ====<br />
You can install the latest git snapshot from the [https://aur.archlinux.org/packages/znc-git/ Arch User Repository].<br />
<br />
== FreeBSD ==<br />
ZNC is in FreeBSD ports, just do:<br />
cd /usr/ports/irc/znc<br />
make config<br />
make install clean<br />
<br />
or <br />
<br />
pkg_add -r znc<br />
<br />
== Mac OS X ==<br />
<br />
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.<br />
<br />
* 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:<br />
# Make sure that you're using the --disable-perl switch for ''configure''. Hence: ''./configure --prefix=/usr/local --disable-perl''<br />
<br />
=== Homebrew ===<br />
<br />
==== Installing Homebrew ====<br />
<br />
For more information about Homebrew see [http://mxcl.github.com/homebrew/ here]. The following command will install Homebrew to /usr/local<br />
<br />
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"<br />
<br />
Homebrew requires Xcode and Mac OS X >= 10.5<br />
<br />
==== Installing znc with Homebrew ====<br />
<br />
brew install znc<br />
<br />
=== Installing znc with MacPorts ===<br />
<br />
port install znc<br />
<br />
<br />
== Microsoft Windows ==<br />
<br />
'''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.'''<br />
<br />
=== Cygwin ===<br />
<br />
ZNC is available in list of cygwin packages.<br />
<br />
Download [http://www.cygwin.com/ Cygwin], install it. When choosing list of packages to install, search for "znc".<br />
<br />
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]])<br />
<br />
[[Category:ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=User:Resistance/Ubuntu_Staging_PPA_for_ZNC&diff=2105User:Resistance/Ubuntu Staging PPA for ZNC2017-05-09T19:24:16Z<p>Teward: Teward moved page User:Resistance/Ubuntu Staging PPA for ZNC to User:Teward/Ubuntu Staging PPA for ZNC: Move data to new 'teward' user, replaced "Resistance" after data loss.</p>
<hr />
<div>#REDIRECT [[User:Teward/Ubuntu Staging PPA for ZNC]]</div>Tewardhttps://wiki.znc.in/index.php?title=User:Resistance/Ubuntu_PPA_for_ZNC_-_Supported_Versons_of_Ubuntu&diff=2103User:Resistance/Ubuntu PPA for ZNC - Supported Versons of Ubuntu2017-05-09T19:23:36Z<p>Teward: Teward moved page User:Resistance/Ubuntu PPA for ZNC - Supported Versons of Ubuntu to User:Teward/Ubuntu PPA for ZNC - Supported Versons of Ubuntu: Move data to new 'teward' user, replaced "Resistance" after data loss.</p>
<hr />
<div>#REDIRECT [[User:Teward/Ubuntu PPA for ZNC - Supported Versons of Ubuntu]]</div>Teward