Taskd

taskd is a lightweight, secure server for Taskwarrior (task). It allows users to intelligently synchronize their tasks between multiple clients, including between desktop and mobile ones.

Server

Installation

Install taskd or taskd-gitAUR for the development version.

Setup

Once taskd is installed, you need to set it up. The first step is to

$ export TASKDDATA=/var/lib/taskd 

(otherwise you need to append --data /var/lib/taskd to every taskd command).

Next, edit the /usr/share/doc/taskd/pki/vars file. The CN= line must either match the server's hostname or IP address, depending on how you connect. Once the file is edited to your heart's content, change to the directory /usr/share/doc/taskd/pki/ and run ./generate. This will create self-signed certificates for your server. Copy all generated .pem to /var/lib/taskd. Note that at least the and must remain in the folder for the user-certificate generation later on.

Now you need to configure taskd. Use taskd config or add the following to /var/lib/taskd/config directly.

Additionally you should change where taskd logs to, since the default is . This can be done by running

The last step is to set taskd's server name, which must be the same as the one used in the certificates: . Note that taskd has no default port and it must be set manually.

Running

Start/enable .

Adding a user in taskd

taskd organizes data into groups and users, with each user being in a group.

To add a user, run the following commands, substituting and as you wish. Note the key the last command returns, the user will need it to synchronize.

Make sure new group and user are readable by user .

# chown -R taskd:taskd /var/lib/taskd/orgs

Return to /usr/share/doc/taskd/pki/ and run

# ./generate.client username

This will return and .

The , and must be copied into to the user's Taskwarrior user data directory (default ).

Client

User configuration

Once the .pem files have been copied to a user's Taskwarrior data directory, their configuration must be updated to point to the files.

Add the following to the file in the same directory:

Paths are relative to the directory in which is executed, so paths should be relative to or absolute.

Perform the initial synchronization and consent to sending your Taskwarrior data to the server:

Send local changes to the server:

Using the Android Taskwarrior app

Before you even download the android app, you need to create a folder. On your external storage (or if you only have an internal one, then there) create the folder Android/data/kvj.taskw/files/key where "key" is the same as the key given when creating the user with . Then add the , and files to that folder.

Create a new file in that folder called .taskrc.android. It should look like this:

Now download the app and start it. When prompted to add a profile, choose the data folder that you just created. Taskwarrior should now sync and work as expected.

Troubleshooting

Unreachable Server

Should the server be unreachable but running, it bound itself to an IPv6 address. You can force IPv4 by adding to /var/lib/taskd/config.

If the server stalls on "Server starting", it may be failing to resolve the address you have specified in the option. After a while the server will time out with "Name or service not known". In that case, try adding an external entry aliasing that address to your external IP address (see Domain name resolution),

Restart taskd after attempting these, then check if your issue is fixed.

"Bad Key"

If the server responds with a "Bad Key" error even though you just generated them, check the permissions of the created folders (everything in and subfolders). taskd does not set its own uid / gid, so those folders must be manually chowned to taskd.

taskd.service fails to start on boot

In case your systemd unit for taskd fails to start on boot you can add a delay for this particular unit by adding a systemd timer:

Then disable and enable

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.