Official source tarballs can be found here.
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.
- Download the latest source tarball
tar -xzvf znc*.*gz
--prefix="$HOME/.local"if you don’t want a system wide installation or simply don’t have root access; use
--with-openssl=/path/to/opensslif you have a non-standard SSL path)
--helpto see other configure options) or
(if you are on a dedicated server and your CPU has more than one core, you can use
make -jXwhere X is the number of CPU cores to speed up compilation)
Please note that compiling can take 5-10mins or more.
Once you have installed znc, you can use
znc --makeconf 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.
ZNC is run by just executing znc under the dedicated znc user, at which stage it goes to background. It does not make an init.d service for itself nor does it need to be run in screen or something similar.
How to make sure it stays up and restarts after a reboot/crash
Simply add a crontab/cronjob that will try to start it every 10 minutes, if it is not currently started:
Add the line:
*/10 * * * * /home/znc/znc/bin/znc >/dev/null 2>&1
Or if you installed it to /usr/local add the line:
*/10 * * * * /usr/local/bin/znc >/dev/null 2>&1