Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I setup CalDav and CardDav servers on my Mac to enable local 'cloud' syncing in Mavericks

I've decided to start off a new thread having initially posted on How to locally sync an iPhone with OS X Mavericks? iCloud is NOT an option.


It is clear to me that it is possible to establish syncing locally without going outside one's own home, and without internet access. I am bugged by the fact that the previous service has gone without any user focussed warning, but I am keen to find a way of solving the problem. If you are just frustrated, I'd be grateful if you can keep your annoyance off this thread.


My guess is that a CalDav and CardDav server hosted on my own Mac can be set upt to sync with my iPhone (3GS) either on a Computer-to-Computer (ad hoc) network or via my own home LAN. The trouble is I am not network/Apache savvy enough to use it.


I am reluctant to fork out an additional amount for the Mavericks server as I don't have any other foreseeable need for it, but Mavericks comes with Apache pre-loaded and there is a very light, simple and free open source CalDav and CardDav server in Baïkal. The trouble is I am not apache/network savvy enough to make use of it, and basically I am stumbling along in the near dark with terminal.


There are some good resources for setting up Apache and for setting up Virtual Hosts which would host my personal 'cloud', and Baïkal also comes with setup guides as well. The trouble is, I don't quite have enough knowledge to marry the two together. Is there anyone contributing to or watching this thread who has the know-how to do a proper step by step guide for running Baïkal on Apache as installed in the Mavericks OS, and setting up a local 'cloud'.


AFAICT the problem with the resources I have found is that the Apache stuff I've found doesn't particularly focus on running Baïkal, and the Baïkal documentation is not specific to Apache on Mavericks. Is there anyone out there who can give me some help with this?


Can anyone help - please? 😐

OS X Mavericks (10.9)

Posted on Nov 11, 2013 12:46 PM

Reply
135 replies

Feb 18, 2014 3:15 PM in response to Barney-15E

I think I may have the same issue. Baikal was running the first day, but after shutting down the computer, it doesn't start anymore. The command start says is already running, and apachectl configtest gives me that answer:

httpd: Syntax error on line 501 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n in /usr/local/php5/lib/libintl.8.dylib

Any idea what could be happening? Thank you very much!

Feb 19, 2014 8:09 AM in response to Skakagrall

Barney-15E wrote:

Post the response to the configtest.


I think some of those key files listed were an error. Did you find any of them?


To restore the original config:

All of the orginal config files are in the /etc/apache2/original folder.

Copy (don't move) them from the original folder to where they are in the apache2 folder.



I have just found Barney-15E's response.


After doing some corrections suggested by TopSteve the configtest was Syntax OK. I was also able to find and delete server.crt, server.key, server.csr but not server.key.org. Anyway it still didn't work.


I have located the orginal config files in the /etc/apache2/original folder but where do I move them to? Is it the

/etc/apache2/extra
folder? If so what happens to Baikal files and the SSL files? Are these deleted? Thank you.

Feb 19, 2014 8:56 PM in response to Skakagrall

Once you have it reconfigured and you know the web server works, you might try this simpler method.


Download the Baikal Flat package.

Copy the downloaded folder to your /Library/Webserver/Documents folder and rename it. In my examples, i will use the default name of baikal-flat. Anywhere I use "baikal-flat," substitute for whatever name you use.


After moving it to the web server folder, run these commands to configure the folder:

touch /Library/WebServer/Documents/baikal-flat/Specific/ENABLE_INSTALL 
sudo chown -R www:www 
/Library/WebServer/Documents/baikal-flat/

Select the folder in the Finder and Get Info (cmd-i).

Click the padlock at the bottom, below the sharing and permissions section: authenticate.

In the sharing and permissions section, change everyone to Read only.

Select Apply to Enclosed from the Gear menu below the permissions.


Edit the httpd.conf file:

Remove the # sign from this line:


LoadModule php5_module libexec/apache2/libphp5.so


Save the file.

Stop, then start the server:

sudo apachectl stop
sudo apachectl start

Go to http://localhost/baikal-flat

Then configure the Baikal server as I noted in the user tip.

Add the accounts to your iDevices and Calendar/Contacts as I noted in the tip. However, you'll have to add the baikal-flat path to the URL, and you won't be using SSL. That will prompt warnings on your devices. Not using SSL could be a problem if you are outside of your home wifi. You could use the preference pane I posted earlier (page 8) to disable the web server when you are not on a secure server.

Feb 19, 2014 10:59 PM in response to Skakagrall

I have followed the baikal-flat simpler method above, but unfortunately when I test http://localhost/baikal-flat I get the error message “Error - Insufficient permissions on the Specific/ folder In order to work properly, Baïkal needs to have write permissions in the Specific/ folder.” My understanding is that write permissions are exactly what I have just removed, per above.


I’m also wondering about the first set of commands:


touch /Library/WebServer/Documents/baikal-flat/Specific/ENABLE_INSTALL

sudo chown -R www:www

/Library/WebServer/Documents/baikal-flat/


Are these three commands or two? The third command just seems to be a directory.

Feb 20, 2014 5:37 AM in response to Skakagrall

They are two commands. I don't know why the forums broke the third line off from the second.

sudo chown -R www:www /Library/WebServer/Documents/baikal-flat/

And, based on the error message, you did not complete them and the additional modification of permissions with the Finder.


When I copied and pasted, it pasted as one line, so it may just be the display.

Feb 20, 2014 8:15 PM in response to Barney-15E

I've been working on this problem for six days — six days that I didn't really have.


I've tried the Baikal regular setup twice (on the basis of "Hosting your own CalDAV and CardDAV server using Baïkal Server" at https://discussions.apple.com/docs/DOC-6311) and the Baikal flat setup (on the basis of the information above) twice. None of them have worked. I'm a long-term Mac user but without programming skills. This is the first time I have worked inside the Mac Apache/webserver folders.


I'm now abandoning Baikal in favour of OS X Server. Other users at my abilitry level may decide that that is the best option for them as well. I'm now signing off this discussion.

Feb 23, 2014 11:23 AM in response to Ueaydin

You failed to edit the config files correctly, and you didn't copy the Baikal folder into the WebServer/Documents folder (or you gave it a different name).


The Virtual Hosts config, you didn't comment out (or delete) the Virtual Host on port 80.

For the Baikal server folder error, did you download the Flat package or the Regular? You need the Regular for the User Tip I posted.


If you are following the quick setup I posted earlier, here, then you don't need to configure the Virtual Hosts or SSL.

How do I setup CalDav and CardDav servers on my Mac to enable local 'cloud' syncing in Mavericks

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.