ZNC is an IRC network bouncer software. It comes with various modules and features that can be modified to your usage requirements.
This tutorial its for Debian 8 but should work for latest Debian and Ubuntu versions as well.
First you need to install some packages to compile ZNC from source:
Now you are ready to start the ZNC installation with this commands:
If you would like to install the lastest stable version or another one click here for the list.
After installing the necessary packages and ZNC, you can configure and initialize ZNC using this command:
If for any reason your server reboots or loses network connectivity, ZNC will lose it too. To automatically start ZNC on boot, use the following command: