This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "CalDAV calendar server"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Service discovery)
(Server Installation)
Line 16: Line 16:
  
 
The CalDAV feature is based on [http://code.google.com/p/sabredav/ SabreDAV]. You can find more information about clients on that page too.
 
The CalDAV feature is based on [http://code.google.com/p/sabredav/ SabreDAV]. You can find more information about clients on that page too.
 +
 +
===Testing the server===
 +
 +
You can simply open the URL in a web browser. If you get a blank page then there's an error. Check the [[Troubleshooting#Error_log|error log]] in that case. It could be that the caldav module isn't installed.
  
 
===Installation when PHP runs in CGI mode===
 
===Installation when PHP runs in CGI mode===

Revision as of 15:14, 29 January 2014

With the CalDAV calendar server built in you can connect to the Group-Office calendars with other clients. You have to add them to your sync settings first at Settings (top right) -> Synchronization. To add a calendar you must first determine your baseURI. Ideally your webserver is configured with an alias:

Server Installation

If you installed the Debian packages you don't have to install anything on the server. Everything is configured by default and you can move on to the client configuration.

Alias /caldav /path/to/go/modules/caldav/calendar.php

In that case the base URI to your CalDAV server is:

http(s)://your.url.to.groupoffice/caldav/

Otherwise it's this:

http(s)://your.url.to.groupoffice/modules/caldav/calendar.php/

The CalDAV feature is based on SabreDAV. You can find more information about clients on that page too.

Testing the server

You can simply open the URL in a web browser. If you get a blank page then there's an error. Check the error log in that case. It could be that the caldav module isn't installed.

Installation when PHP runs in CGI mode

If you use PHP through CGI or FastCGI and Apache authentication headers are not passed through by default. You can enable this with the following mod_rewrite rule:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule> 

If you already had a mod_rewrite rule to map all urls to a server file, you might need to change this to something like:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule .* /modules/caldav/calendar.php [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule> 

Note the /modules/caldav/calendar.php. Make sure this reflects the correct relative URL of your server file.

Service discovery

For iOS7 it's required to setup service discovery. On a standard Debian box we add this to the virtual host (since 4.2.22):

Redirect 301 /.well-known/carddav /carddav
Redirect 301 /.well-known/caldav /caldav

For more information read:

https://code.google.com/p/sabredav/wiki/ServiceDiscovery

The Apple iCal client

Connecting with iCal:

  • Go to preferences in the iCal calendar application menu (Do not use System Preferences -> Accounts. This does not work).
  • Go to the Accounts tab
  • Press the + button to add a new account
  • Select 'CalDAV server' for account type
  • Enter your username, password
  • For server address, enter <baseURI>/principals/<your.groupoffice.username>/. Do NOT forget the trailing slash!

The Evolution CalDAV client

Connecting with Evolution:

  • Find your calendar URL at: <baseURI>/calendars/

Select your username and then find your calendar.
Eg. for John Smith: <baseURI>/calendars/jsmith/smith-john-1/

  • Connecting to a CalDAV server is done through the "New > Create new calendar" dialog. In this dialog it is possible to specify a CalDAV location. (Replace http(s) with caldav)


To setup TODO lists through Evolution works the exact same (select New tasklist instead of calendar).

Thunderbird with the lightning plugin

  • Find your calendar URL at: <baseURI>/calendars/

Select your username and then find your calendar.
Eg. for John Smith: <baseURI>/calendars/jsmith/smith-john-1/

  • In the main menu go to: File -> New -> Calendar
  • Select "On the network" in the dialog that pops up
  • Enter the URL you found in the first step


Maximum age of events

By default, Group-Office only synchronizes events that are not older then 1 month. If you would like to change this you can control it with this parameter in config.php:

$config['caldav_max_months_old']=6;


Android with caldav sync client

Task synchronization

In order to see the group office tasks list in your android phone, you need to assign a task list to be synchronized. In Group Office, go to Calendar -> Administration -> Double click your calendar -> Select the caldav tasklist. These tasks will be included in the caldav function. Also, install the cost free https://play.google.com/store/apps/deta ... dmfs.tasks "Tasks" app from google play. Then, configure the caldav settings like described below. If you already had caldav configured, delete the account and re-configure it, else the tasks won't appear in the "Tasks" app.

Calendar synchronization

After installing "caldav sync beta" https://play.google.com/store/apps/deta ... caldav.lib from google play, in the settings menu, under accounts, there is a new account provider named "caldav". In the caldav provider list following, choose the top entry "caldav" again. For the server address, use the entry from above (e.g. http://www.domain.tld/caldav) and enter your username and password. You then get a list of available calendars in group office. Choose the one(s) to be synchronized. Name the calendar and finish.