summarylogtreecommitdiffstats
path: root/taskd.notes
blob: 3e2ff4c52051139392b5471c1030a261b106f885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This document gives some guidance on the initial configuration of a
# Taskserver. For information on setting up organizations and users at the
# server, and on how to configure the Task clients to sync, please see the
# documentation at http://taskwarrior.org/docs/server_setup.html

################################################################################

# In order to control the server as a user, add the taskd group to your user.
#
# $ sudo usermod -a -G taskd $USER
# $ exec newgrp taskd

# Before anything else, set the configuration variables in /etc/conf.d/taskd
# (server storage and other conf) and /usr/lib/taskd/pki/var (certificate
# generation).

# Source the environment variables
export $(cat /etc/conf.d/taskd | sed -e '/^#/d' -e '/^\s*$/d')

# Initialize the database
taskd init
sudo chown taskd: $TASKDDATA/*  # this may be necessary to do again after adding
                                # organizations or users
sudo chmod 660 $TASKDDATA/config
sudo chmod 770 $TASKDDATA/orgs

# Initial configuration
taskd config --force server $TASKDSERVER:$TASKDPORT

# Generate and install your self-signed cert (assuming that the configuration at
# /var/lib/taskd/pki/vars has been set)
cd /usr/lib/taskd/pki
sudo ./generate
sudo chown taskd: *.pem
sudo chmod g+rw server.*.pem    # <-- if not set, taskd will not read its cert
sudo cp *.pem $TASKDDATA        # <-- these files need to be in /usr/lib/taskd/
                                # because they are used to create client certs

taskd config --force client.cert $TASKDDATA/client.cert.pem
taskd config --force client.key $TASKDDATA/client.key.pem
taskd config --force server.cert $TASKDDATA/server.cert.pem
taskd config --force server.key $TASKDDATA/server.key.pem
taskd config --force server.crl $TASKDDATA/server.crl.pem
taskd config --force ca.cert $TASKDDATA/ca.cert.pem

# Various settings
taskd config --force log $TASKDDATA/taskd.log
taskd config --force pid.file $TASKDDATA/taskd.pid

# Add the organization
# $ taskd add org Public

# Add your user
# $ taskd add user 'Public' 'Your Name' > ~/taskd.key