How to setup soju (the IRC bouncer)
Table of Contents

Photo by Ansel Lee from Pexels
Recently I got back to IRC (Internet Relay Chat). Actually, I’ve never really been on that side of the internet, so I didn’t get back, I’m just exploring a new world.
The first thing I noticed is that it’s full of experienced people with incredible knowledge. They know everything and, most importantly, they’re so friendly. Even if you don’t know something, they are there to help you (if you want to be helped). However, since there’s no centralized server, when I close my laptop or quit the application I don’t receive any messages from others.
So it can happen that you ask for something, wait 30 minutes, then quit because you need to do other stuff, and you lose the answer if someone replies. That’s where soju comes in! (or znc if you prefer).
What’s a bouncer?
An IRC bouncer is a piece of software that stays connected to IRC on your behalf. Think of it as a middleman: it sits on a server, keeps the connection alive 24/7, and buffers all the messages. When you reconnect from your laptop or phone, it replays everything you missed.
Without a bouncer you’d have to stay connected all the time to not miss anything, which is annoying and not really practical.
Requirements
- soju (obv)
- A server that’s always on (it could be your Raspberry Pi or a VPS)
- An IRC client (I’m using halloy)
Setup
Admin user
The first step is to create an admin user using sojudb:
|
|
Config file
Now it’s time to update the config file. The file we’re looking for is /etc/soju/config, add these lines:
|
|
Explanation:
hostname: this is the public domain or IP of your server (I use 127.0.0.1)db: where soju stores its databaselisten ircs://0.0.0.0:6697: the main listener, I useircs://(IRC over TLS) on port 6697listen unix+admin:///run/soju/admin.sock: a Unix socket for local admin commandstls: path to your TLS certificate and private keymessage-store fs: where soju logs messages
TLS certificates
Remember that we need the TLS keys to enable IRCs (the secure version of IRC). I generated them using certbot, but you can use whatever software you want.
Then copy the certificates to the paths you specified in the config.
Remember to add port 6697 to the firewall and/or WAF.
Soju user
Now we need to create the user that we’ll actually use to connect to the bouncer. The admin user we created earlier is for managing soju, this one is for everyday IRC usage. We’re going to use sojuctl:
|
|
Starting soju
If you installed soju from a package, it probably came with a systemd service. Enable and start it:
|
|
You can check if everything is running fine:
|
|
IRC client setup
I’m using halloy as my IRC client, so you’ll need to adjust the configuration for your preferred client. In halloy, add this to your config file:
|
|
Connecting
Open your IRC client and message BouncerServ. This is soju’s built-in management bot: you use it to configure your networks, set up authentication, and more:
|
|
This will list all available commands. Now let’s connect to a network. I’m going to connect to Libera.Chat:
|
|
This tells soju to create a new network called libera that connects to irc.libera.chat on port 6697 with TLS enabled. You can add as many networks as you want this way.
After adding the network, you can list your configured networks with:
|
|
Automatic login
To set up automatic login, Libera.Chat uses SASL (Simple Authentication and Security Layer). This way you authenticate directly through the bouncer without needing to manually identify every time. Just message BouncerServ and type:
|
|
Replace <nickserv_username> and <nickserv_password> with your actual Libera.Chat NickServ credentials.
Restart Halloy and you should connect and authenticate automatically!
Channels
One nice thing about soju: if you use /join #channel, the bouncer will automatically add the channel to your list permanently. You don’t need to set up any autojoin feature.
Documentation
If you want to learn more or customize soju, see here.