• Get In Touch
May 17, 2017

How to Install Wekan on Ubuntu 14.04

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Wekan is a free and open source kanban board application that provides card-based task and to-do management. Wekan enables you to easily work with it and modify it. Wekan runs on nodejs and MonoDB.

Here, we will explain how to install Wekan on Ubuntu 14.04 server.

Requirements

  • A server running Ubuntu 14.04 server.
  • A non root user with sudo privileges setup on your server.

Update the System

Before installing any packages, it is recommended to update your system with the latest version. You can do this by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y

Once your system is up to date, you can proceed to the next step.

Install Node.js

First, you will need to install nodejs version 0.10.40. You can install it by running the following command:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
source ~/.nvm/nvm.sh
nvm install v0.10.40
nvm use v0.10.40
You should see the following output:

Now using node v0.10.40 (npm v1.4.28)

nvm alias default v0.10.40

You should see the following output:

default -> v0.10.40

Once nodej.s is installed, you can proceed to install MongoDB.

Install MongoDB

You can install the latest MongoDB package from the official MongoDB repository.

First, download the key from the key server with the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Next, you will need to add mongodb repo to apt:

sudo nano /etc/apt/sources.list

Add the following line:

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

Next, update the apt repository with the following command:

sudo apt-get update -y

Finally, install mongodb with the following command:

sudo apt-get install mongodb-org -y

Install Wekan

You can download the latest version of the Wekan from github repository with the following command:

mkdir ~/wekan
wget https://github.com/wekan/wekan/releases/download/v0.13/wekan-0.13.tar.gz

Once the download is complete, unzip the downloaded file with the following command:

tar -xvzf wekan-0.13.tar.gz -C ~/wekan

Next, change the directory to server and install all required dependencies using npm:

cd ~/wekan/bundle/programs/server
npm install

Next, install forever script with the following command:

npm install forever -g

Next, you will also need to create an Upstart script for wekan.
You can do this by creating /etc/init/wekan.conf file:

sudo nano /etc/init/wekan.conf

Add the following lines:

#!upstart

description "Wekan Upstart Script"

start on startup
stop on shutdown

expect fork

env NAME="Wekan"
env NODE_PATH="/home/hitesh/.nvm/v0.10.40/bin"
env APPLICATION_PATH="/home/hitesh/wekan/bundle/main.js"
env PIDFILE=/var/run/wekan.pid
env LOGFILE=/var/log/wekan.log
env MONGO_URL="mongodb://127.0.0.1:27017/wekan"
env ROOT_URL="http://127.0.0.1"
env MAIL_URL='smtp://user:pass@mailserver.example.com:25/'
env PORT="8080"

script
    PATH=$NODE_PATH:$PATH

    exec forever \
        --pidFile $PIDFILE \
        -a \
        -l $LOGFILE \
        --minUptime 5000 \
        --spinSleepTime 2000 \
        start $APPLICATION_PATH

end script

pre-stop script
    PATH=$NODE_PATH:$PATH

    exec forever stop $APPLICATION_PATH
end script

Save the file and start Wekan service with the following command:

sudo service wekan start

Install and Configure Nginx

By default, latest version of the Nginx is not available in Ubuntu repository. So you will need to add the Nginx repository to your system.
You can add Nginx repo with the following command:

sudo add-apt-repository ppa:nginx/stable

Next, update the system with the following command:

sudo apt-get update -y

Once the repository is up to date, install Nginx with the following command:

sudo apt-get install nginx -y

Once Nginx is installed, create a virtual host file for wekan.

sudo nano /etc/nginx/sites-available/wekan

Add the following lines:

server {
    server_name your-domain.com;
    listen 80;

    access_log /var/log/nginx/wekan-access.log;
    error_log /var/log/nginx/wekan-error.log;

    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $host;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection 'upgrade';
        proxy_cache_bypass $http_upgrade;
        proxy_pass         http://127.0.0.1:8080;
    }

}

Save and colse the file, then activate the virtual host with the following command:

sudo ln -s /etc/nginx/sites-available/wekan /etc/nginx/sites-enabled/

Next, test the nginx configuration with the following command:

sudo nginx -t

Finally, restart the Nginx server with the following command:

sudo /etc/init.d/nginx restart

Access Wekan

Before accessing Wekan, you will need to allow port 80 through the UFW firewall.

By default UFW is disabled on your system, so you need to enable it first.
You can enable it with the following command:

sudo ufw enable

Once UFW firewall is enabled, you can allow port 80 by running the following command:

sudo ufw allow80`

You can now check the status of UFW firewall by running the following command:

sudo ufw status

Once firewall is configured, open your web browser and type the URL http://your-domain.com, then register your first user.

Congratulations! you have successfully installed Wekan on your system. You can now easily deploy it in your production environment.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]