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
- Select TCP as the traffic type
- Set the internal port to 53589
Create Your Repository
Create a new GitHub repository with a Dockerfile for Taskwarrior Server:
FROM andir/taskd:latest
ENV PUID=1000ENV 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:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
PUID | 1000 |
PGID | 1000 |
Attach Persistent Volumes
Add the following volumes:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/var/taskd | 5 GB | Task 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:
taskd inittaskd config --force log /var/taskd/taskd.logtaskd config --force pid.file /var/taskd/taskd.pidtaskd config --force server 0.0.0.0:53589Creating Certificates
Generate server certificates:
cd /var/taskd/pki./generate./generate.serverAdding Users
Create organizations and users:
taskd add org MyOrgtaskd add user MyOrg usernameClient Configuration
Configure the Taskwarrior client:
- Copy client certificates to your local machine
- Configure
.taskrc:
taskd.certificate=/path/to/client.cert.pemtaskd.key=/path/to/client.key.pemtaskd.ca=/path/to/ca.cert.pemtaskd.server=your-server.klutch.sh:53589taskd.credentials=MyOrg/username/key- Sync:
task sync init
Syncing Tasks
Regular sync commands:
task sync- Sync with servertask sync init- Initial sync (first time only)
Additional Resources
- Taskwarrior Official Website
- Taskwarrior Server GitHub Repository
- Taskwarrior Documentation
- Klutch.sh Persistent Volumes
- Klutch.sh Deployments
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.