Skip to main content

Kaiwa, modern XMPP web client

kaiwa_logoIt has been already a month without an article…I’ve been very busy and did not find an app that picked my interest until today.

Kaiwa, is a modern and opensource XMPP web client that deserve its article!

You know, XMPP the protocol, alias Jabber.Probably less and less people are using it now (I still do).

When you want to install a XMPP server, you usually install Prosody, or Ejabberd or OpenFire and probably you install Jappix, if you want a web interface. (That will deserve its own article). Or you probably just go for Slack and others popular alternatives?

But I found a recent web client, called Kaiwa. It’s actually a fork of Otalk and have all you need to manage your chat.

Very complete, Kaiwa includes a rooms management, archives, private messages, user management, multiple clients, notifications, avatar, embedded objects, etc… all the needed features for a simple chat.

However, XMPP have been heavily challenged on several points compared to recent commercial solutions. Good news is, most of them have been solved through extensions to the protocol (Called XEPs). Kaiwa, fortunately support them all and allow you a greater experience such as, “Message History Syncing” across devices, “Active Chat Syncing” to make sure you will not have any sync error when using several clients at the same time, improved connection, “Message Correction” to edit your messages afterwards, etc…
Easy to install, Kaiwa will provide you a great experience, similar or better to proprietary alternatives.Kaiwa main pageReady to give it shot? Here is how to install Kaiwa on Debian / Ubuntu style of distribution.

 

Installation

Obviously, you need first to have a XMPP server. This tutorial will not cover this part.

 

1) Install uuid-dev and libldap2-dev

Uuid-dev and libldap2-dev are needed to have Kaiwa fully operational. In root (or with sudo in front), run:

2) Clone their latest Git repository

Still in root:

 

3) Install NodeJS and NPM

– If you use Ubuntu, simple run (as root)

– For Debian users (Still on Wheezy? if different, just adapt), you can install nodejs from wheezy-backports. If you don’t have them in your source.list, you will need to add the line

to your /etc/apt/source.list file, then run

to update the packages list and then install nodejs with the following command:

and for npm, you can use the installer (still in root)

4) Install all dependencies using NPM

 

5) Launch Kaiwa
Kaiwa should now be accessible from http://YourIP:8000/

Kaiwa XMPP login

You can change the default configuration (port, domain, XMPP server,…) inside the file called dev_config.json.

You should now have a working Kaiwa instance.

If you have any question, feel free to ask them here or directly on their issue tracker.

35 thoughts on “Kaiwa, modern XMPP web client

  1. “npm install” finished with errors, not so deep into it – not sure what went wrong

    root@host:/var/www/kaiwa# npm install
    npm http GET https://registry.npmjs.org/bows/0.3.0
    (………..)
    npm http GET https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz
    > LDAP@1.2.1 install /var/www/kaiwa/node_modules/LDAP
    > node-gyp rebuild
    npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz
    npm http GET https://registry.npmjs.org/methods/-/methods-1.1.0.tgz
    make: Entering directory /var/www/kaiwa/node_modules/LDAP/build'
    CXX(target) Release/obj.target/LDAP/src/LDAP.o
    ../src/LDAP.cc: In static member function ‘static void LDAPConnection::on_handle_close(uv_handle_t*)’:
    ../src/LDAP.cc:270:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
    int res;
    ^
    ../src/LDAP.cc: In static member function ‘static void LDAPConnection::close(LDAPConnection*)’:
    ../src/LDAP.cc:295:9: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]
    int res;
    ^
    SOLINK_MODULE(target) Release/obj.target/LDAP.node
    SOLINK_MODULE(target) Release/obj.target/LDAP.node: Finished
    COPY Release/LDAP.node
    make: Leaving directory
    /var/www/kaiwa/node_modules/LDAP/build’
    npm http 200 https://registry.npmjs.org/on-finished/-/on-finished-2.1.1.tgz
    (………..)
    npm http 304 https://registry.npmjs.org/jsonparse/0.0.5
    npm http 304 https://registry.npmjs.org/readable-stream
    npm http GET https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
    npm http GET https://registry.npmjs.org/readdirp/-/readdirp-0.2.5.tgz
    npm http GET https://registry.npmjs.org/astw/-/astw-2.0.0.tgz
    npm http 200 https://registry.npmjs.org/wordwrap/0.0.2
    npm http 200 https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz
    npm http GET https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz
    npm http GET https://registry.npmjs.org/falafel
    npm http 200 https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.33.tgz
    npm http 200 https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
    npm http 200 https://registry.npmjs.org/readdirp/-/readdirp-0.2.5.tgz
    npm http GET https://registry.npmjs.org/shallow-copy
    npm http GET https://registry.npmjs.org/static-eval
    npm http GET https://registry.npmjs.org/duplexer2
    npm http GET https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz
    npm http 200 https://registry.npmjs.org/astw/-/astw-2.0.0.tgz
    npm http 200 https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz
    npm http 200 https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz
    npm http 200 https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz
    npm http 200 https://registry.npmjs.org/decamelize/-/decamelize-1.0.0.tgz
    npm http 200 https://registry.npmjs.org/camelcase/-/camelcase-1.1.0.tgz
    npm http GET https://registry.npmjs.org/has
    npm http GET https://registry.npmjs.org/object-inspect
    npm http GET https://registry.npmjs.org/readable-stream
    npm http GET https://registry.npmjs.org/concat-stream
    npm http 200 https://registry.npmjs.org/falafel
    npm http 304 https://registry.npmjs.org/object-inspect
    npm http 304 https://registry.npmjs.org/readable-stream
    npm http 304 https://registry.npmjs.org/concat-stream
    npm http GET https://registry.npmjs.org/escodegen
    npm http 200 https://registry.npmjs.org/shallow-copy
    npm http GET https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
    npm http GET https://registry.npmjs.org/through/-/through-2.2.7.tgz
    npm http 304 https://registry.npmjs.org/has
    npm http 200 https://registry.npmjs.org/static-eval
    npm http GET https://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz
    npm http GET https://registry.npmjs.org/falafel/-/falafel-1.1.0.tgz
    npm http 304 https://registry.npmjs.org/escodegen
    npm http 200 https://registry.npmjs.org/duplexer2
    npm http GET https://registry.npmjs.org/has/-/has-1.0.0.tgz
    npm http GET https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz
    npm http GET https://registry.npmjs.org/escodegen/-/escodegen-1.3.3.tgz
    npm http 200 https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz
    npm http 200 https://registry.npmjs.org/through/-/through-2.2.7.tgz
    npm http 200 https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz

    > node-stringprep@0.7.0 install /var/www/kaiwa/node_modules/stanza.io/node_modules/xmpp-jid/node_modules/node-stringprep
    > node-gyp rebuild

    npm http GET https://registry.npmjs.org/camelcase
    npm http GET https://registry.npmjs.org/decamelize
    npm http GET https://registry.npmjs.org/window-size/0.1.0
    npm http 200 https://registry.npmjs.org/escodegen/-/escodegen-1.3.3.tgz
    /bin/sh: 1: node: not found
    gyp: Call to ‘node -e “require(‘nan’)”‘ returned exit status 127. while trying to load binding.gyp
    gyp ERR! configure error
    gyp ERR! stack Error: gyp failed with exit code: 1
    gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
    gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
    gyp ERR! System Linux 3.13.0-55-generic
    gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
    gyp ERR! cwd /var/www/kaiwa/node_modules/stanza.io/node_modules/xmpp-jid/node_modules/node-stringprep
    gyp ERR! node -v v0.10.25
    gyp ERR! node-gyp -v v0.10.10
    gyp ERR! not ok
    npm WARN This failure might be due to the use of legacy binary “node”
    npm WARN For further explanations, please read
    /usr/share/doc/nodejs/README.Debian

    npm http 200 https://registry.npmjs.org/object-inspect/-/object-inspect-0.4.0.tgz
    npm http 200 https://registry.npmjs.org/falafel/-/falafel-1.1.0.tgz
    npm http GET https://registry.npmjs.org/jsonparse/0.0.5
    npm http 200 https://registry.npmjs.org/has/-/has-1.0.0.tgz
    npm http 304 https://registry.npmjs.org/camelcase
    npm http GET https://registry.npmjs.org/core-util-is
    npm http GET https://registry.npmjs.org/isarray/0.0.1
    npm http GET https://registry.npmjs.org/string_decoder
    npm http 304 https://registry.npmjs.org/decamelize
    npm http 304 https://registry.npmjs.org/string_decoder
    npm ERR! Error: ENOENT, lstat ‘/var/www/kaiwa/node_modules/stanza.io/node_modules/brfs/node_modules/resolve/test/resolver.js’
    npm ERR! If you need help, you may report this log at:
    npm ERR!
    npm ERR! or email it to:
    npm ERR!

    npm ERR! System Linux 3.13.0-55-generic
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install”
    npm ERR! cwd /var/www/kaiwa
    npm ERR! node -v v0.10.25
    npm ERR! npm -v 1.3.10
    npm ERR! path /var/www/kaiwa/node_modules/stanza.io/node_modules/brfs/node_modules/resolve/test/resolver.js
    npm ERR! fstream_path /var/www/kaiwa/node_modules/stanza.io/node_modules/brfs/node_modules/resolve/test/resolver.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
    npm ERR! Error: ENOENT, lstat ‘/var/www/kaiwa/node_modules/stanza.io/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js’
    npm ERR! If you need help, you may report this log at:
    npm ERR!
    npm ERR! or email it to:
    npm ERR!

    npm ERR! System Linux 3.13.0-55-generic
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install”
    npm ERR! cwd /var/www/kaiwa
    npm ERR! node -v v0.10.25
    npm ERR! npm -v 1.3.10
    npm ERR! path /var/www/kaiwa/node_modules/stanza.io/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js
    npm ERR! fstream_path /var/www/kaiwa/node_modules/stanza.io/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
    npm http GET https://registry.npmjs.org/acorn
    npm http 304 https://registry.npmjs.org/window-size/0.1.0
    npm http GET https://registry.npmjs.org/amdefine
    npm http 304 https://registry.npmjs.org/jsonparse/0.0.5
    npm ERR! Error: ENOENT, lstat ‘/var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/rtcpeerconnection/rtcpeerconnection.bundle.js’
    npm ERR! If you need help, you may report this log at:
    npm ERR!
    npm ERR! or email it to:
    npm ERR!

    npm ERR! System Linux 3.13.0-55-generic
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install”
    npm ERR! cwd /var/www/kaiwa
    npm ERR! node -v v0.10.25
    npm ERR! npm -v 1.3.10
    npm ERR! path /var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/rtcpeerconnection/rtcpeerconnection.bundle.js
    npm ERR! fstream_path /var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/rtcpeerconnection/rtcpeerconnection.bundle.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
    npm http 304 https://registry.npmjs.org/core-util-is
    npm ERR! Error: ENOENT, lstat ‘/var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/filetransfer/filetransfer.bundle.js’
    npm ERR! If you need help, you may report this log at:
    npm ERR!
    npm ERR! or email it to:
    npm ERR!

    npm ERR! System Linux 3.13.0-55-generic
    npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install”
    npm ERR! cwd /var/www/kaiwa
    npm ERR! node -v v0.10.25
    npm ERR! npm -v 1.3.10
    npm ERR! path /var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/filetransfer/filetransfer.bundle.js
    npm ERR! fstream_path /var/www/kaiwa/node_modules/stanza.io/node_modules/jingle/node_modules/jingle-filetransfer-session/node_modules/filetransfer/filetransfer.bundle.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
    npm http GET https://registry.npmjs.org/promise
    npm http GET https://registry.npmjs.org/css
    npm http 304 https://registry.npmjs.org/isarray/0.0.1
    (………..)
    npm http 200 https://registry.npmjs.org/debug/-/debug-2.2.0.tgz
    npm http GET https://registry.npmjs.org/ms/0.7.1
    > iconv@2.1.8 install /var/www/kaiwa/node_modules/jxt/node_modules/ltx/node_modules/node-expat/node_modules/iconv
    > node-gyp rebuild
    /bin/sh: 1: node: not found
    gyp: Call to ‘node -e “require(‘nan’)”‘ returned exit status 127. while trying to load binding.gyp
    gyp ERR! configure error
    gyp ERR! stack Error: gyp failed with exit code: 1
    gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
    gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
    gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
    gyp ERR! System Linux 3.13.0-55-generic
    gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
    gyp ERR! cwd /var/www/kaiwa/node_modules/jxt/node_modules/ltx/node_modules/node-expat/node_modules/iconv
    gyp ERR! node -v v0.10.25
    gyp ERR! node-gyp -v v0.10.10
    gyp ERR! not ok
    npm WARN This failure might be due to the use of legacy binary “node”
    npm WARN For further explanations, please read
    /usr/share/doc/nodejs/README.Debian
    npm http 200 https://registry.npmjs.org/ms/0.7.1
    npm http GET https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
    npm http 200 https://registry.npmjs.org/ms/-/ms-0.7.1.tgz
    npm ERR!
    npm ERR! Additional logging details can be found in:
    npm ERR! /var/www/kaiwa/npm-debug.log
    npm ERR! not ok code 0

  2. root@host:/var/www/kaiwa# uname -a
    Linux host 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

  3. it SEEMS i solved it with installing
    root@host:/var/www/kaiwa# aptitude install nodejs-legacy
    i thought that would be dedicated to debian.

    a new invocation of “nmp install” ran through proper and spit out some crypthic lines at the end but exited with 0.
    another invocation resulted in:

    root@host:/var/www/kaiwa# npm install
    npm WARN package.json backbone@1.0.0 No repository field.
    npm WARN package.json getconfig@0.0.5 No repository field.
    npm WARN prefer global jshint@2.8.0 should be installed with -g
    root@host:/var/www/kaiwa# echo $?
    0

    root@host:/var/www/kaiwa# node server
    dev environment detected
    Client app ready
    Cache manifest generated
    Kaiwa running at: http://localhost:8000

    kaiwa seems to start properly and is available

    thanks for this introducation – my posts are meant to help others.

    best regards

      1. this is the err message
        Error: Cannot find module ‘./build/Release/LDAP’
        at Function.Module._resolveFilename (module.js:336:15)
        at Function.Module._load (module.js:278:25)
        at Module.require (module.js:365:17)
        at require (module.js:384:17)

        i try installing it, still gives me an err message

        npm ERR! Failed at the LDAP@1.2.1 install script ‘node-gyp rebuild’.
        npm ERR! This is most likely a problem with the LDAP package,
        npm ERR! not with npm itself.
        npm ERR! Tell the author that this fails on your system:
        npm ERR! node-gyp rebuild
        npm ERR! You can get their info via:
        npm ERR! npm owner ls LDAP
        npm ERR! There is likely additional logging output above.
        npm verb exit [ 1, true ]
        npm verb unbuild lib/node_modules/LDAP
        npm info preuninstall LDAP@1.2.1
        npm info uninstall LDAP@1.2.1
        npm verb unbuild rmStuff LDAP@1.2.1 from /usr/local/lib/node_modules
        npm info postuninstall LDAP@1.2.1
        npm verb gentlyRm don’t care about contents; nuking /usr/local/lib/node_modules/LDAP

        npm ERR! Please include the following file with any support request:
        npm ERR! /root/kaiwa/npm-debug.log

  4. am having this error message

    app.use(helmet.iexss());
    ^
    TypeError: Object function helmet() {
    var chain = connect();
    config.defaultMiddleware.forEach(function(middlewareName) {
    chain.use(helmet[middlewareName]());
    });
    return chain;
    } has no method ‘iexss’
    at Object. (/root/kaiwa/server.js:27:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

    plz help

  5. Hi, im trying to connect kaiwa with my own prosody server is that possible? and do u have any references about that?
    Thanks in advance

      1. Thanks for fast reply Karibu!

        I’ve read it after reading your great article 🙂 But the problem is I am not setting up a new prosody server instead, I’ve installed a prosody server and try to connect it to Kaiwa, do you have any idea how to install it?

        Thanks

        1. Hi Fendy,
          Are you using the mod_http_altconnect ? If yes, Kaiwa should auto discover the websocket connection.

          Which issue are you facing now? Any error?
          You have your port 5281 open? (for HTTP/Websocket connection)

          1. Hi, sorry for the late reply!
            I have given up trying to connect kaiwa and my own xmpp server. Now I’m trying to setup using the docker. I followed the instructions provided for kaiwa-server. Are you familiar with this?
            When I tried to execute the last command which is

            ldapadd -h localhost -x -D cn=admin,dc=myorga -w mypassword -f users.ldif’

            my terminal said ldapadd command not found (I’m using ubuntu 14.04 LTS). Is this docker problem or I am doing something wrong?
            I am really new to docker 🙁 any suggestions will be appreciated! Thanks a lot!

          2. Hi Fendy,
            Well, you need LDAP installed. That’s why the command cannot be found.

            Kaiwa per default need LDAP…. (As shared in a previous comment)

          3. Yes I know that but now I am using docker as insturcted at kaiwa-server wiki and that command just doesn’t work. You have any idea how to use it?

          4. Hi karibu yes i tried it, yeah it’s me 🙂
            The dev seems have moved to another project.

            Maybe its my docker problem I’ll try find a solution 🙂 thank you for your help!

  6. Hi,im trying to use kaiwa + ejabberd (15.07),but when trying to connect my xmpp-server nothing happens.Where can I see the error messages?

  7. Hi, how do I add the first Kaiwa user? I have installed everything and gotten to the login page but don’t know how to add a user and log into the actual Kaiwa client.

    1. Hi Kareo,

      This will be the job of your XMPP server (Prosody? Ejabberd?…)
      If you use LDAP, you should be able to manage your users directly through Kaiwa (The users will be able to update their information)

      To create new users, you still need to do it outside of Kaiwa…

  8. How can I install Kaiwa on windows? I have a local Tigase server installed on my PC, want to check how Kaiwa connects to it.

    1. Hi Saurabh, I’m afraid it is only available for Linux server… But you could install Kaiwa on the virtualmachine (or a different machine) and connect Kaiwa to your Tigase server without much troubles.

      Let me know if it works fine. Some users might want to do the same.

Leave a Reply

Your email address will not be published. Required fields are marked *