InfCloud in conjunction with Baikal

Last Updated: 2017-04-10

If you want to host your own CalDAV/CardDAV server i would propose using the lightweight Baïkal CalDAV + CardDAV server for this. What it lacks, though, is a nice web-client - but here comes InfCloud. This is the integrated version of CalDavZAP and CardDavMATE, and includes all features of both clients, meaning it serves as a CalDAVclient and as a CardDAVclient and has a very nice UI.

Unfortunately, it is not straight forward to set things up - but i figured it all out in the end and got it up and running nicely on uberspace, the best host in the world.

First, i would suggest that you use a separate, but the same (sub)domain for both, the server and the web client, because otherwise you might run into trouble, because of the XMLHttpRequest same origin policy. It works just fine if you install it to different subfolders. To do so, download the latest baikal flat-package (easiest way to set up) and the latest version of InfCloud and extract it into a seperate subfolder each.

Installing and configuring Baikal

To install Baïkal, insert your database credentials into https://your.domain.tld/baikal/admin and everything should work out fine.

  1. After installing, log in and go to Settings to change WebDAV authentication type from DIGEST to BASIC.
  2. You also have to change CalDAV base URI under System settings from PROJECT_BASEURI . "cal.php/" to your baikal-folder, i.e. "/baikal/cal.php/" - mind the opening and closing "/ /".
  3. To make it work with InfCloud you have to add another column to your principals table in your baikal mysql-database; in the end, it should look like this:

CREATE TABLE 'principals' ( id INTEGER PRIMARY KEY ASC, uri TEXT, email TEXT, displayname TEXT, vcardurl TEXT, inf_it_settings TEXT, UNIQUE(uri) )

The easiest way is to use adminer and just add another varchar column named inf_it_settings.

Installing and configuring InfCloud

To install InfCloud, you have to edit your config.js via ssh after extracting it into your InfCloud-subfolder and uncomment/change the globalNetworkCheckSettings to look like this:

var globalNetworkCheckSettings={href: 'https://your.baikal.tld:443/baikal/calcard.php/principals/', hrefLabel: null, additionalResources: [], forceReadOnly: null, settingsAccount: true, timeOut: 90000, lockTimeOut: 10000, delegation: true, backgroundCalendars: [], ignoreAlarms: false}

And making them work together

The next step is to patch Baïkal to work with InfCloud, meaning that you can access your Calendars and Contacts with just one install of it. This is due to the fact that Baïkal normally has different hooks for cal.php and card.php.

You have to add a few lines to your at line 70ff:

*** 70,75 ****
--- 70,80 ----
'{}email-address' => array(
'dbField' => 'email',
+ /* necessary to access with PROPFIND caldavzap settings (Zellner, 2014-02-14) */
+ '{}settings' => array(
+ 'dbField' => 'inf_it_settings',
+ ),

and to at line 242ff:

*** 242,247 ****
--- 242,253 ----
'principal' => $this->getPrincipalUrl(),
'protected' => true,
+ /* give write permissions to principal properties (Zellner, 2014-02-14) */
+ array(
+ 'privilege' => '{DAV:}write',
+ 'principal' => $this->getPrincipalUrl(),
+ 'protected' => true,
+ ),


Now you should be able to access your calendar and your contacts with InfCloud. It seems to work all fine with Baïkal 0.2.7 and InfCloud 0.12.1 - if you have any questions, don't hesitate to ask.

Alternative way to set things up (UPDATE)

If you do not like to hack the source files, you can also use this workaround - thanks to Wernfried Domscheit for letting me know! According to him you do not need to patch any files. To automatically generate the URL for the globalNetworkCheckSettings in your config.js file, you can use the following code snippet:

location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: '')+

which should get you something like this: 'https://your.baikal.tld:443/baikal/calcard.php/principals/'.

Another advantage using this workaround, besides just having to download a single file and placing it in your baikal directory, is the possibility to explicitly define if your client is able to access CardDav (by using https://your.baikal.tld/baikal/card.php/addressbooks/) or CalDAV (https://your.baikal.tld/baikal/cal.php/calendars/) only, or both, by utilizing the new calcard.php file (https://your.baikal.tld/baikal/calcard.php/principals/).

Baikal issue fixed (UPDATE)

Thanks to Johannes Gross for letting me know that some Baikal issues are fixed. Check out the pull request at github.

Accessing your Calendar with Lightning

To access your calendar, i.e. with Thunderbird and the SOGo-connector, create a new calendar, choose CalDAV as format and put https://your.baikal.tld/cal.php/calendars/$username/$calendarname as the location of your calendar.

To access your addressbook with Thunderbird and the SOGo-connector, you have to create a new Remote Address Book and use https://your.baikal.tld/card.php/addressbooks/$username/$addressbookname as the URL.

Syncing your android phone using DAVdroid

If you want to sync your android phone as well, just use DAVdroid for it and use the same URL for your CalDAV and CardDAV server.

Rating 4.9 (7 votes)