From dmfswiki
Jump to: navigation, search

DAViCal is an Open-Source CalDAV and CardDAV server.



  • Server URL: <servername>:<port>
  • Use SSL: check accordingly
  • Username: your login name
  • Password: your password

If you run DAViCal in a subdirectory enter the path to your caldav.php


  • Server URL: <servername>:<port>/davical/caldav.php/

To sync a shared resource of another user you have to enter the full path to this resource (optionally, see below to learn how to bind those resources)


  • Server URL: <servername>:<port>/caldav.php/<username>/<calendarname>/


The CardDAV setup is exactly like the CalDAV setup.

Sync shared resources

By default neither of the apps will find resources of another user you have access to. Luckily DAViCal supports the BIND request. You can use it to bind other resources to your own principal home. Here is a small script that makes it easy to send that request:




<?xml version="1.0" encoding="utf-8"?>
<bind xmlns="DAV:">

echo $REQUEST | curl -k -d @- -X BIND -u $USER -H "content-type: text/xml charset=\"UTF-8\"" -H "user-agent: bind-script" $URL

Just save it to BIND.sh and call it like (don't forget to make it executable):


SERVERBASE is the path to your caldav.php (without caldav.php and without trailing slash), use http:// instead of https:// if your server doesn't support SSL

USERNAME is the name of the user where to bind the resource to

SHARED_RESOURCE is the path to the resource you want to bind

SEGMENT_NAME is optional and the name of the new path segment, by default the script uses the last segment of SHARED_RESOURCE (Note: if that name already exists in your principal home you'll have to specify an other name)

Here is an example:

Bind Bob's work calendar to Alice's principal home as bob_work:

./BIND.sh https://example.com alice /caldav.php/bob/work bob_work

If your DAViCal is not located in the server root, this should work (however, this is not tested):

./BIND.sh https://example.com:8443/davical alice /davical/caldav.php/bob/work bob_work

Once you bound a resource CalDAV-Sync and CardDAV-Sync should find and sync it properly.

You can remove bindings in the DAViCal admin site.


If CardDAV-Sync doesn't sync or you can not set up an account, make sure you didn't change the DAV headers. Go to your DAViCal configuration file and look for a line beginning with

$c->override_dav_header = "..."

If that line exists comment it out (there should be no need for this line in recent DAViCal releases) or make sure it contains "addressbook" and "calendar-access". CalDAV-Sync and CardDAV-Sync won't sync if a collection is not advertised as calendar or address book by those headers.