Skip to main content

Baïkal, synchronize your calendar and contacts

baikal logoIn a previous article, I’ve presented Owncloud, that includes CalDAV and CardDAV, allowing you to synchronize your calendar and contacts on your iOS, Android,… devices or directly with your Thunderbird and co applications.

But if you are only looking for a CalDAV and CardDAV server, no need to install Owncloud, simply use Baïkal.


Indeed, Baïkal let you synchronize your calendars and address books over CalDAV and CardDAV. Baïkal implements the IETF standards for centralized calendar and address book collections and is compatible with a large set of applications such as iOS/Mac OSX Calendar, Contacts and reminders, but also Android’s, Linux, Windows similar applications.

Basically, as long the application is CalDAV and CardDAV capable, Baïkal will works.

baikail server user

Easy to install, with a small footprint (<2MB codebase), Baïkal runs on PHP 5.3+ while the user data can be stored in a SQLite or MySQL database.A Web interface is included to simplify the administration such as user, calendar and address book collection management, etc… A dashboard provides a simple overview over the running system.baikal web interface dashboard



I assume you already have a working Apache server and SQLlite or MySQL installed.


1) Download and extract the latest archive in your /var/www

In Root:

(assuming the latest one is still the version 0.2.7)


2) Create an empty file named ENABLE_INSTALL

Per default, Baikal Install Tool is locked, to unlock it, you need to create an empty file named ENABLE_INSTALL (uppercase, no file extension) in the Specific/ folder.


3) Change the owner of the folder to avoid permission issues


4) Access the web installation panel

baikail web installation

To run the web installation, simply go to http://YourIP/baikal-regular/html

And follow the 2 steps installation.

At the second step, you will need to choose either to use SQLite or MySQL. If you use SQLite, no additional configuration will be needed. If you choose MySQL, simply set the hostname, user, password, etc… of your MySQL database.


5) Create a dedicated virtualhost with a sub domain as Baikail need it to run properly when you will connect your devices to it.

What you will need:

– Create a A redirection in your DNS server/registrar with something like dav.domain.tld to your IP

– Copy the apache virtualhost included in the Specific folder

In root, run:

and tweak its content to suit your domain name and folder path:

You will need to change the DocumentRoot, ServerName and <Directory “xxxxxx”> values

When done, save the file (CTRL+X then Yes) and reload apache: (In root)


You should now be able to access the web interface through http://dav.domain.tld directly and connect all your devices to your Baikal instance.

turn signal synchronized

Clock Synchronization – NTP is there

logo ntp
NTP Pool project logo

Most probably you have already seen the clock of a computer differing from another. Although it may not be a big problem for your alarm clock on your smartphone, for a server, lacking synchronization could impact some of your services and if the gap is too big with others computers, could even impact your mails being sent correctly, or others critical applications.


But in fact, it’s quite easy to avoid that.

All you need to do is to install NTP to sync with the pool of available NTP servers.

What is NTP

The Network Time Protocol (NTP) is a protocol designed to synchronize your local time clocks with networked time servers. A pool of NTP servers is being set up in a hierarchical manner and allow any use to enter in the pool.

The hierarchy is separated into different levels, the most accurate level being the Stratum 0, reserved for atomic clocks. The next level, Stratum 1 is used by machines locally connected to the Stratum 0 clocks, etc… The others level (Up to 15) are also ranked by the accuracy of their clocks.

And once being synchronize, you could also being a NTP server to spread the right clock time worldwide ! Start to feel like a conquistador? 🙂 It would be more like helping to share the load in fact…. (Don’t be disappointed)


Let’s install NTP:

ntp will act both client and server (If you wish too)

Well that’s all in fact….for most of the users, the default configuration will be enough. But if you want, you could select the servers you want to sync to.

Configuration (Optional)

If you want to see on which NTP server you are connected to, simply type:

to add/modify servers to synch with, modify the /etc/ntp.conf file:

and change the list of servers to sync with. (You could create a pool of servers that are close to your area). A good list could be find on the NTP Project.

If you do want to add servers, don’t simply add a second one, but at least 3 or 4 to improve accuracy as the Segal’s law states:

A man with a watch knows what time it is. A man with two watches is never sure.

Also, adding at the end of the server name the option “iburst” will push NTP to sync with this server in priority right after starting up. (Instead of waiting few minutes)


but only few of you should use this option as it adds load to the pool for probably unnecessary reasons. (I don’t use it)

Restart NTP to take into account your modification:


Join the NTP Pool

NTP Project are always looking for more volunteer to run a NTP node and help share the load. But it should be a long term commitment as once you in the pool, although it is easy to be removed from, it may takes months before inbound request stop.

Here is the servers list as of the date of this post. As you can see, Africa, South America and Asia have haven’t a broad coverage.

NTP PoolThe need in bandwidth should not be too high (5gb per month from my side), however, as spike in sync could happen NTP Project suggest to 384kbit/512kbit connection.

NTP project recommend some settings that would be good to follow before to apply for joining the NTP Pool.

If you are all set, simply create an account and add your server to your account in their Manage Servers page.

It will take a certain moment for your node to be listed and really used as NTP Project will first assess the reliability of your server. You will need to obtain a score of 10 to be listed. You can see where you stand through the Manage Servers page.

Time machine

You should now have your server synchronized with the rest of the world and hopefully helping to stay that way with your NTP server 😉