Taiga is a free, open-source project management platform designed with Agile development methodologies in mind. Itβs an excellent choice for self-hosting thanks to its extensive customization options, robust API, and the ability to maintain full control over your data. In this guide, we'll walk you through deploying Taiga, configuring it with Nginx, managing logs, and enabling advanced features. Letβs dive into the details.
Installing Taiga
π¦ Docker/Docker Compose Setup
Using Docker is the easiest and most reliable way to deploy Taiga. Below is a docker-compose.yml
file tailored for Taiga, setting up all dependencies such as PostgreSQL, Redis, and the Taiga backend/frontend:
version: '3.7'
services:
postgres:
image: postgres:14
container_name: taiga_postgres
restart: always
environment:
POSTGRES_USER: taiga
POSTGRES_PASSWORD: taiga_password
POSTGRES_DB: taiga
volumes:
- taiga_postgres_data:/var/lib/postgresql/data
redis:
image: redis:6
container_name: taiga_redis
restart: always
taiga-back:
image: taigaio/taiga-back:latest
container_name: taiga_backend
restart: always
depends_on:
- postgres
- redis
environment:
POSTGRES_HOST: postgres
POSTGRES_DB: taiga
POSTGRES_USER: taiga
POSTGRES_PASSWORD: taiga_password
REDIS_HOST: redis
volumes:
- taiga_backend_data:/taiga/media
taiga-front:
image: taigaio/taiga-front:latest
container_name: taiga_frontend
restart: always
depends_on:
- taiga-back
environment:
API_URL: http://localhost:8000/api/v1
ports:
- "80:80"
volumes:
taiga_postgres_data:
taiga_backend_data:
Run the following commands to bring up the Taiga stack:
mkdir taiga && cd taiga
## Save the above configuration to a file
nano docker-compose.yml
## Deploy the stack
docker-compose up -d
π Manual Installation
For a manual setup, install Taiga on a Linux server by following these steps:
- Install dependencies (Python, PostgreSQL, Redis, and Node.js):
sudo apt update
sudo apt install -y python3 python3-pip virtualenv postgresql redis nodejs npm
- Clone and configure the Taiga backend:
git clone https://github.com/taigaio/taiga-back.git
cd taiga-back
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
cp settings/local.py.example settings/local.py
nano settings/local.py # Adjust database and Redis settings
python manage.py migrate
python manage.py loaddata initial_user
python manage.py runserver
- Clone and configure the Taiga frontend:
git clone https://github.com/taigaio/taiga-front-dist.git
cd taiga-front-dist
cp conf.example.json conf.json
nano conf.json # Update API URL to point to your backend
npx http-server -p 80
Configuring Nginx as a Reverse Proxy
π Nginx Configuration
Set up Nginx to serve Taiga and enable HTTP routing:
server {
listen 80;
server_name taiga.example.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Save the configuration file to /etc/nginx/sites-available/taiga
and link it to the sites-enabled
directory:
sudo ln -s /etc/nginx/sites-available/taiga /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
π SSL/TLS Setup
Secure Taiga with a Letβs Encrypt SSL certificate:
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d taiga.example.com
Automate certificate renewal:
sudo crontab -e
## Add the following line
0 3 * * * certbot renew --quiet
Logging and Debugging Taiga
ποΈ Enabling Debug Logs
Enable debug logging in the Taiga backend by modifying the local.py
configuration file:
DEBUG = True
Restart the backend for changes to take effect:
docker restart taiga_backend
π Viewing Logs
Access logs for diagnosis:
- Docker:
docker logs taiga_backend
docker logs taiga_frontend
- Manual install:
Check backend logs: taiga-back/logs/taiga.log
Check frontend logs: Use browser developer tools or inspect error console output.
π οΈ Troubleshooting Common Issues
If Taiga fails to start:
- Verify database connectivity using
psql
:
psql -h localhost -U taiga -d taiga
- Check Redis status:
systemctl status redis
- Inspect Nginx configuration:
sudo nginx -t
π€ Exporting Logs
Forward logs to an ELK stack:
docker logs taiga_backend | nc <ELK_HOST> <ELK_PORT>
Backup and Restore
ποΈ File-Based Backups
Backup Taiga configuration and media files:
tar -czf taiga_backup_$(date +%F).tar.gz /path/to/taiga-back /path/to/taiga-front
π Database Backups
Create a PostgreSQL database dump:
pg_dump -U taiga -d taiga > taiga_db_backup.sql
Restore the database:
psql -U taiga -d taiga < taiga_db_backup.sql
π Automated Backup Scripts
Automate backups with a cron job:
crontab -e
## Add the following line for daily backups
0 2 * * * /usr/bin/pg_dump -U taiga -d taiga > /path/to/backup/taiga_db_$(date +\%F).sql
Updating and Upgrading Taiga
β¬οΈ Updating Docker Images
Pull the latest images and recreate containers:
docker-compose pull
docker-compose up -d
π οΈ Manual Updates
If installed manually, pull the latest code and rebuild:
cd taiga-back
git pull
pip install -r requirements.txt
python manage.py migrate
π Checking for Updates
Visit Taigaβs GitHub repositories to track releases and changes.
Leveraging Taigaβs Unique Features
π§ Enabling APIs
Taigaβs API is enabled by default. Use the following curl
command to test it:
curl -X GET http://localhost:8000/api/v1/projects -H "Authorization: Bearer <your_token>"
π Advanced Configurations
Customize your installation by enabling integrations in local.py
(e.g., Slack, GitLab):
INSTALLED_APPS += ['taiga_contrib_slack']
Install the plugin:
pip install taiga-contrib-slack
Restart the backend to apply changes.
Wrapping Up
This guide covered the essential steps to deploy, configure, and manage Taiga on your own infrastructure. From Docker-based setup to advanced configurations, self-hosting Taiga provides unparalleled control and flexibility. Start implementing these steps today to harness Taigaβs full potential in managing your Agile projects effectively!