This blog post is dedicated to Sean McGinnis, the PTL of the OpenStack Cinder project. If you are an OpenStack type, you should really follow him on Twitter and read his blog which he promises to spruce up.
Update: March 2019. Another good blog post about configuring a Raspberry Pi as an IRC bouncer can be found at https://blog.ghosh.pro/2019/03/07/irc-bouncer-on-a-pi/
IRC is the lifeblood of communication and collaboration in many open source ecosystems, like OpenStack.
One of the biggest issues in working in this environment is that IRC is inherently an asynchronous communications mechanism and if you aren’t on IRC, you aren’t plugged in.
A bouncer is a simple app that will keep a connection open to the IRC network and allow your device (phone, laptop, tablet) connect and disconnect at will, and easily catch up on what you missed.
There are many other ways to accomplish this, some leave an emacs session running on a machine and connect to it remotely. Whatever floats your boat.
But, you need a place to run this solution, I run mine on a Raspberry Pi.
To install and configure ZNC (my bouncer of choice) on my Raspberry Pi, I use this diskimage-builder element. (https://github.com/amrith/rpi-image-builder/tree/master/elements/rpi-znc)
Using this element is very straightforward, it is a dependency from rpi-generic and you can follow the simple image building tutorial here. Since I enable the log module on ZNC, I run my Raspberry Pi with a read-only MicroSD card and a writable root file system on a USB Flash Drive. Instructions for that setup are found here.
Once you boot the system with this image, you first configure znc.
Simple instructions on how to do this are in the element listed above (in the README file). Those steps are
sudo -u znc /usr/bin/znc –datadir=/var/lib/znc –makeconf
echo “PidFile = /var/run/znc/znc.pid” | sudo su \
– znc -s /bin/bash \
-c “tee -a /var/lib/znc/configs/znc.conf”
That’s it! You can now enable and launch the znc service. In my case, I configured ZNC to run with SSL on port 6697.
root@pi:/var/lib/znc# netstat -nl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::6697 :::* LISTEN
This means that I can get to the webadmin console simply by pointing my browser to
The only other thing that I do is to enable the log module which will persist IRC logs on the Raspberry Pi. I can search them later, I also setup logrotate to purge them periodically.
4 thoughts on “Running your IRC bouncer on a Raspberry Pi”
I wrote a similar post discussing IRC and setting up ZNC on the Pi at https://blog.ghosh.pro/2019/03/07/irc-bouncer-on-a-pi/ 😀
Sudipto’s blog post on configuring a Raspberry Pi to have a ZNC bouncer is much more comprehensive than mine. See https://blog.ghosh.pro/2019/03/07/irc-bouncer-on-a-pi/
pi@raspberrypi:~ $ sudo -u znc /usr/bin/znc –datadir=/var/lib/znc –makeconf
[ ** ] Unrecognized command line arguments.
[ ** ] Did you mean to run
/znc –datadir=/var/lib/znc' in IRC client instead?/znc –datadir=/var/lib/znc’ is an alias for `/msg *status –datadir=/var/lib/znc’
[ ** ] Hint:
Make sure that the command you executed is
sudo -u znc /usr/bin/znc — datadir=/var/lib/znc –makeconf
that’s two ‘-‘ (hyphens) before datadir, and makeconf.
Read the readme for the correct command if you want to copy/paste.