Self-Hosting Soju

Soju is an IRC bouncer that is easy to host and use. I was introduced to it from, 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 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 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:
To participate in a public discussion, use my public inbox: ~witcher/
Please review the mail etiquette.

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

Articles from blogs I read

Notes on Podman

Podman is an alternative implementation of Docker which addresses some design issues in Docker. The most obvious/notable difference is that Podman doesn’t require a daemon running permanently, which is nice, but not a huge deal. It also has other design d…

via Hugo Barrera's site March 15, 2023

When to comment that code

My software tends to have a surprisingly low number of comments. One of my projects, scdoc, has 25 comments among its 1,133 lines of C code, or 2%, compared to the average of 19%.1 Naturally, I insist that my code is well-written in spite of this divergence …

via Drew DeVault's blog March 9, 2023

Status update, February 2023

Howdy! This montly status came a bit late, but nevertheless, here it is. I am working on Husky to add more stuff that allows the app to setup itself some features for different ActivityPub backends. This is a very WIP task that I’m doing carefuly and I would …

via captainepoch's log February 22, 2023

Generated by openring