LinuxTutorialsUbuntu

How To Install Wekan on Ubuntu 18.04 LTS

Install Wekan on Ubuntu 18.04

In this tutorial, we will show you how to install Wekan on Ubuntu 18.04 LTS.  For those of you who didn’t know, Wekan is an open-source and collaborative kanban board application. With Wekan, we can create boards and cards which can be moved between a number of columns. Wekan allows you to invite members to the board and assign tasks to a specific member. This allows members of a team to collaborate more openly and know how the workload is being spread out across the team members.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Wekan on the Ubuntu 18.04 server.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 18.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Wekan on Ubuntu 18.04 LTS Bionic Beaver

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing Node.js.

Before installing Node.js, we will add a new system user ‘ramona’. We need to install node js because Wekan is a nodejs based application:

useradd -m -s /bin/bash ramona
passwd ramona

Now, log in as the ‘ramona’ user and install Node.js:

su - ramona
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Next, we will install nvm as the wekan user, after which we will add a new configuration in the .bashrc configuration file:

source ~/.bashrc

We will test the nvm installation using the following commands:

command -v nvm
nvm --version

To install Node.js we will use the commands:

nvm install v4.8
nvm use node

Step 3. Installing MongoDB.

A stable version of MongoDB packages is already in the default Ubuntu repository. However, the version in Ubuntu’s repository isn’t the latest. If you want to install the latest version you must add a third-party repository to your system and install it from there:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

After adding the repository key to Ubuntu, run the commands below to add the MongoDB repository to your system:

echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

After that, update your system and refresh existing repositories by running the commands below:

apt update

And now install the latest stable version of MongoDB:

apt install -y mongodb-org

MongoDB installation has been completed. We will start the MongoDB service and enable it:

sudo systemctl start mongod
sudo systemctl enable mongod

We need to configure the MongoDB authentication. We will log in to the mongo shell and create a new ‘admin’ superuser:

mongo

Next, we run the Mongo query below to create a new admin user with a password and set the role as root:

db.createUser(
{
user: "admin",
pwd: "MyAdmin-Password",
roles: [ { role: "root", db: "admin" } ]
}
)

Then, we will enable the authentication by editing the MongoDB configuration file:

nano /etc/mongod.conf

Find the ‘security’ line and edit the configuration:

security:
authorization: enabled

Now, we can restart MongoDB so that the changes take place:

systemctl restart mongod

Login to the mongo shell as the admin user:

mongo -u admin -p

Run the following queries:

use wekan
db.createUser(
{
user: "ramona",
pwd: "Strong-Password",
roles: ["readWrite"]
}
)

Step 4. Installing Wekan on Ubuntu 18.04.

First, download the latest version wekan source code using the wget command:

su - ramona
wget https://github.com/wekan/wekan/releases/download/v0.63/wekan-0.63.tar.gz
tar xf wekan-0.63.tar.gz

We will go to that directory and install the Wekan dependencies using the npm command:

cd bundle/programs/server
npm install

Now, we will run the following commands to create the environment variables for Wekan application:

export MONGO_URL='mongodb://wekan:StrongPassword@127.0.0.1:27017/wekan?authSource=wekan'
export ROOT_URL='http://your_ip_address/'
export MAIL_URL='smtp://user:pass@your_domain.com:25/'
export MAIL_FROM='wekan@your_domain.com'
export PORT=8000

We will go to the ‘bundle’ directory and run the Wekan Node.js application:

cd ~/bundle
node main.js

Step 5. Configure Wekan SystemD Service.

We are already logged in as a wekan user and now we need to create a new environment variable file ‘.env’:

nano .env

Then, edit and paste the following information:

export MONGO_URL='mongodb://wekan:StrongPassword@127.0.0.1:27017/wekan?authSource=wekan'
export ROOT_URL='http://your_ip_address/'
export MAIL_URL='smtp://user:pass@your_domain.com:25/'
export MAIL_FROM='wekan@your_domain.com'
export PORT=8000

Now, we will create a service file wekan.service:

cd /etc/systemd/system/
nano wekan.service

Add the following content:

[Unit]
Description=Wekan Server
After=syslog.target
After=network.target

[Service]
Type=simple
Restart=on-failure
StartLimitInterval=86400
StartLimitBurst=5
RestartSec=10
ExecStart=/home/wekan/.nvm/versions/node/v4.8.7/bin/node bundle/main.js
EnvironmentFile=/home/wekan/bundle/.env
ExecReload=/bin/kill -USR1 $MAINPID
RestartSec=10
User=wekan
Group=wekan
WorkingDirectory=/home/wekan
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=Wekan

[Install]
WantedBy=multi-user.target

Start the Wekan service and enable it:

sudo systemctl daemon-reload
sudo systemctl start wekan
sudo systemctl enable wekan

Step 6. Accessing Wekan.

Elkarte Community Forum will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your_ip_address:8000 and complete the required steps to finish the installation. If you are using a firewall, please open port 8080 to enable access to the control panel.

Congratulations! You have successfully installed Wekan. Thanks for using this tutorial for installing Wekan open-source kanban on your Ubuntu 18.04 system. For additional help or useful information, we recommend you to check the official Wekan website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button