Howto: KiwiIRC and webircgateway

KiwiIRC is an IRC web client and webircgateway acts as its helpful websocket gateway (it is written in Go). The config is rather easy-peasy on Caddy’s side. My main source of confusion was rather the .sock file ownership. The important thing is to have the .sock file in a directory owned by the web user (777 perms for the .sock do not help).

Pre-built binaries are available. In the .zip you have a binary called “kiwiirc” which is webircgateway and config.conf.example is its config file. The config file for KiwiIRC client is www/static/config.json in the .zip. Of course you can also do your own builds, the process is rather straightforward and explained in the readmes found in the repositories.

I placed the webircgateway executable and config to /var/www which is owned by my web user (http). In the config I have:

# Example unix socket server
bind = unix:/var/www/webircgateway.sock
bind_mode = 0644

hostname = ""
port = 6697
tls = true

Also, in the [reverse_proxies] section I added the IP of my server in CIDR format.

My Caddy rule is:

proxy /webirc unix:/var/www/webircgateway.sock {

In the KiwiIRC config.json file I have (the path /webirc/kiwiirc is hardcoded in webircgateway):

"kiwiServer": "",


"startupOptions" : {
    "server": "",
    "port": 6697,
    "tls": true,
    "channel": "#kiwiirc-default",
    "nick": "kiwi-n?"

I created a systemd unit for webircgateway:

Description=Websocket gateway to IRC networks

ExecStart=/var/www/webircgateway/webircgateway --config=/var/www/webircgateway/config.conf
ExecReload=/usr/bin/kill -USR1 $MAINPID

1 Like