Skip to content

Deploying Taskwarrior

Introduction

Taskwarrior is a powerful command-line task management tool, and Taskwarrior Server (taskd) enables synchronization of tasks across multiple devices. Known for its flexibility and extensive feature set, Taskwarrior is a favorite among developers and command-line enthusiasts.

Key highlights of Taskwarrior:

  • Command-Line Interface: Fast, scriptable task management
  • Synchronization: Sync tasks across multiple devices
  • Powerful Queries: Complex filtering and reporting
  • Tags and Projects: Organize with tags and projects
  • Dependencies: Define task dependencies
  • Recurring Tasks: Set up repeating tasks
  • Priority System: Flexible priority management
  • Annotations: Add notes to tasks
  • UDAs: User-defined attributes for customization
  • Hooks: Extend with custom scripts

This guide walks through deploying Taskwarrior Server on Klutch.sh using Docker.

Why Deploy Taskwarrior Server on Klutch.sh

Deploying Taskwarrior Server on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh automatically detects your Dockerfile and builds Taskwarrior Server without complex orchestration.

Persistent Storage: Attach persistent volumes for your task data and certificates.

HTTPS by Default: Secure synchronization with automatic SSL certificates.

GitHub Integration: Connect your configuration repository for automatic redeployments.

Prerequisites

Before deploying Taskwarrior Server on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your Taskwarrior configuration
  • Basic familiarity with Docker and containerization concepts
  • Taskwarrior installed on your local machine

Deploying Taskwarrior Server on Klutch.sh

    Create Your Repository

    Create a new GitHub repository with a Dockerfile for Taskwarrior Server:

    FROM andir/taskd:latest
    ENV PUID=1000
    ENV PGID=1000
    EXPOSE 53589
    VOLUME ["/var/taskd"]

    Push to GitHub

    Initialize and push your repository to GitHub with your Dockerfile.

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Create a New App

    Within your project, create a new app and connect your GitHub repository.

    Configure TCP Traffic

    In the deployment settings:

    • Select TCP as the traffic type
    • Set the internal port to 53589

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    PUID1000
    PGID1000

    Attach Persistent Volumes

    Add the following volumes:

    Mount PathRecommended SizePurpose
    /var/taskd5 GBTask data, certificates, and configuration

    Deploy Your Application

    Click Deploy to start the build process.

    Initialize the Server

    After deployment, initialize the server and create certificates.

Configuration

Server Initialization

Initialize the Taskwarrior server:

Terminal window
taskd init
taskd config --force log /var/taskd/taskd.log
taskd config --force pid.file /var/taskd/taskd.pid
taskd config --force server 0.0.0.0:53589

Creating Certificates

Generate server certificates:

Terminal window
cd /var/taskd/pki
./generate
./generate.server

Adding Users

Create organizations and users:

Terminal window
taskd add org MyOrg
taskd add user MyOrg username

Client Configuration

Configure the Taskwarrior client:

  1. Copy client certificates to your local machine
  2. Configure .taskrc:
taskd.certificate=/path/to/client.cert.pem
taskd.key=/path/to/client.key.pem
taskd.ca=/path/to/ca.cert.pem
taskd.server=your-server.klutch.sh:53589
taskd.credentials=MyOrg/username/key
  1. Sync: task sync init

Syncing Tasks

Regular sync commands:

  • task sync - Sync with server
  • task sync init - Initial sync (first time only)

Additional Resources

Conclusion

Deploying Taskwarrior Server on Klutch.sh gives you a powerful task synchronization server with automatic builds, persistent storage, and secure access. Sync your Taskwarrior tasks across all your devices with your own self-hosted server.