This blog post is going to detail my setup for self hosted, syncing, todo list management. No so much of a tutorial, but more of a general overview with notes.
This system piggybacks on top of iCal with its VTODO specification, so if you already have an iCal based hosted calendar, then using that for todo lists is as simple as finding compatible clients. Why set up a separate todo list server when a CalDav calendar server already gives you this for free!
Everything centres around the CalDav server, in my case, Nextcloud. Any other full implementation of CalDav should work fine, so take your pick. Then there is a client setup for each of the three platforms I use regularly: Linux on a desktop/laptop, Android on mobile devices, and the web. This setup fulfills the general requirements I have for data based software I need to access often:
- compatible with Linux and Android with web access as a bonus
- self hosting support
- offline support
- seamless syncing between all devices
Ok so how do we actually set all this up? Let’s look at it one platform at a time.
For me this is Nextcloud with its official calendar app. For you it may be a commercial offering like Google Calendar, or a minimal self hosted service like Radicale. Either way, CalDav calendar services are plentiful and easy to setup (or difficult, depending on what you choose), with plenty of tutorials elsewhere!
Since I use Nextcloud’s calendar, I can also access a calendar’s todo list through Nextcloud’s Tasks app. One click install and zero configuration required!
Ok now it gets interesting! More moving parts here. First, there is vdirsyncer to sync the CalDav files between Nextcloud and the local filesystem.
Then for the actual todo list client we can use todoman, a command line program that uses the local calendar files that were synced by vdirsyncer to manage the tasks. Typical commands may look like the following:
~ ❯ todo new do something 223 [ ] 2018-03-11 13:30:18 do something @calendar.ics ~ ❯ todo list 223 [ ] 2018-03-11 13:30:18 do something @calendar.ics 222 [ ] 2018-03-11 12:17:39 another task @calendar.ics 219 [ ] 2018-03-11 12:15:03 some task @calendar.ics ~ ❯ todo show 223 223 [ ] 2018-03-11 13:30:18 do something @calendar.ics ~ ❯ todo done 223 223 [X] 2018-03-11 13:30:18 do something @calendar.ics (100%)
Similarly to the Linux setup, there are two parts to the Android setup: the sync adapter app and the todo list app.
Once you have calendar syncing set up, you can move on to the todo list app. For this, I use OpenTasks. This is also easy to set up; it should automatically detect the calendar provided by DAVdroid and display the todo items. On first run, it may be necessary to grant the custom ‘read tasks’ and ‘write tasks’ permissions (which iirc are registered by DAVdroid on install). If it doesn’t ask for permission or doesn’t show the tasks on your calendar, you may have to open the Android app settings for OpenTasks and DAVdroid to make sure these permissions are enabled for each.
It should be noted that both apps are open source and can be installed from the Play Store or F-Droid.
Why this setup?
So I already mentioned before about it suiting because of offline support, syncing across devices/platforms, and self-hosted. Also, VTODOs support useful task features such as priority, due dates, extra description attached, and percentage completed (useful for in-progress tasks).
Yes, there are heaps of other options out there that do the same thing. A popular option, which I have tried for a while in the past, is the simple todo.txt single file format. This was ok, but I found syncing to be an issue due to it being a single file (aaagh conflicts) so I wanted something more robust.
Another highly recommended system is Taskwarrior. I was seriously considering using this, but setting up a syncing server looked too painful so I gave up. It requires setting up certificates and copying client certs and CA certs across devices… Maybe it gives more security? It’s the first server I’ve come across that requires this though, and haven’t heard of security issues from other methods. Can someone explain to me this design decision?
Now you’ve seen an overview of some example iCal based task management software and how they can be used together; hopefully something was useful here! Please comment here or ping me via another contact method if you have any feedback/questions/whatever. :)