Set up a calendar on our server:
- Go to our CalDav server
- Click the link for your name
- Create a new calendar using the form at the bottom of the page
Setting up Calendar Sync (CalDAV)
This uses the open-source DAVdroid app to sync your Dark Peak calendar and addressbook with your Android device. It will integrate with your default calendar and addressbook app.
- Make sure you have a calendar (and addresss book if you want to sync contacts) set up on the server
- If you want to sync tasks from the calendar server, install the Tasks app (also available on F-Droid)
- Install DAVdroid (available for free on F-Droid)
- Open DAVdroid and tap the add account button (the key with the plus sign):
- Select "Login with URL and user name" then the next arrow in the top right:
- Enter "https://dav.darkpeak.org" for the URL. Then enter your Dark Peak username and password:
- Keep "preemptive authentication" checked and go to the next screen, where you will be prompted for which calendars, address books and tasks to sync with (provided you installed the Tasks app before installing DAVdroid)
Set up your calendar in Thunderbird:
- Go to the Calendar tab in thunderbird
- Right click in the left sidebar and select "New Calendar…"
- Select "On the Network"
- Select "CalDav" and enter the URL of your calendar in the form https://dav.darkpeak.org/calendars/username/calendarName
- Name your calendar
- Click create
If you have not already installed the Jolla Calendar app:
- Go to the Store
- Scroll to the bottom and click the Jolla category
- Select the Calendar app and install it
To set up the account (CalDAV and CardDAV):
- Open Settings
- Select Accounts
- Drag down to access the Add Account option
- Select "CalDAV and CardDAV"
- Enter your connection details:
- Set a friendly name for the account as the description, adjust the sync schedule if desired and Accept.
Vdirsyncer can synchronize your calendar to a local directory containing .ics files, which can then be manipulated by various other tools (such as Khal below) or easily scripted. It can also be used to sync your Dark Peak Contacts.
- Install vdirsyncer, check your distribution packages or install via pip: `pip install vdirsyncer`
- Create a vdirsyncer config file at `~/.vdirsyncer/config`, and add the following:
[general] status_path = ~/.vdirsyncer/status/ [pair darkpeak_calendars] a = darkpeak_calendars_local b = darkpeak_calendars_remote [storage darkpeak_calendars_local] type = filesystem path = ~/.calendars/<CALENDAR>/ fileext = .ics [storage darkpeak_calendars_remote] type = caldav url = https://dav.darkpeak.org/calendars/<USERNAME>/<CALENDAR>/ username = <USERNAME> password = <PASSWORD>
- Replace <USERNAME> and <PASSWORD> in the above with your Dark Peak username and password. Replace <CALENDAR> with the name of the calendar you want to sync (in my case 'personal').
- Run `vdirsyncer sync` - it may prompt you about creating the calendar directory
- The local calendar directory should now contain .ics files, which can be edited/created/deleted and sync'd back to the server by running `vdirsyncer sync` again.
- You'll probably want to setup a periodic sync using cron or systemd timers. I used systemd by creating the following files:
[Unit] Description=Run vdirsyncer hourly [Timer] OnCalendar=hourly Persistent=true [Install] WantedBy=timers.target
[Unit] Description=Sync calendars and addressbooks vis vdirsyncer After=network-online.target Wants=network-online.target [Service] ExecStart=/usr/bin/vdirsyncer sync
This will run vdirsync hourly (or immediately if it missed the last sync). You can enable the timer like any other systemd service:
$ systemctl --user enable vdirsyncer.timer $ systemctl --user start vdirsyncer.timer
You can check active timers by doing:
$ systemctl --user list-timers
- Install and configure vdirsyncer according to the instructions above
- Install Khal, packages may exist for your Linux distribution, if not, you can install via Python's pip package manager: `pip install khal`
- Create a file at "~/.config/khal/khal.conf" containing:
[default] default_calendar = <CALENDAR> [calendars] [[<CALENDAR>]] path = ~/.calendars/<CALENDAR>/ color = dark green
- Replace the two <CALENDAR>'s in the above with the calendar (directory) name used when setting up vdirsyncer - you can obviously change the colour too, if you like. There are many other options available to tweak.
Most calendars will let you export an .ical file. Once you have the .ical file, see if your calendar client lets you import it. I used Khal (setup instructions above) to import events from a previous calendar server. You need Khal v0.6 or greater for the import command:
$ khal import -a <CALENDAR> --batch <EXPORTED_FILE>.ical
Obviously, replace <CALENDAR> and <EXPORTED_FILE> in that command with your calendar name and exported .ical file. You can omit the -a <CALENDAR> option if you've set a default calendar in khal.conf.