ZNC Rox0rs

It’s no secret that IRC is at the heart of all things WordPress and Automattic when it comes to realtime collaboration. I hadn’t used it in years, but am now back to being logged in for substantial portions of my days.

With this in mind, I set out to install the excellent ZNC IRC bouncer on my home Linux server yesterday, coupled with the experimental Colloquy Push module to send relevant messages to my iPhone when not in front of my screen.

Couldn’t have been any easier on Centos 5 (Note: actually, if you happen to have a Mac desktop or server that is powered on all the time, unlike my laptop, Colloquy has a built-in push bouncer that makes things even easier).

Install the Fedora EPEL repo as root:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

Install the ZNC daemon and related packages (and openssl-devel and g++ which weren’t installed on this box):

yum install znc znc-extra znc-devel gcc gcc-c++ openssl-devel

Download compile and install the Colloquy Push module:

curl -LO http://github.com/wired/colloquypush/raw/master/znc/colloquy.cpp
znc-buildmod colloquy.cpp
cp colloquy.so ~/.znc/modules/

Generate an initial configuration file (with SSL and Colloquy push module):

znc --makeconf

Edit the said configuration file manually to add a flag so that it stops sending push notifications to my phone if I’m already connected to the bouncer: added -attachedpush 0 to the LoadModule = colloquy line in ~/.znc/configs/znc.conf.

Opened port 6697 (the one I chose, default would be 6667) on my home router.

And that’s pretty much it.

Now instead of connecting to the Automattic IRC server directly, I connect ZNC to it permanently on my server, and connect to the said ZNC bouncer (via SSL) from both my desktop IRC client, as well as the one on my iPhone (over 3G, Edge and/or wifi).

I’ll have to wait until Monday to confirm that the push notifications are working as intended, but beyond this, it’s been stable and awesome since yesterday.


Update: The push notifications are working great!

Update 2: I forgot to mention ZNC also has a very handy web admin module. I strongly advise SSL once more, as well as considering the -noircport flag combined with a custom port.

Update 3: After a full workweek of use, the little time I spent on installing ZNC has already proven invaluable enough for me to more than recommend it. Push notifications work brilliantly, but most of all, the buffer replay option, is the BEST FEATURE EVER! My IRC user experience has now been changed forever. Awesome!

4 thoughts on “ZNC Rox0rs

    • Originally, bouncers (see also BNC) were most widly used to provide point-of-origin anonymity for IRC connections, like one would do with an http proxy.

      In my case, the primary purpose for the IRC bouncer is to keep my account connected permanently so that when I do connect via my desktop or mobile client, I get a buffer replay of what happened while I was offline. This is really useful for things like bots (think nagios), getting the context of ongoing conversations, etc.

      On the other hand, when coupled with the colloquy push module, it’s also providing staff (or bots once again) with [yet another] real-time way to get in touch with me when I’m on the go, by sending highlighted or direct messages to my iPhone without having to use SMS.

      But to be perfectly honest, it was just a fun thing to play with. It just happens to be useful too. ;)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.