How to setup KiwiIRC on Ubuntu 18.04

From IRC Wiki
Jump to: navigation, search
This article is a rough draft. Some items in the article may be incomplete or may not work as intended. You can help by learning how to Contribute to the article.

This guide will walk you through setting up KiwiIRC on your Ubuntu 18.04 server. These steps should also work for Debian, other versions of Ubuntu, and their derivatives.


Before you begin you will need root access on the server, as well as a few packages. I'm not going to go through the web server setup but it shouldn't matter which web server daemon that you use.

# apt-get install golang nodejs npm
# curl -sS | sudo apt-key add -
# echo "deb stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
# apt-get update && apt-get install yarn

Download & Prepare KiwiIRC Files

$ git clone
$ cd kiwiirc/
$ yarn install
$ yarn build

If you get this error while running yarn install please follow the "Installing nodejs" section, otherwise skip it: The engine "node" is incompatible with this module. Expected version ">=6".

Now move the contents of the dist/ directory to your web root directory. Once moved edit static/config.json to your licking.

Installing nodejs

# curl -sL | sudo -E bash -
# apt-get install -y nodejs

Setting up the WebIRC Gateway

This step isn't really required since the front end will connect to official kiwiirc servers just fine. However if you want to run your own back-end servers for kiwiirc you can.

# adduser kiwiirc # follow the prompts.
# su - kiwiirc
$ go get
$ cd $HOME/go/src/
$ go build -o webircgateway main.go

WebIRC Gateway configuration

Modify and save this configuration as config.json then feel free to run your kiwiserver by typing $HOME/go/bin/webircgateway --config /path/to/config.json

# 1 = Debug; 2 = Info; 3 = Warn;
logLevel = 3

# Enable the built in identd server (listens on port 113)
identd = false

gateway_name = ""

recaptcha_secret = ""
recaptcha_key = ""

# Default username / realname for IRC connections. If disabled it will use
# the values provided from the IRC client itself.
# %h will be replaced with the users hostname
# %i will be replaced with a hexed value of the users IP
#username = "%i"
#realname = "I am a webchat user"

# This hostname value will only be used when using a WEBIRC password
#hostname = "%h"

# The websocket / http server
bind = ""
port = 80

# Example TLS server
#bind = ""
#port = 443
#tls = true
#cert = server.crt
#key = server.key
# If you don't have a certificate, uncomment the below line to automatically generate a
# free certificate using (overrides the above cert/key options)
#letsencrypt_cache = letsencrypt.cache

# Example unix socket server
#bind = unix:/tmp/webircgateway.sock
#bind_mode = 0777

# Serve static files from a web root folder.
# Optional, but handy for serving the Kiwi IRC client if no other webserver is available
enabled = false
webroot = www/


# Websites (hostnames) that are allowed to connect here
# No entries here will allow any website to connect.

# If using a reverse proxy, it must be whitelisted for the client
# hostnames to be read correctly. In CIDR format.
# The user IPs are read from the standard X-Forwarded-For HTTP header

# Connections will be sent to a random upstream
hostname = ""
port = 6667
tls = false
# Connection timeout in seconds
timeout = 5
# Throttle the lines being written by X per second
throttle = 2
webirc = ""

# A public gateway to any IRC network
# If enabled, Kiwi IRC clients may connect to any IRC network (or a whitelisted
# network below) through the kiwiirc engine
enabled = false
timeout = 5
throttle = 2

# Whitelisted IRC networks while in public gateway mode
# If any networks are in this list then connections can only be made to these

[gateway.webirc] = webirc_password = webirc_password