Getting iOS 7 Calendar and Contacts Syncing Directly With OS X 10.9 Mavericks

OS X Mavericks was provided to Mac users free of charge. When I pushed the upgrade button, all I could think was…

If you’re not paying for something, you’re not the customer; you’re the product being sold.

Sure enough, many users of Mavericks and iPhones/iPads quickly discovered that the Info tab in their iTunes clients had disappeared, and now in order to sync their contact and calendar data between their computers and their phones they had to go the iCloud route. Those who hold corporate information, EU users, and even folks such as I that just loathe the idea of pushing such data onto a server we don’t control were out of luck. Well almost.

I am not suggesting Apple intends on selling any data you push to iCloud, but I am declaring the present state of affairs is certainly a pain in the rear for an enormous number of users fully invested in the Apple ecosystem. Nevertheless, the fact is this issue was a long time coming. Apple has been moving from SyncServices towards a more open set of tools slowly but surely. Now CalDAV and CardDAV rule the roost, and to sync you’ve got to have a networked server in between your devices.

But where to find a server? A big, scary server!?

Focus your gaze directly at your Mac desktop, and then repeat after me…

I am staring at a UNIX Server.

Three times please.

The solution I am providing isn’t particularly elegant, and it does require a little networking know-how, but if you are game you can find the details after the jump. EDITOR’S NOTE: It can’t be that bad, because this author got it all working in under two hours, first time through.

First, you are going to acquire the following:

1) A copy of ownCloud Server 5 software, which you can find here. ownCloud is one cool piece of software, especially because it’s free and open source.

2) The ownCloud desktop client for Mac OS X, which you can also get here. You don’t actually need this to sync calendar and contacts, but grab it anyway.

3) The ownCloud iOS app, which you can find via in the iTunes Store via this link. It’s 99 cents, and while not absolutely necessary here you should throw a bone to the folks that make the rest happen.

Got it all? Ok…let’s move on.

Setting Up the ownCloud Server

That Mac you called a UNIX repeatedly upon request contains Apache Webserver software, and in order to make it work with the ownCloud software you have to make a tweak to the Apache configuration file – it is /etc/apache2/httpd.conf. This can be done with superuser from the terminal using vim or emacs, or you can change the permissions on the file itself and the directories above from Finder info, then use a text editor, and return the permissions to read-only thereafter. However you go about it, the goal is removing the “#” from in front of LoadModule php5_module libexec/apache2/libphp5.so and saving the change.

Now, copy that ownCloud Server 5 software you grabbed during acquisition mode, #1, and paste it into the /Library/WebServer/Documents directory on your Mac. Then unzip it – you should now have a directory called “owncloud” there. Next, change the permissions on that directory so your username can Read & Write – you can do this via the Get Info window. Do the same for the /apps and /config directories underneath ../owncloud.

Now you start your Apache server – from a terminal window type sudo apachectl start.

Open a browser window, and type the following in the address bar: http://localhost/owncloud/ The installation process should start – you will be prompted to enter a username and password – I suggest using the same combination you use to log into your machine.

OwnCloud Server Setup

You should now be able to log into this spiffy new cloud server (that’s not in a cloud), where you will see a screen like this:

OwnCloud Server Interface

You can take a look around, but most everything should work fine “out-of-the-box”. So let’s chat quickly about IP addressing before moving on to configuring your desktop services and phone.

Syncing requires having a fixed IP address for your new cloud (that ain’t) server. I set my office router to hand out IPs based on MAC addresses of my devices – your results may vary based on the type of router you use, but I suggest this method because it is fairly easy and assures consistent results. You won’t be able to sync while in popular coffee shops, so if you drink a dozen frappu-whatevers a day syncing from home or office might actually save you some cash too.

Setting Up the Syncing with OS X Calendar and Contacts

All we are really doing here is setting up new accounts on your desktop Calendar and Contacts applications to sync with the “cloud server” you just built. To start, click the Apple icon in the upper left hand corner of your screen and select “System Preferences”. Then choose the “Internet Accounts” icon, and in the right hand account list scroll down and click “Add Other Account…”.

You should see a dialog that looks like this…

Internet Accounts on OS X Mavericks

Setting up Calendar syncing means choosing “Add a CalDAV account” and then hitting the “Create” button…

CalDAV account setup in OS X Mavericks

Select “Manual” from the Account Type dropdown, then enter the username and password you create in the previous steps in installing ownCloud server software. For the server box, you are going to enter http://localhost/owncloud/remote.php/caldav/principals/YOURUSERNAME/ where YOURUSERNAME is the username from ownCloud server setup. Hit Create again.

You can open Apple Calendar, and you should see a new “Default Calendar” in the sidebar. Any calendar entries you put under that account will sync with the server.

You follow the same process for Contacts…

CardDAV account setup in OS X Mavericks

Enter the username and password again, then type this in the server box: http://localhost/owncloud/remote.php/carddav/principals/YOURUSERNAME/. Same bat channel regarding YOURUSERNAME.

Within Apple Contacts you will now see a new contact list. You can copy existing contacts from “On My Mac” into the new .local list, and those contacts will subsequently sync with your server.

Now onto phone configuration…

Setting Up the Syncing with iOS Calendar and Contacts

iOS already has the capability to sync using CalDAV and CardDAV built in – the ownCloud app [you just bought because you are a thankful person] is used only for syncing files. From your phone, select the Settings app, then “Mail, Contacts, Calendars”. Hit “Add Account”, and then “Other” at the bottom of the list of selections. You’ll see the following screen…

iOS 7 Other Account Setup

First select “Add CalDAV Account” under Calendars, and enter the same username and password on the following screen…

iOS 7 CalDAV account setup

When it comes to the server, things get a little tricky. You are now going to enter http://DESKTOPIPADDRESS/owncloud/remote.php/caldav/principals/YOURUSERNAME/, where the DESKTOPIPADDRESS is the fixed IP address of your Mac we talked about earlier. I have not tried using name-based convention i.e. a computer name, but I’d be curious to hear other’s results while trying.

Now do the same for Contacts, by selecting Add CardDAV Account (in the screen shown two up), and then adding the information in this screen…

iOS 7 CardDAV account setup

Same CalDAV IP addressing goes for CardDAV – you enter server information like so: http://DESKTOPIPADDRESS/owncloud/remote.php/carddav/principals/YOURUSERNAME/.

You’ll have new Calendar and Contacts accounts on your iDevice just like you do on your Mavericks powered Mac. It may seem inconvenient at first, but I actually like the separation for one simple reason: you can delete the accounts at anytime, and chances are you will want to as either Apple or some third party software provider will eventually create a less arduous fix for desktop syncing. Just make sure to pull your CalDAV and CardDAV items back over to “On Your Mac” before you do.

Nevertheless, your Mavericks-powered desktop or laptop and your iOS-powered phone or tablet are now in sync, and without you even having to push another button to make it so.

MG signing off (because where there’s a will there’s a way, and ownCloud made it easier than waiting around for capitulation)

Comments

  1. Martin says

    Why not simply use the Mac OS X server software. It is cheap, provides the services you want and it is supported by apple. You can run it on a Mac mini server for example.

  2. Pakis says

    I suppose, with a little more work, I could set up the ownCloud server on a beige machine on my home LAN running Ubuntu and have the syncing run across my Mavericks Mac and that machine. Right? I wouldn’t want my old iMac to carry the extra burden — life is already testing enough or it…

    • says

      That will definitely work. This tutorial was just for those that don’t have another box around.

      Plus keep similar configurations for IP at office and home and you could potentially sync with the above described configuration from both.

      • Pakis says

        You mean sync in two separate physical locations, using exactly the same IP config, and have the iPhone or ipad act as the middle-man between the two distant servers, right?

        Alternatively, one could, I suppose, leave the box on at home and a door open and sync on the go — your own iCloud sort of thing, right? Good idea for a how-to perhaps…

        • says

          Not exactly. As long as your OS X Mavericks “desktop” (in my case an MacBook Pro) has the same IP at the office as it does at home (via DHCP reservation via MAC address) then the iDevice should sync from both locations with that machine.

          I have not tried using name conventions in the iDevice/DAV setup, sticking to straight IP instead, and probably a good thing as it could be a security risk.

  3. Pakis says

    Forgot to mention… This is a great solution, Michael, ever so grateful. Btw, I’m planning to do this in order to be able to sync contacts on / from my dinosaurian iPhone 3G. Maybe, I should invest some $$$ in hardware after all… :-)

  4. Bryn says

    Hi Michael

    Firstly thanks for the info and methodology (and excellent writing style !).

    Now I do like the idea that Pakis proposed as I have a local network using a Qnap server. What I don’t have is the knowledge to set this up. So with your permission I would like to link your article with the Qnap forum under a suitable heading to get some specific help. Please advise.

    Sadly Apple Inc uses a “one size fits all” policy as they do with many things – I like choice and privacy in this case.

    Cheers Bryn

  5. Ste says

    Michael,

    Thank you, this is a great solution. I got the calendars between my phone and my MacBook Pro(running Mavericks) to sync, but I ran into some issues.

    I followed precisely the steps in the first part of the set up “Setting Up the ownCloud Server” , but when I opened “http://localhost/owncloud/” from a web browser I got an error message that the “owncloud/data” folder cannot be created because of file permissions. The error message was followed by a suggestion to give write permissions on the root folder to the web server.

    I wasn’t sure what “root folder” is (maybe the “owncloud” folder?), but after some research on the internet, I found that the web server on the Mac is somehow ran by the “_www” user, which is in the “_www” group. So, I recursively changed the group (chgrp – R …) of “owncloud” to be “_www”.

    Then, I was able to get to the set up screen of owncloud by going to “http://localhost/owncloud/” , but I got a warning that the data folder might be accessible to everyone on the internet because of problems with the “.htaccess” file.

    Any idea what might be happening? As I mentioned, the calendar syncing between my phone and my MacBook Pro is working, but I am a little worried that there might be some security breaches…

    • says

      The root folder would have been /Library/WebServer/Documents. I just made “everyone” read/write because I run local-only firewall rules against it. That said, yes, it might be a security issue, but I just ignored it myself.

      Nevertheless, check the owncloud documentation – they probably have the lines of code you need in an htaccess file under that directory, which should solve the problem.

      • Ste says

        The .htaccess file under “owncloud/data” is correct as automatically created. The issue seems to be that by default the apache web server in Mac OS does not allow overriding via .htaccess files. Changing “AllowOverride None” to “AllowOverride All” in the “/etc/apache2/httpd.conf” file fixed the issue with the contents of the “owncloud/data” folder being publicly available.

        I am not very familiar with web server set-up, so I hope I did not create other security problems by changing the AllowOverride directive in the httpd.conf file … :)

  6. says

    Hi Michael, Thanks for all the great info. While I’ve been using Macs for over 20 years I haven’t done much ‘tweaking’ so to speak. I’m stumped on how to go about making the changes to the Apache configuration file. Is there somewhere I can look to find detailed instructions on how to locate and change the file? I think once I’ve managed that portion I should be able to get the rest done (I hope).

    Thanks again.

    Sarge

    • says

      No worries. The Apache configuration file is contained in /etc/apache2/ Use Finder and Go/Go To Folder to get yourself there, and note you will have to change permissions on the file and folders above to modify httpd.conf (and then make sure you change said permissions back).

      However, if you are not comfortable with a text editor and a terminal window, I would highly recommend finding a friend who is to lend a helping hand. That said, you can’t really break much while messing with the web server on your Mac, other than the web server itself. I suggest making a copy of the file you are about to touch, just in case you need to revert back.

      Hope that helps.

  7. Andrew says

    Hi Michael,
    Thanks for these instructions. I too care about privacy and due to the recent changes I’m thinking of dumping my iPhone.
    I followed your instructions, but I’ve gotten stuck at the installation process. When I type http://localhost/owncloud/ into a browser window, I get a text screen with info about owncloud. At the bottom it says:
    $RUNTIME_NOAPPS = true; //no apps, yet
    require_once ‘lib/base.php';
    OC::handleRequest();

    What do you suggest?

  8. Andrew says

    Hi Michael,
    Just following up on the previous comment. I restarted my computer and cleared my cache and then I could proceed.
    Thanks again

  9. Robert says

    I tried to use ownCloud 6 with your instructions. Didn’t work – could not get the CARDDAV (didn’t try CalDAV) account to work. Error said could not verify Uname or PWord – I thought it was a permissions problem, but I only know enough to really get into trouble so after poking at it for a while I Downgraded to version 5.0.13 and BINGO!! Works PERFECTLY!!

    Michael, Thanks for a great How article!!

  10. DavidC says

    Thank you for posting this very readable information.

    I found your article when looking for information on how to sync my contacts and calendar with MS Outlook. I am an iCloud user with iPhone, iPad and MPB w/Mavericks, but also prefer to use MS Outlook E-mail for Mac in my professional life.

    As you noted, the syncing of contacts and calendars disappeared in theses recent updates, so now I can’t sync my iCloud contacts and iCal with Outlook. Would your recommended use of ownCloud allow me to bridge the sync gap between iCloud and Outlook?

    • says

      The ownCloud method outlined here is for folks who specifically don’t want to sync with iCloud. Direct syncing disappeared, not iCloud syncing, and if you are now having a problem with that you have an issue that this tutorial is not intended to address.

  11. joolz says

    Many thanks for the very useful guide Michael – a valuable alternative to otherwise compulsory iCloud.

    Installation of OwnCloud 6 went OK and it’s all set up on my iMac (Mavericks). But there are bugs:

    – While I successfully transfered all calendar items to OwnCloud, Calendar is now giving me the alert message “The server responded with an error. The request (CalDAVAccountRefreshQueueableOperation) for account “Http://Localhost/Owncloud/Remote” failed”. That might (or might not) be linked to warnings in the admin page which state “Security Warning Your data directory and your files are probably accessible from the internet. The .htaccess file is not working.”

    – It might just be coincidence that when viewing localhost/owncloud/ in Safari – the first load always returns the php code. Refresh renders the page properly.

    – The main frustration is that I can’t for the life of me connect from my iphone (iOS7). I’ve set up a fixed IP on my router but entering http://192.x.x.x/owncloud/remote.php/caldav/principals/USERNAME/ just produces an alert “CalDAV account verification failed” The OwnCloud documentation suggests setting the port to 80 but that doesn’t sort the problem.

    Switching Firewall off in OSX preferences sorts out the IP access and the alert in Calendar but that’s not something I want to leave switched off. Any ideas very gratefully received.

    Happy new year!

    • says

      Happy new year to you too.

      The PHP issue is probably due to a low memory setting in php.ini. You probably know how to adjust that. As for the rest, it all looks like connection issues related to firewall. Open System Preferences/Firewall and click options. Is the firewall blocking WebDAV connections from there? What else is showing as blocked?

  12. joolz says

    Yay – that seemed to do it. Firewall was blocking incoming connections to httpd. Now that’s set to allow incoming connections everything is working well. Haven’t yet changed PHP memory but given that everything else is working I’m not too worried about that. Many thanks Michael!

  13. Edward says

    Michael, excellent article. One quick question however.

    I want to be able to use this for the entire family instead of just me. What do I need to do differently to accomplish that?

    First, there’s the whole permissions issue on the Apache owncloud directory & below. Then there’s the issue with creating multiple accounts.

    I assume that, since the web service is running as my account on the iMac, that setting the permissions on the root location to allow my account write access is all that is required. But that still leaves this quote from your article:

    For the server box, you are going to enter http://localhost/owncloud/remote.php/caldav/principals/YOURUSERNAME/ where YOURUSERNAME is the username from ownCloud server setup.

    Can each user just substitute their Mac’s user id for YOURUSERNAME?
    Does each user need to have an account on the iMac? I’m planning on creating non-admin accounts anyway so that they can connect to the iMac and mount their own shared volume for TimeMachine backups. Obviously, I can’t test this yet since I’ve yet to purchase my iMac for family use.

    • says

      Edward,

      If the owncloud is sitting in the root of the webserver, and the firewall is not blocking incoming httpd, you should be able to set up accounts on owncloud for each of your users and it should work just fine. The YOURUSERNAME equates to the user account on owncloud, not that for the Mac itself. I just used the machine username for both to avoid confusion, since most people viewing this tutorial are very likely not on shared machines.

      Note that there was a more secure alternative to the webserver setup, to spawn virtual instances for each web user under their accounts (i.e. personal web servers), but that certainly wouldn’t have worked for you unless each one of your users was logged in while they were syncing.

      I suggest proceeding as you planned. Further, I certainly think it would be helpful to other readers of this tutorial if you could post your results – that would be much appreciated.

      Best,

      Michael

      • Edward says

        By reading the ownCloud documentation, I’ve discovered a couple of things.

        1) The owner of the web server must own the apps/, data/ and config/ directories. The web service runs as user 70 or _www. You can use this command at the terminal to change the permissions:
        cd ; /Library/WebServer/Documents/owncloud/install; sudo chown -R _www:_www ./apps ./data ./config

        I’m not sure if this step is *necessary*, but it does make your system more secure. See the manual install page of the owncloud Admin documentation. http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html

        2) When you first visit http:// or http:///owncloud and run the install wizard, you will create the first user, YOURUSERNAME, as Michael suggested. Then, you can add additional users who can then have their own owncloud account with which to sync to. See http://doc.owncloud.org/server/6.0/admin_manual/configuration/configuration_users.html for further details.

        3) Due to an issue with Mac OS Unicode support, installing ownCloud Server 6.0 on Mac OS is currently not supported. Neither is version 5.x

        Until this is resolved, I’ll be spending the $20 and buying OS X Server, but it’s really nice knowing there is a free alternative.

        Michael, thanks again for a great write-up.

          • Edward says

            See owncloud.org’s documentation. In the Admin manual, under Installation, for Mac OS X, it says what I posted. It has a link to this bug ID.

            https://github.com/owncloud/core/issues/2377

            Basically boils down to this: If you use characters that have ‘Umlaut’ (does that mean accented?) then it doesn’t work. Something to do with NFC vs. NFD, whatever they are.

  14. James Richards says

    Thanks for this great article. When I tried setting up an ownCloud server to achieve this there were issues with ownCloud and OS X which the ownCloud folks seem to have resolved. (I achieved the same result using Baïkal server, but setting it up was definitely a more techie process than this.)

    I have used name-based addressing which works well, and means that syncing can be performed over other networks. I don’t think it is an additional security risk. The only problem is that occasionally a router may change your computer’s name on the network in which case you need to change it back again for syncing to work. You can find the computer’s network name by going to Settings>>Sharing and it is displayed in the sharing pane.

    Whichever method of addressing you use you *can* sync away from home by using the ‘Create Network…’ option from your computer’s WiFi menu to create an as hoc network joining your computer and iPhone.

  15. RJ says

    I am reluctant to go to iCould because I really do not want to sync. I want to push only from my iMac to my iDevices. I do not want changes or accidental deletes on my iDevices to “infect” my iMac. Can I do this with your solution. With iTunes/Snow Leopard there was the Replace option on the tab that controlled synciing.

    • says

      Not exactly sure what you mean about “infect” or the “replace option” – this solution is for syncing between your iMac and your iPhone/iPad, without the use of iCloud. FYI: it does require some decent technical know-how.

  16. says

    Thanks for sharing this info. I’ve been using busymac on (snow)leopard for a few years (some macs, iphones, ipads around) which was a good solution. even without the automatic synch of the iphone/pads. considered converting the mini to a server but never got around to get it done. Now one machine has maverick and that woke me up. So I’ll try your solution. Must look into the address part of it. Would be nice to be able to control a bit better what is and is not synched over all devices.

  17. says

    Michael,

    I’ll echo all those who praised the usefulness and clarity of this article. Yes, Mavericks is free and I got commoditized. Or monetized. My wrath toward Apple is offset by my gratitude toward you.

    I have no doubt I can do the setup as described. My question for you and those reading here is whether multiple users can sync over a LAN using the server I’ll set up. You see, my wife and I maintain our individual calendars, our mutual calendar, and our son’s schedule of school holidays, team practice, etc. over the LAN. With BusyCal and OS 10.8, life was manageable. Now we’re back to pencils and weekly “calendar sync” meetings. Thanks a lot Apple, and no I will NOT push this very personal info onto Apple’s servers.

    So can we sync two or three macs and three iOS devices to the same calendar server? Will we need to do anything more than setup accounts on each device to login to the ownCloud server?

    TIA to anyone who can enlighten me here, and thanks again to Michael. Great Stuff!

    • says

      Marc, I am in the same situation. Busycal answered to the simple need for various calendars to be viewed centrally and decentrally. Busycal bascially takes the ical information, presents in a somewhat different way and – most importantly – communicates directly with other devices’ calendar applications. It’s the direct part that I like: something windows 3.11 did a million years ago when internet was something on the other side of a 1200baud modem. In fact: other than out of home, there’s no point whatsoever to have two computers in the same house talk to each other via the other side of the world. Let alone what they talk about, it’s just plain ridiculous to need all that infrastructure.

      So I upgraded to maverthing for a stupid reason: I thought i needed some app that did not work on my snow leopard install. thankfully I only ‘up’graded one machine in the house so i still have a possibility to ‘de’grade back to snow leopard. (probably will but for now I’m interested in this Owncloud idea as it answers an old wish to sync favorites, contacts and mails over the network in the house)

      Owncloud installation on snow leopard is do-able. Requires a bit more fiddling with some files than mentioned above (Owncloud install script will point out that magic quotes is on and .htaccess is not working but all that is easily fixed by info found on the internet)
      Then I made a thought-mistake: I created a user for every device and then wondered why they don’t all see eachothers calendars. Has to do with the groups or something (of course I did not read the manual first, that’s for mac users I used to be a windows user ;))

      Some things that you’ll encounter:
      – the addresses to be used on every device to connect are a bit awkward/long/hard to remember/type an retype. Sometimes you’ll think you entered it right but it won’t work. do it again and it works.
      – mind that the central machine/server should not shut down/sleep. ‘wake on lan activity’ is not waking it up.
      – yesterday it all seemed sloooowww but that may be because I was learning and configuring and trying and doing a bunch of other things at the same time. Updating simply is not real-time, there’s no need to but when installing you do want to know if it works immediately. ;)
      – the web-interface is not very explanatory, that’ll be in the manual perhaps. Task for today ;)
      – I fear a transition with carry over of the current ical/busical calendars. Hopefully an export/import action will do. otherwise: start from scratch
      – address book over carddav didn’t work very well yesterday. Seems to do with the sync frequency.

      all in all, Owncloud is overkill for the simple function we want to have. It does offer more and among that there may be some things that may become more attractive in time. Like connecting to home from somewhere on the internet only while on the road instead of the other way round as is now the icloud concept.

      What I’d like to see is a simplyfied owncloud for i-things app (functions in owncloud are apps that can be chosen to be used or not). that should include the variables in a single screen; devices, functions and who shares what with who.

      For the difficult addresses part: I’m sure this can be easily fixed by entering some smart line in the servers’ access file that works like a shortcut: device from local network asks for ‘calshare’ and it connects to long long link with a path. Don’t know how, won’t invest the time to figure it out now.

      time to get on with it, see if I can get it right this time. Shall I start with the manual?

      nah, too easy :D

    • says

      Marc,

      What Frank said.

      Thanks to you, and Frank.

      UPDATE: Got to thinking … with all the hardware you have deployed, it may just make sense to get OS X Server. I created the tutorial for those that didn’t want to spend the $20, and/or work with more than one machine and device (albeit it should work fine with more). Note I will be testing it soon, as an alternative for those that don’t want to mess with Apache, so stay tuned.

  18. Frank says

    True, osx server was back then a costly choice so was happy to find busycal and an imap mail host. Busycal used to sync locally and to google. But relies on sync services so not without the cloud for maverthing.

    Install till now is going well. Bit of thing to find how to share a calendar (log into the webinterface, cogwheel icon, then the three connected dots next tot he calendar name) and that was done. Except The desktop has no permission to add or edit an item made on the ipad even though these are shared for all functions (edit, change, add etc)

    Fiddling with apache and such can be a risk when you start to connect over the internet so a how to might be popular.

    I’ll consider giving the osx server route another thought. Seemed overkill back then for calendar and contacts only but the local network is growing so might be worth the effort now. If the mac mini will be able to run it…

  19. GHM says

    My privacy is important to me and I really DO NOT want to sync with iCloud. However, I agree that it is very unlikely that apple would go back to direct sync via wifi or USB. I therefore really hope to be able to set up “my own server” as described above. Although I am not very experienced with these things, I did step by step exactly as described. The terminal command to start Apache prompted a password request. I used my system password and it seems to work (if I try the command again, it tells me that Apache is already loaded). However, the next step would be to start the owncloud server installation via web browser, but typing in the address http://localhost/owncloud/ is only causing the following error message:

    Not Found. The requested URL /owncloud/ was not found on this server. Apache/2.2.24 (Unix) DAV/2 PHP/5.3.26 with Suhosin-Patch Server at localhost Port 80

    Am I doing something wrong? Why is the installation not starting as described? Thanks for any help!

    • says

      Have you unzipped the ownCloud files, and are they sitting just below /Library/WebServer/Documents/ in the /owncloud/ directory? Might need to check PHP too – you can do this by creating a file called phpinfo.php that contains the following contents:

      phpinfo();

      … with “< ?php" above it and "?>” below it (neither with the quotes).

      Then point the browser to localhost/phpinfo.php and see if said info page loads properly.

      • GHM says

        Thanks for the quick reply! I really appreciate it that you guys are taking the time to help a greenhorn like me with this!
        Michael, yes, owncloud is unzipped and shows as a subfolder in the WebServer/Documents folder. I did as you said and created phpinfo.php and put it also in that Documents folder (or does it need to go somewhere else?). Localhost/phpinfo.php now shows “” instead of the error message. I guess that’s what we wanted, right? Localhost/owncloud/ is now not directing to that system error message as before, but it gives me a new error message (from owncloud this time, on blue background with their logo). It reads:

        Magic Quotes is enabled. ownCloud requires that it is disabled to work properly.
        Magic Quotes is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.
        PHP modules have been installed, but they are still listed as missing?
        Please ask your server administrator to restart the web server.

        As I am trying to set up my own server with this, I assume that I am that server administrator that needs to disable Magic Quotes. However, I don’t know what php.ini file they are talking about and what I’ll have to change in there… I don’t want to mess up my system by just randomly trying… Anyone can help?

        • GHM says

          Oh, I start to understand why you didn’t write out that code… It just got excluded in my message above. When typing localhost/phpinfo.php I get:

          “” and in the middle where I put the dots is “phpinfo();”
          (see if it works this time!)

          • says

            You can put the phpinfo file in Documents and then just point to localhost/testphp.php. If you don’t get the php info page – you’ll know it when you see it – then PHP might not be enabled. You’ll need to do that in httpd.conf, which is under /private/etc/apache2/. Get rid of the “#” in front of LoadModule php5_module libexec/apache2/libphp5.so in that file and restart Apache.

          • GHM says

            @ Michael: This was one of the previous steps in your tutorial above, so I have already done it (and I just double checked – the # is gone). I can follow instructions, but I don’t really know what I’m doing ;-) Meaning: I just learned now that this was what should have enabled PHP… But obviously it is not enabled if you say I should see an info page (all I see is the command line on white background – thought that was an improvement to the error message…). What am I doing wrong?

        • Frank says

          This has to do with the php.ini file not being present yet and the .htaccess file not being in place yet.

          A bare install of apache does have the php.ini.install (or .default or similar, must look it up) and that is to be copied and edited.

          Same goes for .htaccess I did something with that following a howto and got it to work but forgot (I’m a bad howto writer, I solve something a forget about it :))

          Meanwhile I played with osx server and that is much simpler to set up. Of course some quirks too like not telling you how to get ical to use a local server name for caldav but that is small beer compared to apache, php and such.

          Lots of troubles in the reviews though so might run in to something later on.

          • says

            @Frank – I have Server set up too, just for the sake of helping those who can’t get the ownCloud route running. Will have a tutorial up for it in a few days time.

            @GHM – Frank is correct; I took for granted that php.ini would be in place. You have to copy/paste the php.ini.install file to php.ini then restart Apache.

          • GHM says

            So where do I find php.ini.install and where would I copy it to? All I can find is apache2/other/php5.conf

          • says

            OS X Server is up and running. Has some users and is connected. So far so good.

            Things that one runs into are easily found on the net.

            What is less obvious and may be a good thing for you to think/write about – as you’re in the same configuration – is the at home usage that avoids unnecessary internet use.

            For example: family members have their own calendar, contacts and if you like some more things such as file space, favorites and so on. Easy enough: create users, connect their device(s) and done.

            In comes the family situation: a calendar that includes everyone elses calendar. say a global…..glocal… calendar. And of course in due time: a glocal todo list with todo owners shown.

            I guess I’ll make a user named ‘glocal’ and have a centrally located computer show that calendar. Where the other users share theirs with. (allowing for individual items not to be shared)
            Or have that calendar show everyones calendar (connect each via caldav to the server) as we have now with busycal. Thing is: it’s quite easy to screw up someone else’s items. Haven’t thought of a workable way to reduce that risk (without having to enter everyones password if a calendar item is to be changed on the central computer)
            This allows more overall-users type calendars: holidays, school schedules, other caldav services (weather info)

            In the end I’d like to have a single screen on the wall showing the current week/month and everyone’s items. And everyone uses his/her own device to change his/her own calendar AND/OR the central computer (which also acts as media center and will have to be the mac os x server machine.) to do that.

            And when one of us is away, then and only then is a connection to the outside world opened to the server. That allows for a considered decision to run a risk or not.

            @GHM: use the ‘go’ at the top in finder and go to:
            /private/etc/ where apache also lives. there you’ll find php.ini.default
            open that and save it as php.ini in the same location. Edit at will.

  20. says

    Thanks to Michael and Frank for replying SO fast. And especially Frank for taking time to include all that detail. I’ll absorb more fully Tues or Weds as I do the install.

    Meanwhile, to GHM, I believe the contents of the phpinfo.php file should be:

    I think you need the “echo” to get the results of phpinfo() printed on your screen.

    Thanks, all.
    Marc

  21. says

    Oh lord

    It’s

    /Library

    NOT

    ~/Library

    (I just spent 4 hours trying to get PHP to “work” and I’d put OwnCloud in my USER library). I am an idiot – but if by posting this I prevent someone else doing the same, it will perhaps have been worth it.

    Smacks head with palm of hand. Repeatedly.

  22. plgx says

    Cool. Way to go.
    However, if all you want is to migrate your Mac contacts to your iOS device in a real rush, you might rather just “Export” (from the File menu) your contacts (or a selection) to your desktop as a vCard and email it to yourself. Open it in your iPhone (it might work with other iOS devices as well) and tap on it. iOS 7 will ask you if you want to import the card to your iPhone contacts. Accept, and you’re done. There doesn’t seem an easy way to bulk migrate your iPhone contacts back to your Mac, though. Methods similar to this might work from other operating systems or applications.

  23. jeff says

    Hi Michael – thanks for this great work around. I’m not particularly code-savvy, but got it working for my calendars just fine. Given that I’ve created a new Calendar for the locally synced events, my follow up question is this: is there a way to sync Calendar events in the past (ie those already on my iPhone, now not backed up on my iMac or iPad), without manually going into each one and changing their Calendar type?

    Thanks!

    • says

      Unfortunately, Jeff, I believe the manual method is the only way to go. That said, those old calendar entries are still safe on your machine, and probably don’t need to be synced with your phone anyway.

      • Jeff Seelbach says

        Actually, my iPhone is my primary device for making entries, so I’m trying to get a complete backup from the iPhone to the desktop (and then to iPad, ideally). So right now everything is only on the iPhone. I think I can use the local server syncing for calendar events and contacts going forwrad, and just do a manual backup/export of the information on the iPhone and restore that info to the other devices. Not too elegant, but I think it’ll get all the information together.

  24. Christine GCH says

    This is where I am stuck:

    Setting Up the ownCloud Server

    That Mac you called a UNIX repeatedly upon request contains Apache Webserver software, and in order to make it work with the ownCloud software you have to make a tweak to the Apache configuration file – it is /etc/apache2/httpd.conf. This can be done with superuser from the terminal using vim or emacs, or you can change the permissions on the file itself and the directories above from Finder info, then use a text editor, and return the permissions to read-only thereafter. However you go about it, the goal is removing the “#” from in front of LoadModule php5_module libexec/apache2/libphp5.so and saving the change.

    I am in Macintoch HD>Library>Server>Web>Config>apache2

    Is this the right place to be looking for /etc/apache2/httpd.conf?

    • says

      It is right in that directory. You will need to change permissions on the file and the directory above in order to edit. It’s a text file, so you can use XCode or Emacs for removing the # and get PHP running.

  25. Nadine says

    I couldn’t get the owncloud web page to work until I remembered I’d disabled cookies on my web browser. I enabled them for localhost and now the owncloud web page seems to be working just fine!

  26. Steve says

    Looks great Michael but I’m not quite there..

    My http directory is not at /Library/WebServer
    ..it’s at ~/Sites
    (set in httpd.conf)

    If I install owncloud in ~/Sites/owncloud then whatever I do I run into file permission problems.

    Everything runs fine in Library/WebServer/Documents but it’s inconvenient having to edit https.conf every time I want to use owncloud.

    Any idea how to use owncloud in ~/Sites?

    Many thanks,

    Steve

    PS – I did some research but my left eye got hit by a tennis ball and I can’t spend too much time in front of a screen (excuses!).

      • Steve says

        Hmm.. let me put it another way..

        When I set my home directory in https.conf to:
        DocumentRoot “/Library/WebServer/Documents”
        ..and store my owncloud folder in that location, then it works.

        But I don’t want owncloud in that location, I want it here:
        DocumentRoot “/home/Sites/Documents”
        ..but when I put owncloud there it doesn’t work.

        So if I want to use owncloud I have to move it, edit https.conf, and restart apache.

  27. Igor says

    Thanks for your howto! Got it running and syncing my contacts in one way, from Mac to phone, but if i add a new contact on my phone it never gets synced to the owncloud/mac.
    So i think my problem is this sentence:

    Just make sure to pull your CalDAV and CardDAV items back over to “On Your Mac” before you do.

    What exactly do you mean with this? What do i have to do? I’m not that good understanding this… English is not my native language.
    Thanks for your help!
    Igor

    • says

      Igor,

      That isn’t actually the problem – only applies if you decide to can the Owncloud workaround later.

      The problem is that when you are entering the calendar or contacts items, you are actually putting them “On Your Phone” (so to speak), instead of in the CalDAV or CardDAV account your phone accesses via the sync.

      When you enter a new calendar item from the phone, click it, then where it says “Calendar” touch and then select the CalDAV account instead of “Main” (or whatever your phone’s calendar is named). A little trickier for contacts -> when in the phone’s contacts, click Groups, then de-select the account that says on phone (or, if you had previous synced to your Mac via iTunes, it might say “FROM MY MAC”. From then on, when you enter a new contact it will get entered into the CardDAV account and should sync with your computer’s Owncloud account.

      Hope that helps.

  28. says

    I wasn’t able to get this up and running (somehow couldn’t work out a permissions issue), but in the meantime Syncmate came up with a free beta version that works just fine with Mavericks, and I understand that due to the popular outcry, local sync will be back in the OS itself with the next update. For reference.

Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>