Install Taiga Project Management Platform on Ubuntu 20.04

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

In today’s article, we will cover all the steps required to set up a usable Taiga project management platform on Ubuntu 20.04. Taiga is an open source project management web application with scrum designed for small and large teams.

Taiga.io is built on Python, Django, AngularJS and CoffeeScript. This project management tool provides you with a simple and effective way to manage projects, improve collaboration, time tracking, bug tracking, Kanban, Wiki, reports, backlogs and more.

The Taiga platform consists of three main modules, each of which has its own dependencies at compile time and runtime:

  • Coniferous forest –This is the backend/API module
  • taiga-front-dist – Provide users with the front-end module of the portal.
  • taiga activity – Websockets gateway. This is optional, you can install or skip it.

This tutorial assumes that you are using a newly installed Ubuntu 20.04 server. Ensure that all packages have been updated to the latest version.

sudo apt update
sudo apt upgrade -y

Please reboot the system before proceeding to the next installation step.

sudo reboot

Step 1: Set the server hostname and DNS

Let’s start by setting the correct server hostname:

sudo hostnamectl set-hostname taiga.hirebestengineers.com --static

Confirm the host name setting.

$ hostnamectl
   Static hostname: taiga.hirebestengineers.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: be43a41780154ad0b9148af9afe95a4e
           Boot ID: 94c4e0892cf54c6baea75be6ff7387ba
    Virtualization: kvm
  Operating System: Ubuntu 20.04.1 LTS
            Kernel: Linux 5.4.0-48-generic
      Architecture: x86-64

Add the correct IP address and FQDN to Host Files in the /etc directory.

135.181.102.168 taiga.hirebestengineers.com

check:

$ host taiga.hirebestengineers.com
taiga.hirebestengineers.com has address 135.181.102.168

Also add an A record in your DNS server.

Confirm whether the records can be queried from the local computer.

$ dig A  taiga.hirebestengineers.com +short
135.181.102.168

Step 2: Install the dependency package

The next step is to install all the dependencies required to run the Taiga project management platform.

Install git, Python3 and other packages:

sudo apt update
sudo apt -y install git pwgen automake wget curl gettext build-essential libgdbm-dev  binutils-doc autoconf flex gunicorn bison libjpeg-dev libzmq3-dev libfreetype6-dev zlib1g-dev libncurses5-dev libtool libxslt-dev libxml2-dev libffi-dev python3 virtualenvwrapper python3-dev python3-pip python3-dev libssl-dev tmux

Install Nginx web server:

sudo apt -y install nginx

Install Redis and RabbitMQ:

sudo apt -y install rabbitmq-server redis-server

After installing the RabbitMQ server, create users and virtual hosts for Taiga:

$ sudo rabbitmqctl add_user taiga StrongPassword
Adding user "taiga" ...

$ sudo rabbitmqctl add_vhost taiga
Adding vhost "taiga" ...

$ sudo rabbitmqctl set_permissions -p taiga taiga ".*" ".*" ".*"
Setting permissions for user "taiga" in vhost "taiga" ...

Install Node.js

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt -y install nodejs

Step 3: Install and configure PostgreSQL

Taiga.io requires a PostgreSQL database server. Install and configure it as follows:

Import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Add the PostgreSQL apt repository:

echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list

Update the package list and install postgresql package

sudo apt update
sudo apt install postgresql -y

Use the following command to set the password of the PostgreSQL administrator user:

$ sudo passwd postgres
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

Create database and user for Taiga.io

$ sudo su - postgres
[email protected]:~$ createuser taiga 
[email protected]:~$ psql 
psql (12.4 (Ubuntu 12.4-1.pgdg20.04+1))
Type "help" for help.

postgres=# ALTER USER taiga WITH ENCRYPTED password 'StrongPassword';
postgres=# CREATE DATABASE taiga OWNER taiga;
postgres=# q
[email protected]:~$ exit

replace:

  • Coniferous forest Use your Taiga.io database username
  • Strong password Provide strong database passwords for taiga users.

Step 4: Install and configure Taiga backend

Create taiga user:

$ sudo adduser taiga
Adding user `taiga' ...
Adding new group `taiga' (1000) ...
Adding new user `taiga' (1000) with group `taiga' ...
Creating home directory `/home/taiga' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for taiga
Enter the new value, or press ENTER for the default
	Full Name []:
	Room Number []:
	Work Phone []:
	Home Phone []:
	Other []:
Is the information correct? [Y/n] y

$ sudo adduser taiga sudo
Adding user `taiga' to group `sudo' ...
Adding user taiga to group sudo
Done.

Switch to Taiga user account and create log folder

$ su - taiga
$ mkdir -p ~/logs
$ ls
logs

Github’s clone Taiga backend project

git clone https://github.com/taigaio/taiga-back.git
cd taiga-back
git checkout stable

Create Virtualenv

Then create Virtualenv for Taiga.io backend and install required dependencies

mkvirtualenv -p /usr/bin/python3 taiga_venv
pip3 install -r requirements.txt

If you receive an error message “mkvirtualenv: command not found“, please refer to the following guide for repair:

Fix mkvirtualenv command not found on Ubuntu

Populate the database with initial basic data

python3 manage.py migrate --noinput
python3 manage.py loaddata initial_user
python3 manage.py loaddata initial_project_templates
python3 manage.py compilemessages
python3 manage.py collectstatic --noinput

After running the above command, the data will be imported into the PostgreSQL database.This will also create an administrator account with login credentials admin With password 123123

If you need sample data, you can load it python3 manage.py sample_data.This is for For demonstration purposes only, It may be difficult to clean up the data later.

Create configuration

Copy the following configuration to ~/taiga-back/settings/local.py:

$ vim ~/taiga-back/settings/local.py

Copy and update the following:

from .common import *

MEDIA_URL = "http://taiga.hirebestengineers.com/media/"
STATIC_URL = "http://taiga.hirebestengineers.com/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "taiga.hirebestengineers.com"

SECRET_KEY = "OQOEJNSJIQHDBQNSUQEJSNNANsqQPAASQLSMSOQND"

DEBUG = False
PUBLIC_REGISTER_ENABLED = True

DEFAULT_FROM_EMAIL = "[email protected]"
SERVER_EMAIL = DEFAULT_FROM_EMAIL

#CELERY_ENABLED = True

EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend"
EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://taiga:[email protected]:5672/taiga"}

# Uncomment and populate with proper connection parameters
# for enable email sending. EMAIL_HOST_USER should end by @domain.tld
#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
#EMAIL_USE_TLS = False
#EMAIL_HOST = "localhost"
#EMAIL_HOST_USER = ""
#EMAIL_HOST_PASSWORD = ""
#EMAIL_PORT = 25

# Uncomment and populate with proper connection parameters
# for enable github login/singin.
#GITHUB_API_CLIENT_ID = "yourgithubclientid"
#GITHUB_API_CLIENT_SECRET = "yourgithubclientsecret"

Change the settings to suit your environment, set:

  • RabbitMQ connection username and password
  • Taiga domain
  • Key and
  • Optional email settings.

Configuration verification

To make sure everything is in order, issue the following command to run the backend in development mode for testing:

workon taiga_venv
python manage.py runserver

Sample successful output:

Trying import local.py settings...
Trying import local.py settings...
Performing system checks...

System check identified no issues (0 silenced).
September 30, 2020 - 20:29:24
Django version 2.2.16, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Open another shell and try to curl:

curl http://127.0.0.1:8000/api/v1/

Disable Virtualenv to start the front-end installation.

$ deactivate

Step 5: Install and configure Taiga front end

The taiga front end is mainly written in angularjs and CoffeeScript and depends on the back end. Before configuring these parts, you need to configure the Taiga backend.

Switch to taigauser account

su - taiga

Clone the project source code from Github

git clone https://github.com/taigaio/taiga-front-dist.git
cd taiga-front-dist
git checkout stable

Copy the sample configuration file:

cp ~/taiga-front-dist/dist/conf.example.json ~/taiga-front-dist/dist/conf.json
vim ~/taiga-front-dist/dist/conf.json

Edit the sample configuration in the following pattern (replace with your own details):

{
    "api": "http://taiga.hirebestengineers.com/api/v1/",
    "eventsUrl": "ws://taiga.hirebestengineers.com/events",
    "eventsMaxMissedHeartbeats": 5,
    "eventsHeartbeatIntervalTime": 60000,
    "eventsReconnectTryInterval": 10000,
    "debug": true,
    "debugInfo": false,
    "defaultLanguage": "en",
    "themes": ["taiga"],
    "defaultTheme": "taiga",
    "publicRegisterEnabled": true,
    "feedbackEnabled": true,
    "supportUrl": "https://tree.taiga.io/support",
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "GDPRUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": [],
    "tribeHost": null,
    "importers": [],
    "gravatar": true,
    "rtlLanguages": ["fa"]
}

You should substitute taiga.hirebestengineers.com With your DNS name.

Step 6: Install Taiga Activities

Taiga-events is a Taiga web socket server, which allows taiga-front to display real-time changes in the backlog, task board, kanban and issue list. The Taiga event uses Rabbitmq as a message broker.

cd ~
git clone https://github.com/taigaio/taiga-events.git taiga-events
cd taiga-events

Install the required JavaScript dependencies:

npm install

Create configuration files for Taiga events.

cp config.example.json config.json

Edit the configuration file and set the rabbitmq URL and key:

$ vim config.json

{
    "url": "amqp://taiga:[email protected]:5672/taiga",
    "secret": "OQOEJNSJIQHDBQNSUQEJSNNANsqQPAASQLSMSOQND",
    "webSocketServer": {
        "port": 8888
    }
}

The secret value of config.json Must be the same as SECRET_KEY in ~/taiga-back/settings/local.py!

Add taiga events to the systemd configuration:

sudo tee /etc/systemd/system/taiga_events.service<<EOF
[Unit]
Description=taiga_events
After=network.target

[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-events
ExecStart=/bin/bash -c "node_modules/coffeescript/bin/coffee index.coffee"
Restart=always
RestartSec=3

[Install]
WantedBy=default.target
EOF

Reload Systemd and start the service:

sudo systemctl daemon-reload
sudo systemctl start taiga_events
sudo systemctl enable taiga_events

Check whether the service is running:

$ systemctl status taiga_events.service
● taiga_events.service - taiga_events
     Loaded: loaded (/etc/systemd/system/taiga_events.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-09-30 22:51:07 CEST; 3min 17s ago
   Main PID: 18269 (node)
      Tasks: 7 (limit: 4567)
     Memory: 18.8M
     CGroup: /system.slice/taiga_events.service
             └─18269 node node_modules/coffeescript/bin/coffee index.coffee

Step 7: Start Taiga service

Create a new taiga systemd file:

sudo tee /etc/systemd/system/taiga.service<<EOF
[Unit]
Description=taiga_back
After=network.target

[Service]
User=taiga
Environment=PYTHONUNBUFFERED=true
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
Restart=always
RestartSec=3

[Install]
WantedBy=default.target
EOF

Reload the systemd daemon and start the taiga service:

sudo systemctl daemon-reload
sudo systemctl start taiga
sudo systemctl enable taiga

Execute the following command to check if the service is running.

$ sudo systemctl status taiga
● taiga.service - taiga_back
     Loaded: loaded (/etc/systemd/system/taiga.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-09-30 22:58:28 CEST; 7s ago
   Main PID: 19087 (gunicorn)
      Tasks: 5 (limit: 4567)
     Memory: 266.1M
     CGroup: /system.slice/taiga.service
             ├─19087 /home/taiga/.virtualenvs/taiga_venv/bin/python /home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 t>
             ├─19109 /home/taiga/.virtualenvs/taiga_venv/bin/python /home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 t>
             ├─19110 /home/taiga/.virtualenvs/taiga_venv/bin/python /home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 t>
             ├─19111 /home/taiga/.virtualenvs/taiga_venv/bin/python /home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 t>
             └─19112 /home/taiga/.virtualenvs/taiga_venv/bin/python /home/taiga/.virtualenvs/taiga_venv/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 t>

Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19087]: /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binar>
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19087]:   return io.open(fd, *args, **kwargs)
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19109]: [2020-09-30 22:58:28 +0200] [19109] [INFO] Booting worker with pid: 19109
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19110]: [2020-09-30 22:58:28 +0200] [19110] [INFO] Booting worker with pid: 19110
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19109]: Trying import local.py settings...
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19110]: Trying import local.py settings...
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19111]: [2020-09-30 22:58:28 +0200] [19111] [INFO] Booting worker with pid: 19111
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19112]: [2020-09-30 22:58:28 +0200] [19112] [INFO] Booting worker with pid: 19112
Sep 30 22:58:28 taiga.hirebestengineers.com gunicorn[19111]: Trying import local.py settings...
Sep 30 22:58:29 taiga.hirebestengineers.com gunicorn[19112]: Trying import local.py settings...

Step 8: Configure Nginx

Both taiga-front-dist and taiga-back must be exposed externally using a proxy/static file web server. For this purpose, Taiga uses NGINX.

NGINX is used as a static file web server to serve taiga-front-dist and send proxy requests to taiga-back. First delete the default Nginx configuration file.

sudo rm /etc/nginx/sites-enabled/default

Create NGINX virtual host for Taiga:

sudo vim /etc/nginx/conf.d/taiga.conf

Modify the configuration file accordingly.

server {
    listen 80 default_server;
    server_name _;  #  See http://nginx.org/en/docs/http/server_names.html

    large_client_header_buffers 4 32k;
    client_max_body_size 50M;
    charset utf-8;

    access_log /home/taiga/logs/nginx.access.log;
    error_log /home/taiga/logs/nginx.error.log;

    # Frontend
    location / {
        root /home/taiga/taiga-front-dist/dist/;
        try_files $uri $uri/ /index.html;
    }

    # Backend
    location /api {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001/api;
        proxy_redirect off;
    }

    # Admin access (/admin/)
    location /admin {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8001$request_uri;
        proxy_redirect off;
    }

    # Static files
    location /static {
        alias /home/taiga/taiga-back/static;
    }

    # Media files
    location /media {
        alias /home/taiga/taiga-back/media;
    }

    # Events
    location /events {
        proxy_pass http://127.0.0.1:8888/events;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout 7d;
        proxy_send_timeout 7d;
        proxy_read_timeout 7d;
    }
}

Verify the Nginx configuration:

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If everything is normal, restart the Nginx service:

sudo systemctl restart nginx

Check status:

$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-09-30 23:21:51 CEST; 27s ago
       Docs: man:nginx(8)
    Process: 20262 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 20276 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 20277 (nginx)
      Tasks: 3 (limit: 4567)
     Memory: 3.5M
     CGroup: /system.slice/nginx.service
             ├─20277 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ├─20278 nginx: worker process
             └─20279 nginx: worker process

Sep 30 23:21:51 taiga.hirebestengineers.com systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 30 23:21:51 taiga.hirebestengineers.com systemd[1]: Started A high performance web server and a reverse proxy server.

Step 9: Visit the Taiga Web login information center

Open your favorite web browser and go to:

http://your_taiga_domain.com

You should get a login screen.

Install Taiga Project Management Platform on Ubuntu 20.04

Log in with the following default credentials:

Username: admin
Password: 123123

Then change the administrator password on Admin>Change Password

Install Taiga Project Management Platform on Ubuntu 20.04

Step 10: Secure installation using SSL

Please follow the guidelines below to use SSL certificates to enhance Taiga installation.

Let’s encrypt SSL’s secure Taiga project management platform

How to disable self-registration

To prevent users from registering, edit the ~/taiga-back/settings/local.py file and set the value of PUBLIC_REGISTER_ENABLED to false.

$ su - taiga
$ vim ~/taiga-back/settings/local.py
PUBLIC_REGISTER_ENABLED = False

Change the settings of Taiga front-end:

$ vim ~/taiga-front-dist/dist/conf.json
"publicRegisterEnabled": false

After updating the configuration, restart all Taiga services:

sudo systemctl restart 'taiga*'

Reload nginx:

sudo systemctl reload nginx

prior to:

Install Taiga Project Management Platform on Ubuntu 20.04

Rear:

Install Taiga Project Management Platform on Ubuntu 20.04

Enjoy the great features that come with the Taiga project management platform.

Related guidelines:

Install OpenProject Community Edition on CentOS 8

How to install Jira on CentOS 8 / RHEL 8 Linux

Install OpenProject on Ubuntu

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Sidebar