Archive for Januar 2017

Baikal, CardDAV, CalDAV and Raspberry Pi

Januar 13, 2017

… so I gave it another try, and Baikal runs quite well, much better than radicale. The only drawback is that you can’t share calendars in the sense, that you cannot give read-only access of your calendar to another user. So basically that means that my wife and I have each one calendar, have them each added both on our cellphones in DAVDroid and have full access on each others calendar. Which is ok. Hope she won’t mess with my appointments 🙂

Again, my setup is: Raspberry runs local in my home-network, hence not much security, no SSL or other shenanigans.

Here in short the installation:

Install Lighttpd, php5, sqlite:

sudo apt-get install lighttpd
sudo apt-get install php5-common php5-cgi php5
sudo apt-get -y install sqlite3
sudo apt-get install php5-sqlite
sudo lighttpd-enable-mod fastcgi fastcgi-php

Download Baikal:

sudo -i
cd /var/www
wget https://github.com/fruux/Baikal/releases/download/0.4.6/baikal-0.4.6.zip
unzip baikal-0.4.6.zip 
cd baikal
touch Specific/ENABLE_INSTALL
cd Specific
mkdir db

Set rights for www-directory:

chown -R www-data:www-data /var/www/baikal
cd /etc/lighttpd/
vim lighttpd.conf

set root folder for www in config-file:

server.document-root = "/var/www"
sudo service lighttpd force-reload

Point your browser to

http://192.168.xx.xx/baikal/html/admin/

create admin, create (at least one new user)
For the USERNAME-field I recommend not to take an email address, since the
resulting URL for the calendar will be simpler

Now for DAVDroid:
Create new account, user „Use URL and username“. The URL is:

http://192.168.xx.xx/baikal/html/cal.php/calendars/USERNAME-field/default

For login, the username is the chosen USERNAME-field and password.

DAVDroid will scan and find the resulting addressbok. After enabling, giving rights to
DAVDroid and syncing, the calendar will show up in the Android calendar app. Same for the Android Contacts app.

For Thunderbird, install Lightning, and use the same URL as above. When questioned for the login, user same data as above.

To sync contacts in Thunderbird, install the SoGo Connector addon from here:

https://sogo.nu/download.html#/frontends

Tools -> Adressbook
Then File-> New -> Remote Adressbook. URL is

http://192.168.XX.XX/baikal/html/card.php/addressbooks/USERNAME-field/default/

username and password for login as above.

Yay!

Happy syncing. If you would like to create backups (e.g. via cronjob), the database is in

/var/www/baikal/Specific/db/db.sqlite