James Richards

Q: 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:50 PM

Close

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

  • All replies
  • Helpful answers

first Previous Page 7 of 10 last Next
  • by appid,

    appid appid Dec 17, 2013 12:17 AM in response to appid
    Level 1 (0 points)
    Dec 17, 2013 12:17 AM in response to appid

    hi guys - still very happy with my local server synch.

     

    I have tested it by adding new contacts on my iphone and also calendar events. I love the way it synchs wirelessly and automatically.

     

    I'm only having one issue at the moment. When I create a calendar event in my calDev account, I get an error message if I try to send that event to an attendee email. At the moment I am creating Cal events in my regular calendar, sending the invite and moving the event to my CalDev account.

     

    Welcome any advice on how to fix this one issue.

  • by Barney-15E,

    Barney-15E Barney-15E Dec 17, 2013 4:32 AM in response to appid
    Level 9 (50,893 points)
    Mac OS X
    Dec 17, 2013 4:32 AM in response to appid

    It looks like the base CalDAV server, SabreDAV, doesn't handle sharing or invites: https://code.google.com/p/sabredav/wiki/CalDAVSharing

  • by GV20,

    GV20 GV20 Dec 18, 2013 11:12 AM in response to Barney-15E
    Level 1 (0 points)
    Dec 18, 2013 11:12 AM in response to Barney-15E

    Hey Barney-15E,

     

    I've followed your wonderful tip and everything worked fine setting it up. Problem is, when I add a contact to the iphone, it doesn't show on the mac's contacts. Same for calendar, which doesn't seem to sync with the phone either. I've tried rebooting, relaunching apps, playing with fetch, manual and push, do you have nay suggestions?

  • by GV20,

    GV20 GV20 Dec 18, 2013 12:25 PM in response to GV20
    Level 1 (0 points)
    Dec 18, 2013 12:25 PM in response to GV20

    Never mind. I figured it out. Your excellent tutorial was missing the info that you have to choose "delete" existing contacts and calendars on the phone at the end of setting up the server on the iOS device. One also has to move all contacts and events to the server account on the mac for things to work smoothly.

  • by veda1,

    veda1 veda1 Dec 19, 2013 7:44 AM in response to James Richards
    Level 1 (0 points)
    Dec 19, 2013 7:44 AM in response to James Richards

    I couldn't get the Baïkal server working. I may try the OS X Server option. But before doing so I had some basic questions from an uneducated person point of view.

     

    Does the current OS X Server require Mavericks (10.9)?

    Would it run on Mountain Lion (want to make sure it works before upgrading to Mavericks)?

    Or does each OS X version have a correspondent OS X Server version?

    Will I need to upgrade OS X Server if I upgrade to the next Mac OS?

    Will I need to reconfigure the OS X Server if I upgrade to the next Mac OS?

    I wish to install the server on my main computer but don't want it to run all the time. Can OS X Server be turned ON and OFF at will?

  • by pedro ramon,

    pedro ramon pedro ramon Dec 19, 2013 8:12 AM in response to veda1
    Level 2 (246 points)
    Mac OS X
    Dec 19, 2013 8:12 AM in response to veda1

    Hi Veda

     

    see my post https://discussions.apple.com/thread/5460803?start=1695&tstart=0

     

    veda1 wrote:

     

    I couldn't get the Baïkal server working. I may try the OS X Server option. But before doing so I had some basic questions from an uneducated person point of view.

     

    Does the current OS X Server require Mavericks (10.9)?

    Would it run on Mountain Lion (want to make sure it works before upgrading to Mavericks)?

    Or does each OS X version have a correspondent OS X Server version?

    Will I need to upgrade OS X Server if I upgrade to the next Mac OS?

    Will I need to reconfigure the OS X Server if I upgrade to the next Mac OS?

    I wish to install the server on my main computer but don't want it to run all the time. Can OS X Server be turned ON and OFF at will?

     

    I also tried Baikal and was not able to make it working.

    The current OS X server is 10.9 (Mavericks), I do not think it is possible to install Mavericks server on a Moutain Lion Client.

    I am not 100% sure but I think that before installing the Server part OS X (to buy) would install the client part (free) of Mavericks.

    OS X Server looks to be installed as an additional software. If you do not configure & start the server it should run as a client.

    I your server is running under Moutain Lion and you upgrade to Mavericks server the config should remain.

    You can stop the server but it has no interest, the ressources taken to run the server are not very high (locally and for Notes, reminders, contacts & calendar only) and I do not see any difference with the client.

  • by veda1,

    veda1 veda1 Dec 19, 2013 3:25 PM in response to pedro ramon
    Level 1 (0 points)
    Dec 19, 2013 3:25 PM in response to pedro ramon

    Hello Pedro Ramon,

     

    Thank you for this information. This is helpful and inspiring. I may experiment on an external drive first to make sure everything goes well.

  • by Evertype,

    Evertype Evertype Dec 23, 2013 7:47 AM in response to Barney-15E
    Level 1 (0 points)
    Dec 23, 2013 7:47 AM in response to Barney-15E

    Barney, I've been following your instructions but I got stuck.

     

    First, I am nto sure I really understand step 7.b. What am I to set my servername to? xxxx.local? Just a word?

     

    Second, when I trued to Create the Self-Signed SSL Certificates, the commend

     

    openssl genrsa -des3 -passout pass:x -out server.pass.key 2048

     

    I got this error:

     

    server.pass.key: Permission denied

    3175:error:0200100D:system library:fopen:Permission denied:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/bio/bss_file.c:356:fope n('server.pass.key','w')

    3175:error:20074002:BIO routines:FILE_CTRL:system lib:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/bio/bss_file.c:358:

     

    And I've no idea where to go from here (I've no Unix training).

  • by Barney-15E,

    Barney-15E Barney-15E Dec 23, 2013 8:01 AM in response to Evertype
    Level 9 (50,893 points)
    Mac OS X
    Dec 23, 2013 8:01 AM in response to Evertype

    Evertype wrote:

     

    Barney, I've been following your instructions but I got stuck.

     

    First, I am nto sure I really understand step 7.b. What am I to set my servername to? xxxx.local? Just a word?

    Just make it www.evertype.org:8443 or something similar.

    Second, when I trued to Create the Self-Signed SSL Certificates, the commend

     

    openssl genrsa -des3 -passout pass:x -out server.pass.key 2048

     

    I got this error:

     

    server.pass.key: Permission denied

    3175:error:0200100D:system library:fopen:Permission denied:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/bio/bss_file.c:356:fope n('server.pass.key','w')

    3175:error:20074002:BIO routines:FILE_CTRL:system lib:/SourceCache/OpenSSL098/OpenSSL098-50/src/crypto/bio/bss_file.c:358:

     

    And I've no idea where to go from here (I've no Unix training).

    Neither do I. It appears that openssl is not allowed to write to the directory you are currently working in.

    When you first open Terminal, you should be in your home directory, so it shouldn't have a problem writing to that folder. Did you ever change permissions on your home folder?

    If you are not in your home, then in the Terminal, type

    cd ~/
    

    and hit return.

    Then try again.

     

    If that fails with the same error, run this command and post the first line of the output:

    ls -al ~/
    
  • by veda1,

    veda1 veda1 Dec 27, 2013 11:21 AM in response to James Richards
    Level 1 (0 points)
    Dec 27, 2013 11:21 AM in response to James Richards

    I gave Baïkal another shot with a Mavericks clean install on an external drive following Barney's instruction. I went further down the road but got stuck in the section "Adding the Calendars and Address Books to your Mac"

     

    I was able to add a CalDAV account in my Internet Accounts. But the Calendar app won't connect to it. I get the following error message: "The server responded with an error"

     

    I wasn't able to create a CardDAV account in my Internet Accounts. I get "A secure connection couldn't be established." and if I click on create again I get: "Unable to verify account name or password".

     

    I am using the same username and password in both cases.

     

    Any suggestion?

    Calendar1.jpgcalendar2.jpgadd-carddav-account1.jpgadd-carddav-account2.jpg

  • by Barney-15E,

    Barney-15E Barney-15E Dec 27, 2013 11:46 AM in response to veda1
    Level 9 (50,893 points)
    Mac OS X
    Dec 27, 2013 11:46 AM in response to veda1

    You must change "username" to the username you created in the Baïkal setup.

    Here is my account in Baïkal server account setup:

    Screen Shot 2013-12-27 at 1.42.13 PM.png

    And here is the server settings for calendar. You are in the setup section, but the info is similar.

    In your case it would be https://localhost:8443/cal.php/principals/veda/

    Screen Shot 2013-12-27 at 1.40.48 PM.png

  • by veda1,

    veda1 veda1 Dec 27, 2013 1:30 PM in response to Barney-15E
    Level 1 (0 points)
    Dec 27, 2013 1:30 PM in response to Barney-15E

    Hi Barney,

     

    Yes, my bad. I realized this when reading one of your posts on the long discussion thread (the one you reposted here). I made the changes and was able to create the CalDAV and CardDAV accounts. I will now take some time testing the syncing between devices. Looks promising...

     

    Thanks!

  • by veda1,

    veda1 veda1 Dec 28, 2013 5:14 PM in response to James Richards
    Level 1 (0 points)
    Dec 28, 2013 5:14 PM in response to James Richards

    I spent a fair amount of time experimenting with syncing between an iPhone and the Mac hosting Baïkal using an ad-hoc network connection. I wasn't sure which settings would work best. I tried various things but settled for manual sync on all apps hoping to have best control.

     

    Syncing from the iPhone to the Mac is fast and easy. The syncing is done as soon as I re-open Contacts or refresh calendars on the Mac.

     

    Syncing from the Mac to the iPhone is not so efficient. It takes at least 30 seconds to sync when I re-open Contacts on the iPhone. It may not be a long time but the problem is that you don't see any sync indicator (for both, Contacts and Calendar). You wonder if it really is syncing or when it's done.

     

    I have had more trouble with updating Calendar on the iPhone. It wouldn't sync after re-opening Calendar. I finally discovered that editing something on the iPhone Calendar was the only way to complete the syncing between the 2 devices. The item would move to the Mac and the iPhone would sync from the Mac. This is not very convenient. Is anybody else having the same issue?

     

    Also, is there a way to start and stop Baïkal?

  • by Barney-15E,

    Barney-15E Barney-15E Dec 28, 2013 8:01 PM in response to veda1
    Level 9 (50,893 points)
    Mac OS X
    Dec 28, 2013 8:01 PM in response to veda1

    Also, is there a way to start and stop Baïkal?

    Since it is hosted by the Apache web server, just start and stop the web server.

    In the Terminal use

    sudo apachectl stop

    sudo apachectl start

    You could likely automate this in an Automator Application.

  • by veda1,

    veda1 veda1 Dec 30, 2013 11:43 AM in response to Barney-15E
    Level 1 (0 points)
    Dec 30, 2013 11:43 AM in response to Barney-15E

    Thanks Barney for the tip. Unfortunately, I can't perform a sudo command while in Standard account mode. My desire to stop Baïkal was based on 2 concerns. Is there any possibility of being hacked by letting it running all the time? Does it use significant system resources (CPU, RAM, etc.) while on stand-by? Are these real issues?

     

    I learned a few more things to speed up syncing.

     

    In iPhone Calendar, click on Calendar at the bottom of the window and pull down the window to refresh all calendars. In iPhone Contacts, click on Groups and pull down the window to refresh all Contacts. This will sync the iPhone apps immediately.

     

    I was more tricky with Reminders. There were no obvious ways to refresh Reminder on the iPhone and the Mac. To sync on the iPhone, I had to wait 30 seconds before opening Reminders. To sync on the Mac, I had to re-open Reminders. I discovered that because they are related, Calendars and Reminders will both sync by refreshing Calendars, on the iPhone or on the Mac. I also discovered that by enabling the debug mode in Reminder, you get a refresh option. This doesn't seem to be documented so proceed at your own risk:

     

    To enable it, close Reminders then open a Terminal window and type the following:

     

    defaults write com.apple.reminders RemindersDebugMenu -boolean true

     

    To disable the debug menu, again quit Reminders, then open a Terminal window and type the following:

     

    defaults delete com.apple.reminders RemindersDebugMenu

     

    I discovered an error message in Calendar on the Mac (see pictures). Calendar seems to sync in spite of the error message. What does it mean? Should I be concerned with error message?

     

    1.png 2.png

     

     

    Thanks Barney for you instructions. It required quite some time to set-up and figure out but at the end, this server workaround is a nice option. However, USB sync is much simpler. Let's hope USB syncing will return in one way or another.

first Previous Page 7 of 10 last Next