You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Taiga is an open source Agile Project management platform for small and large enterprise companies. Its features go head-to-head with commercial project management solutions such as Jira and Trello. The Taiga platform is is built on top of Python, Django, AngularJS and CoffeeScript. You can get started easily with Taiga by using the cloud-based offering or go the hard way of installing it on-premise Infrastructure. In today’s guide we will dive into the installation and configuration of Taiga Project Management Tool on CentOS 8.

With Taiga you can greatly improve your workflow and save many hours of management and communication both within your internal teams and with the customers. The ticketing system is outstanding and can be the primary way of quickly responding to customer demands.

Taiga platform has three main modules, namely:

  • taiga-back – Written in Python and Django
  • taiga-front-dist – Written in AngularJS and CoffeeScript
  • taiga-events – Written in JavaScript.

You need a fresh installation of CentOS 8 Server for this setup. Ensure the server is updated by running the commands below.

sudo dnf -y update

Consider a reboot once the update is complete.

sudo systemctl reboot

Step 1: Put SELinux in Permissive and Set Server hostname

Put the server SELinux in Permissive mode if set already to Enforcing:

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config

Set an FQDN hostname on your server.

fqdn_hostname="projects.hirebestengineers.com"
sudo hostnamectl set-hostname ${fqdn_hostname} --static
sudo hostnamectl set-hostname ${fqdn_hostname} --transient

Confirm hostname settings.

$ hostnamectl
   Static hostname: projects.hirebestengineers.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 5ba3065ca48e47fca70cdbaf22866fc7
           Boot ID: 15a036b5710f4bb4a6c6da83ac6c05eb
    Virtualization: kvm
  Operating System: CentOS Linux 8 (Core)
       CPE OS Name: cpe:/o:centos:centos:8
            Kernel: Linux 4.18.0-193.19.1.el8_2.x86_64
      Architecture: x86-64

Add a correct IP address and FQDN to the /etc/hosts directory.

95.217.216.7 projects.hirebestengineers.com

Verify:

$ sudo dnf -y install bind-utils
$ host projects.hirebestengineers.com
projects.hirebestengineers.com has address 95.217.216.7

Also add an A record in your DNS server.

Confirm if the record can be queried from your local machine.

$ dig A  projects.hirebestengineers.com

; <<>> DiG 9.11.13-RedHat-9.11.13-6.el8_2.1 <<>> A projects.hirebestengineers.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57153
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;projects.hirebestengineers.com.	IN	A

;; ANSWER SECTION:
projects.hirebestengineers.com.	273 IN	A	95.217.216.7

;; Query time: 0 msec
;; SERVER: 213.133.98.98#53(213.133.98.98)
;; WHEN: Fri Oct 02 21:10:27 CEST 2020
;; MSG SIZE  rcvd: 75

Step 2: Install dependency packages

Let’s install basic standard packages on CentOS 8.

sudo dnf -y install epel-release
sudo dnf config-manager --set-enabled PowerTools
sudo dnf -y install git wget curl bash-completion vim pwgen 

Install Python packages:

sudo dnf -y install @python38 python38-devel virtualenv
sudo pip3 install virtualenvwrapper

Install Nginx web server:

sudo dnf -y install nginx

Step 3: Install Redis, RabbitMQ and Node.js

Install Redis:

sudo dnf -y install @redis
sudo systemctl enable --now redis

Install RabbitMQ:

curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
sudo dnf -y install rabbitmq-server
sudo systemctl enable --now rabbitmq-server.service

Once RabbitMQ server is installed, create a user and vhost 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

sudo dnf -y install @nodejs

Step 4: Install and Configure PostgreSQL

Taiga requires PostgreSQL database server to persist data. Run the commands below to install PostgreSQL database server on CentOS 8.

sudo dnf install -y @postgresql

Initialize database server:

sudo /usr/bin/postgresql-setup initdb

Start and enable PostgreSQL database service.

sudo systemctl enable --now postgresql

Set PostgreSQL admin user’s password using:

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

Create a database and user for Taiga.

$ sudo su - postgres
[email protected]:~$ createuser taiga 
[email protected]:~$ psql 
psql (10.14)
Type "help" for help.

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

Replace:

  • taiga with your Database username for Taiga.io
  • StrongPassword with strong database password for taiga user.

Step 5: Install and configure Taiga Backend

Create a dedicated taiga user on CentOS Linux.

$ sudo adduser taiga
$ sudo passwd taiga
Changing password for user taiga.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

$ sudo usermod -aG wheel taiga

Switch to Taiga user account and create logs folder

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

Clone Taiga Backend Project from Github

$ git clone https://github.com/taigaio/taiga-back.git
Cloning into 'taiga-back'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 37230 (delta 13), reused 26 (delta 8), pack-reused 37190
Receiving objects: 100% (37230/37230), 18.97 MiB | 5.50 MiB/s, done.
Resolving deltas: 100% (25889/25889), done.

$ cd taiga-back
$ git checkout stable

Upgrade pip3:

sudo pip3 install --upgrade pip

Install Python dependencies with pip:

pip3 install -r requirements.txt

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

Data will be imported to your PostgreSQL database on running above commands. This also creates the administrator account whose login credentials are admin with a password 123123

Create Config

Copy  the following config into ~/taiga-back/settings/local.py:

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

Copy and update the contents below:

from .common import *

MEDIA_URL = "http://projects.hirebestengineers.com/media/"
STATIC_URL = "http://projects.hirebestengineers.com/static/"
SITES["front"]["scheme"] = "http"
SITES["front"]["domain"] = "projects.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 fit your environment, set:

  • RabbitMQ connection username and password
  • Taiga domain name
  • Secret key and
  • Optional email settings.

To make sure that everything works, issue the following command to run the backend in development mode for a test:

python3 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).
October 02, 2020 - 20:53:40
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 a different SHELL and try curl:

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

Step 6: Install and configure Taiga Frontend

With the Taiga backed installed and confirmed to be working we can proceed to install Taiga frontend module.

Switch to a taiga user account

su - taiga

Clone the Project source code from Github

$ git clone https://github.com/taigaio/taiga-front-dist.git
Cloning into 'taiga-front-dist'...
remote: Enumerating objects: 807, done.
remote: Counting objects: 100% (807/807), done.
remote: Compressing objects: 100% (686/686), done.
remote: Total 8580 (delta 374), reused 526 (delta 101), pack-reused 7773
Receiving objects: 100% (8580/8580), 62.04 MiB | 7.13 MiB/s, done.
Resolving deltas: 100% (3616/3616), done.

$ cd taiga-front-dist
$ git checkout stable

Copy the example config file:

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

Edit the example configuration following the pattern below (replace with your own details):

{
    "api": "http://projects.hirebestengineers.com/api/v1/",
    "eventsUrl": "ws://projects.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 projects.hirebestengineers.com with your DNS name.

Step 7: Install Taiga Events

Taiga-events is the Taiga websocket server which allows taiga-front to show real-time changes in the backlog, taskboard, kanban, and issues listing. Taiga-events use rabbitmq as a  message broker.

$ cd ~
$ git clone https://github.com/taigaio/taiga-events.git taiga-events
Cloning into 'taiga-events'...
remote: Enumerating objects: 107, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 245 (delta 38), reused 90 (delta 28), pack-reused 138
Receiving objects: 100% (245/245), 44.87 KiB | 553.00 KiB/s, done.
Resolving deltas: 100% (113/113), done.

$ cd taiga-events

Install the required JavaScript dependencies:

npm install

Create a configuration file for Taiga Events.

cp config.example.json config.json

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

$ vim config.json

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

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

Add taiga-events to 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 if the service is in running state:

$ systemctl status taiga_events.service
● taiga_events.service - taiga_events
   Loaded: loaded (/etc/systemd/system/taiga_events.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-10-02 23:01:00 CEST; 12s ago
 Main PID: 15170 (node)
    Tasks: 7 (limit: 24392)
   Memory: 38.6M
   CGroup: /system.slice/taiga_events.service
           └─15170 node node_modules/coffeescript/bin/coffee index.coffee

Oct 02 23:01:00 projects.hirebestengineers.com systemd[1]: Started taiga_events.

Step 8: 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/.local/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 service is running.

$ sudo systemctl status taiga
● taiga.service - taiga_back
   Loaded: loaded (/etc/systemd/system/taiga.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-10-02 23:03:48 CEST; 50s ago
 Main PID: 15494 (gunicorn)
    Tasks: 5 (limit: 24392)
   Memory: 298.5M
   CGroup: /system.slice/taiga.service
           ├─15494 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
           ├─15497 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
           ├─15498 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
           ├─15501 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi
           └─15502 /usr/bin/python3.6 /home/taiga/.local/bin/gunicorn --workers 4 --timeout 60 -b 127.0.0.1:8001 taiga.wsgi

Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15494] [INFO] Listening at: http://127.0.0.1:8001 (15494)
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15494] [INFO] Using worker: sync
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15497] [INFO] Booting worker with pid: 15497
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15498] [INFO] Booting worker with pid: 15498
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15501] [INFO] Booting worker with pid: 15501
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: [2020-10-02 23:03:49 +0200] [15502] [INFO] Booting worker with pid: 15502
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...
Oct 02 23:03:49 projects.hirebestengineers.com gunicorn[15494]: Trying import local.py settings...

Step 9: Configure Nginx

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

Create NGINX Virtualhost for Taiga:

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

Modify the configuration file accordingly.

server {
    listen 80;
    server_name projects.hirebestengineers.com www.projects.hirebestengineers.com;  #  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 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

Set permissions:

sudo chown -R taiga:taiga /home/taiga/
sudo chmod o+x /home/taiga/
sudo chmod o+rx ~taiga/taiga-back/media

If all seems okay start nginx service:

sudo systemctl daemon-reload
sudo systemctl restart nginx taiga
sudo systemctl enable nginx taiga

Check status:

$ systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-10-02 23:14:06 CEST; 5s ago
  Process: 16260 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 16257 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 16255 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 16261 (nginx)
    Tasks: 3 (limit: 24392)
   Memory: 5.4M
   CGroup: /system.slice/nginx.service
           ├─16261 nginx: master process /usr/sbin/nginx
           ├─16262 nginx: worker process
           └─16263 nginx: worker process

Oct 02 23:14:06 projects.hirebestengineers.com systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 02 23:14:06 projects.hirebestengineers.com nginx[16257]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Oct 02 23:14:06 projects.hirebestengineers.com nginx[16257]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Oct 02 23:14:06 projects.hirebestengineers.com systemd[1]: Started The nginx HTTP and reverse proxy server.

Step 10: Access Taiga Web Login Dashboard

Open your favorite web browser and go:

http://your_taiga_domain.com

You should see below Taiga page.

Login with below default credentials:

Username: admin
Password: 123123

Then change Admin Password on Administrator > Change Password

Step 11: Secure installation with SSL

Follow our guide below to harden Taiga installation with an SSL certificate.

Secure Taiga Project Management Platform with Let’s Encrypt SSL

How To Disable Self Signup

To disable self user registration edit the file ~/taiga-back/settings/local.py and set value of PUBLIC_REGISTER_ENABLED to false.

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

Change setting for Taiga frontend:

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

Restart all Taiga services after updating the configuration:

sudo systemctl restart 'taiga*'

Reload nginx:

sudo systemctl reload nginx

Before:

After:

For Ubuntu installation use below guide.

Install Taiga Project Management Platform on Ubuntu

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF