Setting up ZNC on Raspberry Pi
ZNC is an IRC bouncer, which means it connects to IRC on your behalf, joins all the channels you are part of, and collects and accumulates all messages which are sent on the channel. When you open your favourite IRC client, it “plays back” all the accumulated messages from the time you went offline (or closed your client).
It’s helpful if you want to know the context of what was happening on a channel even while you were away, since IRC does not have history. There are IRC logging websites too for this reason. But some communities do not prefer being logged, while others post urls of logging servers on their channel topic. I personally like the ephemeral nature of IRC and prefer it not being logged.
Here’s how to set up ZNC on a RPi. Prefix commands with sudo
wherever applicable.
- First install ZNC.
apt install znc
- Ensure it runs at startup.
- Create a file like
/etc/systemd/system/znc.service
- Add the following contents
[Unit] Description=ZNC, an advanced IRC bouncer After=network-online.target [Service] ExecStart=/usr/bin/znc -f User=pi [Install] WantedBy=multi-user.target
Note that this will run the ZNC service as user
pi
. - Enable
znc.service
to run at startupsystemctl enable znc
- Create a file like
- Login as user
pi
and runznc --makeconf
- The web service will be available at the port provided in the earlier step. There are numerous other settings and plugins you can configure from there.