Self-Hosting Soju

Soju is an IRC bouncer that is easy to host and use. I was introduced to it from chat.sr.ht, Sourcehut’s hosted IRC bouncer available for paying customers.

Recently, Sourcehut had an outage. I didn’t mind this, it didn’t impact my workflow at the time, and it was also a fairly short outage that was addressed and resolved quickly, but it reminded me that other services do have down time from time to time, so I decided to start hosting Soju myself, on my own server.

The setup was refreshing from having worked with znc. Admittedly, I don’t remember any of the details, but I remember the setup being painful1.
Hosting my server with Alpine, the setup was easy. Since my server was still running on v3.15 and Soju is only available in the testing repository on edge, I first had to update to edge. This was very easy, only requiring an update of the version number (or in this case, setting it to edge) in /etc/apk/repositories, as well as a pair of apk update and apk upgrade --available.

Installing Soju, then, was extremely easy, only requiring the installation of the soju, soju-openrc, and, optionally for documentation only, the soju-doc packages.
The setup was a little bit harder, though. The reason was that by default Soju on Alpine looks for the sqlite database in /var/lib/soju/main.db2, something I was not aware of. Following the installation instructions that only mentioned using sojuctl create-user username -admin was a little misleading with this exact installation procedure, but I eventually figured out that calling this would create a soju.db in the current directory, which is not what I wanted.

After figuring this out (as well as setting up a subdomain and creating the necessary keys for TLS), everything worked flawlessly.
The user configuration (networks, etc.) works by messaging BouncerServ. Using network create with the appropriate parameters set up the networks, and joining channels worked properly. Use help to list all available commands and help <command> to get help for a specific command. Alternatively, the documentation for these commands are available in soju(1).

A small gotcha I had was that I was still logged in to all the networks on chat.sr.ht which forced my bouncers to use my nick with an _ added at the end. This was really a non-issue, though, and simply logging out from chat.sr.ht fixed this.

If you’re looking for an IRC bouncer to host, I can only recommend using Soju, it’s extremely simple to use.

Hosting other Sourcehut services

In the future I’m looking to self-host a bunch of Sourcehut services myself. I have tried this before but ultimately failed at setting up the mail server as I hadn’t researched enough for this yet.3 It’s very much out of my comfort zone, never having worked with mail servers before, and postfix simply looks scary to a newcomer, given the huge amount of configuration and things you can do wrong.
Configuring postfix would also give me the ability to possibly self-host email entirely, given that I figure out how to make big-tech accept my email, if possible.4

Being able to self-host Sourcehut and link to my personal instance for my projects would be nice, and I hope I can manage to find some time in the future to set this up myself. For now, though, I’m happy with Sourcehut and will continue to host my projects there for the foreseeable future; at least until I’m done with exams, my bachelor thesis, and other things coming up.


  1. Whether this was due to inexperience or a harder setup in general, I don’t remember ↩︎

  2. This is configurable via the configuration file, located in /etc/soju/config by default. More information can be found in soju(1)↩︎

  3. If you’re reading this and have experience in setting up an email server, or even setting up a Sourcehut instance, help would be highly appreciated! Just shoot me an email. ↩︎

  4. Even though I would love to self-host my email, not being able to communicate with what is probably most of the world because I’m getting blocked on the basis of nothing but “you are not a big, established company” is definitely a no-go. ↩︎

Do you have a comment on one of my posts? Feel free to send me an E-Mail: witcher@wiredspace.de
To participate in a public discussion, use my public inbox: ~witcher/public-inbox@lists.sr.ht
Please review the mail etiquette.

Posted on: January 17, 2023
Last modified on: January 17, 2023

Articles from blogs I read

My plans at FOSDEM: SourceHut, Hare, and Helios

FOSDEM is right around the corner, and finally in person after long years of dealing with COVID. I’ll be there again this year, and I’m looking forward to it! I have four slots on the schedule (wow! Thanks for arranging these, FOSDEM team) and I’ll be talkin…

via Drew DeVault's blog January 24, 2023

icalendar bug at NS International

Today I purchased train tickets to FOSDEM on NS International. The site has a handy option to “Add to Agenda”, which generates an icalendar file which one can add to their calendar agenda. I downloaded it and tried to import it into my calendar tool of cho…

via Hugo Barrera's site January 22, 2023

Status update, January 2023

Hello there! From the programming side of things, I kept working in Husky to release the 1.4.0 version. This release contains, among other things, a migration from Dagger to Koin and the update of the app for Android 13. I am happy with the result, and with t…

via captainepoch's log January 16, 2023

Generated by openring