Presentation

Wekan is an open-source kanban board which allows a card-based task and to-do management, similar to tools like WorkFlowy or Trello.

Wekan allows to create Boards, on which Cards can be moved around between a number of Columns. Boards can have many members, allowing for easy collaboration, just add everyone that should be able to work with you on the board to it, and you are good to go! You can assign colored Labels to cards to facilitate grouping and filtering, additionally you can add members to a card, for example to assign a task to someone (source: Wekan wiki).

A small presentation by the main contributor is available here.

Wekan can be installed inside a Docker container. In this tutorial, it will be installed as a service.

Installation Procedure

As Wekan works with a MongoDB database system to store information, you first need to install a MongoDB service.

NodeJS Installation

Based on NodeJS, Wekan requires a NodeJS service. However and for the time being, Wekan doesn’t work with the lattest NodeJS versions, so the standard NodeJS installation tutorial can’t be used. The pretty old 0.10.40 version has been tested for this tutorial.

Download the 0.10.40 NodeJS version:

# cd /opt # wget http://nodejs.org/dist/v0.10.40/node-v0.10.40-linux-x64.tar.gz # tar xvfz node-v0.10.40-linux-x64.tar.gz

Create a symbolic link for node and npm:

# ln -s /opt/node-v0.10.40-linux-x64/bin/node /bin/node # ln -s /opt/node-v0.10.40-linux-x64/bin/npm /bin/npm

Check the configuration:

# node --version v0.10.40 # npm --version 1.4.28

Wekan Installation

The v0.10.1 is currently the stable version of Wekan. We are going to install it.

Download the Wekan software:

# cd /opt # wget https://github.com/wekan/wekan/releases/download/v0.10.1/wekan-0.10.1.tar.gz # tar xvfz wekan-0.10.1.tar.gz

Create the wekan user & group:

# useradd -r wekan

Note: The -r option normally adds system user & group with uid/gid<1000 and doesn’t create any home directory.

Rename the wekan directory:

# mv bundle wekan

Run the installation process:

# cd /opt/wekan # (cd programs/server && npm install) npm WARN package.json meteor-dev-bundle@0.0.0 No description npm WARN package.json meteor-dev-bundle@0.0.0 No repository field. npm WARN package.json meteor-dev-bundle@0.0.0 No README data | > fibers@1.0.5 install /opt/wekan/programs/server/node_modules/fibers > node ./build.js `linux-x64-v8-3.14` exists; testing Binary is fine; exiting ansi-regex@0.2.1 node_modules/ansi-regex ansi-styles@1.1.0 node_modules/ansi-styles escape-string-regexp@1.0.3 node_modules/escape-string-regexp chalk@0.5.1 node_modules/chalk has-ansi@0.1.0 node_modules/has-ansi strip-ansi@0.3.0 node_modules/strip-ansi supports-color@0.2.0 node_modules/supports-color eachline@2.3.3 node_modules/eachline type-of@2.0.1 node_modules/type-of amdefine@1.0.0 node_modules/amdefine asap@2.0.3 node_modules/asap underscore@1.5.2 node_modules/underscore meteor-promise@0.5.0 node_modules/meteor-promise promise@7.0.4 node_modules/promise source-map-support@0.3.2 node_modules/source-map-support semver@4.1.0 node_modules/semver source-map@0.1.32 node_modules/source-map fibers@1.0.5 node_modules/fibers

Configure the correct permissions:

# chown -R wekan:wekan /opt/wekan

Create the /etc/systemd/system/wekan.service unit file and paste the following lines into:

[Unit] Description=The Wekan Service After=syslog.target network.target [Service] EnvironmentFile=/etc/default/wekan User=wekan Group=wekan WorkingDirectory=/opt/wekan ExecStart=/bin/node main.js Restart=on-failure SuccessExitStatus=143 [Install] WantedBy=multi-user.target

Note: According to this article, the NodeJS process when stopped exits with the code 143 when the default signal handler hasn’t been overriden (SuccessExitStatus=143). This is the “normal” behavior.

Create the /etc/default/wekan environment file and paste the following lines into:

NODE_ENV=production MONGO_URL='mongodb://root:myPassword@127.0.0.1:27017/mydb' ROOT_URL='http://www.example.com' MAIL_URL='smtp://127.0.0.1:25/' MAIL_FROM='wekan@example.com' PORT=9000

Note: Replace myPassword with the one used in the MongoDB tutorial, ROOT_URL and MAIL_FROM contents according to your url.

Start and enable at boot the Wekan service:

# systemctl start wekan && systemctl enable wekan

Add a rule to the firewall:

# firewall-cmd --permanent --add-port=9000/tcp # firewall-cmd --reload

You can now connect to your Wekan service on the tcp port 9000 and becomes very well organised!

Additional Resources

Scott Moonen provides an Ansible playbook to install Wekan on RHEL 7. Although not specified, it only works with the 0.10.40 NodeJS version.

Andrew Voce provides a tutorial on how to protect your Wekan service behind a Nginx reverse proxy for better security.