Hi all! Sorry for the lack in new posts. I’ve had a busy past several months. We sold and bought houses, moved, did multiple projects at the new house and had an accident at work that left me with 6 broken ribs, 4 fractured vertebrae and a concussion to top it all off.
All that said, I have been tinkering a little on some computer geekery.
This really has very little to do with FreeNAS, but I ran across a great little project for running your own CalDAV / CardDAV server. The project is called Baikal and can be found here http://baikal-server.com/ . I’ve been looking for something like this to share contacts with my wife for a long time. I first tried OwnCloud, but the way it integrates with Apple’s AddressBook is clunky, with many card imports getting missed and even a few crashes of the AddressBook App. I’ve had Baikal up and running for a few days now, and so far, it has been working great. What I haven’t exactly figured out yet, maybe because it isn’t an option yet, is how to share contacts between users. So for the time being, both my wife and I are using the same login.
So, now for the FreeNAS part of this. I am running the Baikal server on my FreeNAS box in a jail. Install was really easy, especially because I already had a jail up and running with a webserver installed.
Get the software
1. Open a terminal either through the GUI or ssh and connect to the server.
2. Switch user to root.
su enter root password
3. Jexec into your jail
JID IP Address Hostname Path
1 192.168.0.44 Services2 /mnt/Files/jails/Services
You’ll want to replace 1 in the next line with the corresponding JID for the jail you want from the above output.
jexec 1 csh
4. Update the ports tree.
portsnap fetch portsnap update
5. Install the package for Baikal
pkg install baikal
6. Change the ownership on the baikal directory…this will depend a little on your setup, apache defaults to using www. Then move it somewhere a little more useful.
chown -R www:www /usr/local/www/baikal mv /usr/local/www/baikal /usr/local/www/apache24/data/.
7. Setup the webserver for baikal. I use apache, so that’s what I’ll show you. Edit the httpd.conf file and add the following towards the bottom. ServerName can be either an IP or a URL
8. Restart apache and see if it works.
service apache24 restart
9. Test to see if things are running right. Go to the URL you used in the above apache config. You should see the following if everything is working.
10. Log into the web setup utility for Baikal. Add a /admin after the URL from above. Now you should be greeted witha nice little setup page. After setup is done, you end up here:
Log in with the admin credentials you just created, then create at least one user.
11. Now, the cool part is linking your address book to it. The tricky thing about that is getting the URL right. For AddressBook, it is: http://server.ip.address/card.php/principals/username/
There is a really good description of various setups for clients over at the GitHub page for the project. https://github.com/netgusto/Baikal/blob/master/INSTALL.md
Some closing notes, there are multiple ways to setup the webserver to make this go. I’d recommend setting it up with ssl enabled. That is a more complicated process and I haven’t the time nor desire to outline it here. Also, it seems that Baikal really doesn’t like being setup in a way where it is not the docroot. So for instance, it is happy to be at http://somewebsite.com , but it will break when connecting your addressbook to it if it is located at http://somewebsite.com/cards. Maybe it just doesn’t like being aliased, not sure exactly, but it sure wasn’t happy with me for a while.
Hope you all enjoy.
12 thoughts on “Baikal Server – Your very own CardDAV / CalDAV server”
Hi. I try your guide. But i think you missed “portsnap extract” between
“portsnap fetch portsnap update”.
Hi, i try your guide. But i think you missed “portsnap extract” between
“portsnap fetch portsnap update”.
sorry for spamming. But appache24 is instaled before baikal?
a sorry again, now i see. You have webserver already installed.
Greetings! I followed your instructions to setup a Baikal server, but when I try to load it, all I get is:
Index of /
I am not getting the “Baikal is running allright.”, or the login. What am I doing srong?
Looks like you are not running php on your your webserver. Either that or you did not set index.php as an index page in your webserver config.
Bingo. That did the trick. Thanks!
When I try to enter calendar events on a Mac, I get this: The server responded with
“500” to operation CalDAVWriteEntityQueueableOperation.
Any idea what I can change to fix this?
Sorry, but no. I only use it as a cardDAV server.
That’s the weird thing. It won’t login to the user I created at all for cardDAV. It will for Cal, but not for Card.
For card, the server path is not intuitive. Server_URL/baikal/html/card.php/principals/user_name/
That’s assuming you have the baikal server running at Server_URL/baikal
Again, not sure about CAL at all.
Fixed it. I was trying to enter it as Advanced (like Cal). You have to use Manual.