This tutorial is dedicated for installing and creating znc in a Debian VPS as an IRC Bouncer. Before proceeding with this tutorial, please read your provider TOS, are they allowing you to run IRC related service ( IRC Daemon/IRC Bouncer/ IRC Bot, etc.) or not.
ZNC is the simple but nice IRC Bouncer. IRC Bouncer is a software which keeps connection active to an IRC server. This would be usefull te keep your nick as an OP ( Operator ) or keep your nick stay seems Online in an IRC Channel.
For connecting to the znc, you can use :
- /server znc.server port username:password
As for this tutorial, I’m installing and running znc in my Prometeus/Iperweb VPS.
- Creating a user for znc ( do not run znc as root):
1# adduser username
1234567891011121314151617root@srv:~# adduser zncuserAdding user `zncuser' ...Adding new group `zncuser' (1001) ...Adding new user `zncuser' (1001) with group `zncuser' ...Creating home directory `/home/zncuser' ...Copying files from `/etc/skel' ...Enter new UNIX password:Retype new UNIX password:passwd: password updated successfullyChanging the user information for zncuserEnter the new value, or press ENTER for the defaultFull Name []: ZNC UserRoom Number []:Work Phone []:Home Phone []:Other []:Is the information correct? [Y/n] y
- Installing ZNC
1# apt-get install znc
12345678910111213141516171819202122232425262728293031323334353637383940root@srv:~# apt-get install zncReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:libidn11 whois libltdl7Use 'apt-get autoremove' to remove them.The following extra packages will be installed:libc-ares2 libperl5.10 tcl8.5 znc-extra znc-perl znc-tclSuggested packages:tclreadlineThe following NEW packages will be installed:libc-ares2 libperl5.10 tcl8.5 znc znc-extra znc-perl znc-tcl0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.Need to get 0 B/3884 kB of archives.After this operation, 10.3 MB of additional disk space will be used.Do you want to continue [Y/n]?Selecting previously deselected package libperl5.10.(Reading database ... 25168 files and directories currently installed.)Unpacking libperl5.10 (from .../libperl5.10_5.10.1-17squeeze3_i386.deb) ...Selecting previously deselected package tcl8.5.Unpacking tcl8.5 (from .../tcl8.5_8.5.8-2_i386.deb) ...Selecting previously deselected package libc-ares2.Unpacking libc-ares2 (from .../libc-ares2_1.7.3-1squeeze1_i386.deb) ...Selecting previously deselected package znc.Unpacking znc (from .../archives/znc_0.092-3_i386.deb) ...Selecting previously deselected package znc-extra.Unpacking znc-extra (from .../znc-extra_0.092-3_i386.deb) ...Selecting previously deselected package znc-perl.Unpacking znc-perl (from .../znc-perl_0.092-3_i386.deb) ...Selecting previously deselected package znc-tcl.Unpacking znc-tcl (from .../znc-tcl_0.092-3_i386.deb) ...Processing triggers for man-db ...Setting up libperl5.10 (5.10.1-17squeeze3) ...Setting up tcl8.5 (8.5.8-2) ...Setting up libc-ares2 (1.7.3-1squeeze1) ...Setting up znc (0.092-3) ...Setting up znc-extra (0.092-3) ...Setting up znc-perl (0.092-3) ...Setting up znc-tcl (0.092-3) ... - Login as the new user
- Configure the znc :
1# znc --makeconf
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465$ znc --makeconf[ ** ] Building new config[ ** ][ ** ] First lets start with some global settings...[ ** ][ ?? ] What port would you like ZNC to listen on? (1 to 65535): 12345[ ?? ] Would you like ZNC to listen using SSL? (yes/no) [no]:[ ?? ] Would you like ZNC to listen using ipv6? (yes/no) [no]:[ ?? ] Listen Host (Blank for all ips):[ ** ][ ** ] -- Global Modules --[ ** ][ ?? ] Do you want to load any global modules? (yes/no): no[ ** ][ ** ] Now we need to setup a user...[ ** ][ ?? ] Username (AlphaNumeric): zncuser[ ?? ] Enter Password:[ ?? ] Confirm Password:[ ?? ] Would you like this user to be an admin? (yes/no) [yes]:[ ?? ] Nick [zncuser]: znc[ ?? ] Alt Nick [znc_]: znc_[ ?? ] Ident [znc]: znc[ ?? ] Real Name [Got ZNC?]: ZNC[ ?? ] VHost (optional):[ ?? ] Number of lines to buffer per channel [50]:[ ?? ] Would you like to keep buffers after replay? (yes/no) [no]:[ ?? ] Default channel modes [+stn]:[ ** ][ ** ] -- User Modules --[ ** ][ ?? ] Do you want to automatically load any user modules for this user? (yes/no): no[ ** ][ ** ] -- IRC Servers --[ ** ][ ?? ] IRC server (host only): irc.bsie.net[ ?? ] [irc.bsie.net] Port (1 to 65535) [6667]:[ ?? ] [irc.bsie.net] Password (probably empty):[ ?? ] Does this server use SSL? (probably no) (yes/no) [no]:[ ** ][ ?? ] Would you like to add another server? (yes/no) [no]:[ ** ][ ** ] -- Channels --[ ** ][ ?? ] Would you like to add a channel for ZNC to automatically join? (yes/no) [yes]:[ ?? ] Channel name: #help[ ?? ] Would you like to add another channel? (yes/no) [no]:[ ** ][ ?? ] Would you like to setup another user? (yes/no) [no]:[ ok ] Writing config [/home/erawanarifn/.znc/configs/znc.conf]...[ ** ][ ** ] To connect to this znc you need to connect to it as your irc server[ ** ] using the port that you supplied. You have to supply your login info[ ** ] as the irc server password like so... user:pass.[ ** ][ ** ] Try something like this in your IRC client...[ ** ] /server <znc_server_ip> 12345 zncuser:<pass>[ ** ][ ?? ] Launch znc now? (yes/no) [yes]:[ ok ] Opening Config [/home/erawanarifn/.znc/configs/znc.conf]...[ ok ] Binding to port [12345] using ipv4...[ ** ] Loading user [zncuser][ ok ] Adding Server [irc.bsie.net 6667]...[ ok ] Forking into the background... [pid: 7470][ ** ] ZNC 0.092+deb3 - http://znc.sourceforge.net - Your znc is ready now.
Try to connect to your znc and configure it as needed via web browser :
1<em><strong>http://znc.ip.address:port</strong></em>
or
Connect to your znc via IRC Client
1<em><strong><em><strong>/server znc.ip.address port username:password</strong></em></strong></em>
and type /znc and help