Recently, a small group of really great computer guys invited me to their private IRC server. I followed several of their blogs, and was really honored that they would ask me to join them. It’s a quiet group of just hanging out, chatting, and a few discussions here and there about tech related stuff. Pretty easygoing and fun to be invited in.

That said, I’ve never used IRC (internet relay chat) before. Sure, I’ve been doing tech stuff for a long time, used Telegram, jabber, xmpp, and the like, but never IRC. One of the main problems I ran into was that IRC is live. You hook up, listen in, and when you leave, so does the conversation. You completely miss everything when you are not in the room. I’d never seen such a thing.

So, at first, I set up pidgin on my desktop computer, and just left the tab open, so I was continuously getting the messages, and could read back over everything later. This caused another problem, though, because you can only log in as yourself once, meaning I couldn’t check it somewhere else, it said I was already logged in. Then I decided I would just use my phone to hook up to the IRC, because it is always on, and the phone apps allow logging, heartbeat, etc., to keep the conversation for you until you come back to it.

That worked pretty well for recording the backlog of conversation until I could read it again, but it caused another unexpected “problem”. Well, by problem, I really mean annoyance. You see, ever time my phone was in my pocket, as I traveled about, connecting to wifi, or disconnecting and switching to mobile data, or moving out of cell service and back into cell service (like going inside/outside of concrete buildings at work), the IRC would start filling up with “aklu has joined” and “aklu has left” messages. In fact, between times that I actually read the IRC, it could be dozens of these messages. And, with a small group as it is on this IRC, that sometimes was half of the traffic.

No one at the IRC complained, but I knew I had to do something. I spoke to them about it, and it appears that several of them use an IRC bouncer, like ZNC. So I decided to give that a try. Installation and setup was actually pretty easy. I had to start with adding a port in my router. Since I was doing this remotely, the easiest method was X over SSH:

alaskalinuxuser@alaskalinuxuser-X9DBL-3F-X9DBL-iF:~$ ssh -X <SOMEPLACEONLINE> -p <SOMEPORT>
alaskalinuxuser@<SOMEPLACEONLINE>'s password: 
alaskalinuxuser@alaskalinuxuser-PowerEdge-1950:~$ firefox 
alaskalinuxuser@alaskalinuxuser-PowerEdge-1950:~$ midori
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  155 (DRI2)
  Minor opcode of failed request:  2 (DRI2Authenticate)
  Serial number of failed request:  11
  Current serial number in output stream:  11
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  155 (DRI2)
  Minor opcode of failed request:  2 (DRI2Authenticate)
  Serial number of failed request:  11
  Current serial number in output stream:  11
Error loading module '/usr/lib/midori/': /usr/lib/midori/ undefined symbol: peas_plugin_info_get_module_name

I had started to load Firefox, but remembered how heavy it was and loaded Midori instead. That worked out rather nicely over the internet. Next I followed Digital Ocean’s guide to installing ZNC on Linux, but using the repository ZNC rather than building it myself. I started by installing ZNC:

root@alaskalinuxuser-PowerEdge-1950:/home/alaskalinuxuser# aptitude search znc
p   python3-junos-eznc              - Junos 'EZ' automation for non-programmers 
p   znc                             - advanced modular IRC bouncer              
p   znc-backlog                     - module for requesting backlog from znc bou
p   znc-dev                         - advanced modular IRC bouncer (development 
p   znc-perl                        - advanced modular IRC bouncer (Perl extensi
p   znc-push                        - znc plugin to send push notification to va
p   znc-python                      - advanced modular IRC bouncer (Python exten
p   znc-tcl                         - advanced modular IRC bouncer (Tcl extensio
root@alaskalinuxuser-PowerEdge-1950:/home/alaskalinuxuser# apt-get install znc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  znc-perl znc-python znc-tcl
The following NEW packages will be installed:
  znc znc-perl znc-python znc-tcl
0 upgraded, 4 newly installed, 0 to remove and 17 not upgraded.
Need to get 3,426 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 focal/universe amd64 znc amd64 1.7.5-4 [1,809 kB]
Get:2 focal/universe amd64 znc-perl amd64 1.7.5-4 [776 kB]
Get:3 focal/universe amd64 znc-python amd64 1.7.5-4 [815 kB]
Get:4 focal/universe amd64 znc-tcl amd64 1.7.5-4 [25.8 kB]
Fetched 3,426 kB in 2s (2,117 kB/s) 
Selecting previously unselected package znc.
(Reading database ... 286445 files and directories currently installed.)
Preparing to unpack .../archives/znc_1.7.5-4_amd64.deb ...
Unpacking znc (1.7.5-4) ...
Selecting previously unselected package znc-perl.
Preparing to unpack .../znc-perl_1.7.5-4_amd64.deb ...
Unpacking znc-perl (1.7.5-4) ...
Selecting previously unselected package znc-python.
Preparing to unpack .../znc-python_1.7.5-4_amd64.deb ...
Unpacking znc-python (1.7.5-4) ...
Selecting previously unselected package znc-tcl.
Preparing to unpack .../znc-tcl_1.7.5-4_amd64.deb ...
Unpacking znc-tcl (1.7.5-4) ...
Setting up znc (1.7.5-4) ...
Allowing use of questionable username.
Adding group `_znc' (GID 138) ...
Setting up znc-tcl (1.7.5-4) ...
Setting up znc-python (1.7.5-4) ...
Setting up znc-perl (1.7.5-4) ...
Processing triggers for man-db (2.9.1-1) ...

Then I added a new user to manage it:

root@alaskalinuxuser-PowerEdge-1950:/home/alaskalinuxuser# adduser znc-admin
Adding user `znc-admin' ...
Adding new group `znc-admin' (1001) ...
Adding new user `znc-admin' (1001) with group `znc-admin' ...
Creating home directory `/home/znc-admin' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for znc-admin
Enter the new value, or press ENTER for the default
	Full Name []: znc-admin
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] y
root@alaskalinuxuser-PowerEdge-1950:/home/alaskalinuxuser# su znc-admin

Then I ran through the setup:

znc-admin@alaskalinuxuser-PowerEdge-1950:/home/alaskalinuxuser$ cd
znc-admin@alaskalinuxuser-PowerEdge-1950:~$ znc --makeconf
[ .. ] Checking for list of available modules...
[ ** ] 
[ ** ] -- Global settings --
[ ** ] 
[ ?? ] Listen on port (1025 to 65534): <SOMERANDOMPORTIPICKED>
[ ?? ] Listen using SSL (yes/no) [no]: yes
[ ?? ] Listen using both IPv4 and IPv6 (yes/no) [yes]: 
[ .. ] Verifying the listener...
[ ** ] Unable to locate pem file: [/home/znc-admin/.znc/znc.pem], creating it
[ .. ] Writing Pem file [/home/znc-admin/.znc/znc.pem]...
[ ** ] Enabled global modules [webadmin]
[ ** ] 
[ ** ] -- Admin user settings --
[ ** ] 
[ ?? ] Username (alphanumeric): alaskalinuxuser
[ ?? ] Enter password: 
[ ?? ] Confirm password: 
[ ?? ] Nick [alaskalinuxuser]: 
[ ?? ] Alternate nick [alaskalinuxuser_]: 
[ ?? ] Ident [alaskalinuxuser]: 
[ ?? ] Real name (optional): alaskalinuxuser
[ ?? ] Bind host (optional): 
[ ** ] Enabled user modules [chansaver, controlpanel]
[ ** ] 
[ ?? ] Set up a network? (yes/no) [yes]: 
[ ** ] 
[ ** ] -- Network settings --
[ ** ] 
[ ?? ] Name [freenode]: <SOMEIRCIFOLLOW>
[ ?? ] Server host (host only): <SOMEIRCIFOLLOW>
[ ?? ] Server uses SSL? (yes/no) [no]: yes
[ ?? ] Server port (1 to 65535) [6697]: <PORT>
[ ?? ] Server password (probably empty): <PASSWORD>
[ ?? ] Initial channels: <CHANNEL>
[ ** ] Enabled network modules [simple_away]
[ ** ] 
[ .. ] Writing config [/home/znc-admin/.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 this: user/network:pass.
[ ** ] 
[ ** ] Try something like this in your IRC client...
[ ** ] /server <znc_server_ip> +<SOMEPORT> alaskalinuxuser:<pass>
[ ** ] 
[ ** ] To manage settings, users and networks, point your web browser to
[ ** ] https://<znc_server_ip>:<SOMEPORT>/
[ ** ] 
[ ?? ] Launch ZNC now? (yes/no) [yes]: yes
[ .. ] Opening config [/home/znc-admin/.znc/configs/znc.conf]...
[ .. ] Loading global module [webadmin]...
[ .. ] Binding to port [+<SOMEPORT>]...
[ ** ] Loading user [alaskalinuxuser]
[ ** ] Loading network [<SOMEIRC>]
[ .. ] Loading network module [simple_away]...
[ >> ] [/usr/lib/znc/]
[ .. ] Adding server [<SOMEIRC> +<PORT> <PASSWORD>]...
[ .. ] Loading user module [chansaver]...
[ .. ] Loading user module [controlpanel]...
[ .. ] Forking into the background...
[ >> ] [pid: 17594]
[ ** ] ZNC 1.7.5+deb4 -

All told, I think I was done in 15 minutes! Pretty simple to set up. I then used my phone client to connect to my ZNC bouncer, instead of to the IRC directly. So far, so good!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *