Inside Out

Notes on seeking wisdom and crafting software

Sync caldav tasks with vdirsyncer

If you’re using Nextcloud for your intranet (files, photos, calendar etc.), vdirsyncer and todoman may be an interesting addon to the workflows. vdirsyncer syncs the caldav based tasks and calendar items to your local desktop and todoman is a command line todo list manager for caldav items. This post will cover some notes on this setup.

Official setup guide is simple and available as a tutorial. Here’s my config for vdirsyncer.

# vdirsyncer configuration: ~/.vdirsyncer/config
status_path = "~/.vdirsyncer/status/"

[pair cal]
a = "cal_remote"
b = "cal_local"
collections = ["from a", "from b"]
conflict_resolution = "a wins"

[storage cal_local]
type = "filesystem"
path = "~/.vdirsyncer/arun"
fileext = ".ics"

[storage cal_remote]
type = "caldav"
url = "https://mynextcloudhost.local/remote.php/dav/"
username = "arun"

# create an app password at https://mynextcloudhost.local/settings/user/security
password = "some-app-password"

# retrieve this with `echo -n | openssl s_client -connect mynextcloudhost.local:443 | openssl x509 -noout -fingerprint`
verify_fingerprint = "87690337bxa9cd454ef265615g79b7f9z8zzf356"

First, validate this setup with vdirsyncer discover and vdirsyncer sync from the terminal.

Next, we’ll use systemd user service to automatically sync the remote and local calendars. The instructions for this were a bit difficult to find:

Here are the service files and steps.

# save to ~/.local/share/systemd/user/vdirsyncer.timer
Description=Run vdirsyncer hourly


# save to ~/.local/share/systemd/user/vdirsyncer.service
Description=Sync calendars and addressbooks with vdirsyncer

ExecStart=/usr/bin/vdirsyncer sync

Enable the service as shown below.

> systemd --user enable vdirsyncer.timer
> systemd --user start vdirsyncer.timer

Use todoman to list your tasks. Here’s my configuration.

# save to ~/.config/todoman/todoman.conf
# See
path = ~/.vdirsyncer/arun/*
default_list = inbox-1

# vim: set ft=ini

Additionally, if you use Android, do check out the awesome opensource Tasks app. It works flawlessly with Nextcloud and the above setup.