HostOnNet Blog

Installing wekan on Ubuntu 16.04

Looking for Linux Server Admin or WordPress Expert? We can help.

Wekan is an Open Source Trello clone written in Node.js

https://github.com/wekan/wekan/

To install Wekan on Ubuntu, first install MongoDB

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt update
sudo apt install -y mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-mongos mongodb-org-tools
sudo systemctl start mongod
sudo systemctl enable mongod

Next we need Node.js and npm package manager instaleld

sudo apt -y install node.js npm

Next you need to download Wekan source code from Github, you can go to release page

https://github.com/wekan/wekan/releases

and download latest tar.gz file. At the time of trying this, the version is v0.51

cd /home/ubuntu
wget https://github.com/wekan/wekan/releases/download/v0.51/wekan-0.51.tar.gz
tar xvf wekan-0.51.tar.gz

Install npm packages required by wekan

cd /home/ubuntu/wekan/bundle/programs/server
sudo npm install

You are all set, before you run, you need to create a start.sh file with following content

vi /home/ubuntu/start.sh

Add following content

export MONGO_URL='mongodb://127.0.0.1:27017/wekan'
export ROOT_URL='http://your-domain-here.com'
export MAIL_URL='smtp://localhost:25?ignoreTLS=true'
export MAIL_FROM='[email protected]'
export PORT=80
cd /home/ubuntu/wekan/bundle/
/usr/bin/nodejs main.js

make it executable

chmod 755 /home/ubuntu/start.sh

Since we want to run this node.js application on port 80, we need to run as root, normal users can’t use port 80. For this, use command

sudo /home/ubuntu/start.sh

To auto start wekan on boot, add /home/ubuntu/start.sh to /etc/rc.local file before the exit 0 line.

$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/home/ubuntu/start.sh

exit 0
$ 

Posted in Installation

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.