Taskd server on Raspbian

Quick entry to document the installation process to a Taskd server on Raspbian, in my previous entry I wrote about the same process but on pfSense (FreeBSD 11), but I decided to move my tasks server to my Raspberry Pi 3, so this is how I did it:

TASKD SERVER INSTALLATION

# apt install taskd -y
# cd /usr/share/taskd/pki/
# vim vars
BITS=4096
EXPIRATION_DAYS=3650
ORGANIZATION="ACME S.L"
CN=localhost
COUNTRY=ES
STATE="Aragon"
LOCALITY="Zaragoza"

# ./generate.ca
...
# ./generate.server
...
# ./generate.crl
...
# chown Debian-taskd.Debian-taskd ca.cert.pem ca.key.pem server.cert.pem server.crl.pem server.key.pem
# chmod 400 ca.cert.pem ca.key.pem server.cert.pem server.crl.pem server.key.pem

ADDITIONAL CONFIGURATION

# export TASKDDATA=/var/lib/taskd
# cd $TASKDDATA
# ln -s /usr/share/taskd/pki/ca.cert.pem .
# ln -s /usr/share/taskd/pki/server.cert.pem .
# ln -s /usr/share/taskd/pki/server.crl.pem .
# ln -s /usr/share/taskd/pki/server.key.pem .
# taskd init
# taskd config server 0.0.0.0:53589
# taskd config --force ca.cert $TASKDDATA/ca.cert.pem
# taskd config --force server.cert $TASKDDATA/server.cert.pem
# taskd config --force server.crl $TASKDDATA/server.crl.pem
# taskd config --force server.key $TASKDDATA/server.key.pem
# taskd config log /var/log/taskd/taskd.log
# taskd config pid.file /var/run/taskd.pid
# mkdir /var/log/taskd
# chown Debian-taskd.Debian-taskd /var/log/taskd
# vim /lib/systemd/system/taskd.service
...
###ExecStart=/usr/bin/taskd server --data /var/lib/taskd --log=-
ExecStart=/usr/bin/taskd server --data /var/lib/taskd
systemctl enable taskd
systemctl start taskd

CLIENT TASWARRIOR CONFIGURATION I

# cd /usr/share/taskd/pki/
# ./generate.client osx
# zip certs.zip osx.*
# cp certs.* /home/<USER>/

CREATE USERS AND GROUPS

In order to create, delete, modify and sync your tasks, you will need a user account. However, before you can add users, you will first need to create an organizational group. Run the command below to create your first group. Replace GROUP with an easily recognizable name.

# chown Debian-taskd.Debian-taskd /var/lib/taskd/orgs
# sudo -u Debian-taskd taskd add org Public --data /var/lib/taskd
Created organization 'Public'
sudo -u Debian-taskd taskd add user Public 'Aitor A. Public' --data /var/lib/taskd
New user key: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
Created user 'Aitor A. Public' for organization 'Public'

CLIENT TASKWARRIOR CONFIGURATION II

$ cd .task
$ unzip ../certs.zip
$ cd
$ task config taskd.ca -- ~/.task/ca.cert.pem
$ task config taskd.certificate -- ~/.task/**NAME**.cert.pem
$ task config taskd.key -- ~/.task/**NAME**.key.pem
$ task config taskd.server -- taskd.example.com:53589
$ task config taskd.credentials -- Public/Aitor A. Public/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
$ task config taskd.trust -- ignore hostname

Check the link bellow if you have any trouble with your server synchronization.


“If you want to achieve something, you build the basis for it.”
— Noam Chomsky

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s