Calendar and contacts server
Written by ⓘⓓⓔⓝⓣⓛⓤⓓ - -

Standards
Calendars and Contacts are respectively based upon two standardsBoth are derived from WebDAV protocol. There are many products that implement these standards. I chose Baïkal for some reasons :
- It looked easy to setup
- It brought what I needed and not the full range of groupware solution
- It added a lightweight administration layer to manage users and their Calendars or Address Books.
Baïkal setup
Setting up the web application
I downloaded Baikal and un-tarred it in its own directory :/var/www/baikal
. and I made sure that it was owned by default Apache user www-data
cd /tmpI edited
wget http://baikal.codr.fr/get/baikal-regular-0.2.3.tgz
cd /var/www
tar -xzvf /tmp/baikal-regular-0.2.3.tgz
mv baikal-regular/ baikal
chown -R www-data: baikal/
.htaccess
file that was alread present in /var/www/baikal/html
to add "Allow from all
" directive because my Apache configuration is locked by default on every directory.I created an Apache virtual host to reach Baïkal pointing to /var/www/baikal/html
accessible with https
through /etc/apache2/sites-available/baikal.lebegue.org-ssl
<VirtualHost *:443>Any
ServerAlias baikal.lebegue.org
DocumentRoot /var/www/baikal/html
<Directory "/var/www/baikal/html">
Options None
Options +FollowSymlinks
AllowOverride All
</Directory>
SSLEngine On
SSLCertificateFile /etc/ssl/certs/certificate.pem
SSLCertificateKeyFile /etc/ssl/private/priv_key.pem
</VirtualHost>
http
access will be redirected to https
through /etc/apache2/sites-available/baikal.lebegue.org
<VirtualHost *:80>And then I had to enable these configurations in Apache :
ServerAlias baikal.lebegue.org
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
</VirtualHost>
a2ensite baikal.lebegue.org baikal.lebegue.org-sslIt never hurts to check if Apache is happy with this configuration :
apache2ctl configtestAnd then an Apache reload
service apache2 reload
Setting up MySql database
By default Baikal uses a SQLite database but it can run on MySql ... and I happen to have a MySql dabase running ...# mysql -pI'm good to go ...
mysql> create database baikal;
mysql> grant all on baikal.* to 'baikaluser'@'localhost' identified by 'password';
mysql> \q#
mysql -u baikaluser --database=baikal -p
mysql> @/var/www/baikal/Core/Resources/Db/MySQL/db.sql
mysql> show tables;
+------------------+
| Tables_in_baikal |
+------------------+
| addressbooks |
| calendarobjects |
| calendars |
| cards |
| groupmembers |
| locks |
| principals |
| users |
+------------------+
Web application setup
Open a browser and navigate tohttps://yourserver.xxx/admin/ .
The first step is to set up an admin user account ...And then you need to setup the database connectivity :
Users setup
The final step is to declare users through the administration interface :Client configuration
Evolution
My desktop client is Evolution here is how I set it up, Calendar:
and Contacts :
Android 4.x
On Android I used one application for caldav and carddav :- DAVDroid Open source calendar and contact synchronisation adapter available on independently managed application repository : F-droid
- On the phone download the CACert.org root certificate
- It should propose you to switch the settings of the phone in order to add the certificate to the user's approved container.
- At this step you MUST have set up an unlock method for the phone (draw a schema, type a password or a PIN) ... this will be enforced by Android itself