Categories Tutorials

How to install Wekan on Ubuntu 14.04

In this blog post we will show you how to install Wekan on an Ubuntu 14.04 VPS with the latest version of Nginx as a reverse proxy. Wekan is an open-source Trello-like kanban board application which runs on Node.js and MongoDB. This guide should work on other Linux VPS systems as well, but was tested and written for Ubuntu 14.04 VPS.

Log in to your VPS via SSH

ssh user@vps_IP

Update the system and install necessary packages

[user]$ sudo apt-get update && sudo apt-get -y upgrade
[user]$ sudo apt-get install software-properties-common libssl-dev curl build-essential nano

Install Node.js

We will install the nodejs version 0.10.40 using the nvm (Node Version Manager) script

[user]$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
[user]$ source ~/.nvm/nvm.sh
[user]$ nvm install v0.10.40
[user]$ nvm use v0.10.40
[user]$ nvm alias default v0.10.40

Install MongoDB

To install the latest MongoDB package from the official MongoDB repository run the following commands:

[user]$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
[user]$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
[user]$ sudo apt-get update
[user]$ sudo apt-get install -y mongodb-org

Download and install Wekan

Create a root directory for your Wekan instance and download the latest release from github using the following commands:

[user]$ mkdir -p ~/wekan
[user]$ curl -LOk https://github.com/wekan/wekan/releases/download/v0.10.1/wekan-0.10.1.tar.gz
[user]$ tar xzvf wekan-0.10.1.tar.gz -C ~/wekan
[user]$ cd ~/wekan/bundle/programs/server
[user]$ npm install 

In case you never heard of Forever, it is a tool which ensures that a given script runs forever.

[user]$ npm install forever -g

Create an Upstart script

[user]$ sudo nano /etc/init/wekan.conf

description "Wekan Upstart Script"
start on startup
stop on shutdown
expect fork

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


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

end script
pre-stop script

    exec forever stop $APPLICATION_PATH
end script

Do not forget to change username with your actual username.

You can now start your Wekan service with :

[user]$ sudo service wekan start

Install and Configure Nginx

The latest version of Nginx 1.8 is not available via the default Ubuntu repositories, so we will add the “nginx/stable” PPA, update the system and install the nginx package.

[user]$ sudo add-apt-repository ppa:nginx/stable
[user]$ sudo apt-get update
[user]$ sudo apt-get install nginx

Create a new Nginx server block with the following content

[user]$ sudo nano /etc/nginx/sites-available/wekan
server {
    server_name my_wekan_domain;
    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;

Activate the server block by creating a symbolic link :

[user]$ sudo ln -s /etc/nginx/sites-available/wekan /etc/nginx/sites-enabled/wekan

Test the Nginx configuration and restart the server

[user]$ sudo nginx -t
[user]$ sudo service nginx restart

That’s it. You can now open your browser, type the address of your Wekan instance and register your first user.

For more information about how manage your Wekan application, please refer to the Wekan website.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

View Comments

  • Thanks for this great tutorial about wekan. I try to install it but a get some worning when i try to execute this command: npm install forever -g worning: npm WARN optional dep failed, continuing fsevents@1.0.6 and when i try: service wekan start I get this: start: Job failed to start Please help me.

      • I try to install again and the first warning is when i install npm. warning: 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

    • You should be able to install Wekan on Windows. For more info, please check their wiki at: https://github.com/wekan/wekan/wiki

    • If you followed our tutorial carefully, then you will be able to access Wekan with the domain that you configured in the Nginx server block.

  • Hi, I try to install it but a get some warning when i try to execute this command: npm install forever -g worning: npm WARN optional dep failed, continuing fsevents@1.0.15 and when i try: service wekan start I get this: start: Job failed to start i already change name is wekan.conf

    • Have you made sure that you've followed the instructions correctly? Please try doing all of the described steps again and be more careful. We usually make sure that all of our guides here are correct. Finally make sure that you update the `username` parts of the script with your actual username.

  • Hello...I followed all the steps but I'm getting an error during the service starting; Failed to start wekan.service: Unit wekan.service not found. I've already re-did all the steps and stop at the same error. Is there anything else to configure? The .nvm and /home/MyUsername/wekan/bundle/main.js exist. Any advice?

    • Most likely you are using Ubuntu 16.04 as an operating system and the problem is related to the Upstart script.

  • No man, as I said, now I'm running Ubuntu 14.04. The upstart script has a line pointing to "/home/username/wekan"....I changed the "username" but this path does not exist in my system. I didn't get when the wekan folder was created, during the steps I'm gonna repeat all the steps again. Many thanks

  • hi, with your tutorial is my wekan instanz up and running. Thanks for that. But after the upgrade to the newest version v0.11.0-rc2, the webbrowser gives me only "bad gateway" Have you tried an upgrade? Thanks for reply.