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.

  1. First install ZNC.
     apt install znc
    
  2. Ensure it runs at startup.
    1. Create a file like /etc/systemd/system/znc.service
    2. 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.

    3. Enable znc.service to run at startup
        systemctl enable znc
      
  3. Login as user pi and run
     znc --makeconf
    
  4. 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.