Nextcloud-Outlook two-way calendar sync
The Rant (optional)
If you tried to set-up this kind of thing yourself, maybe you succeeded at once, or you almost gave up, like me, thinking how can there be no solution for something as basic as calendar sync. To save you the trouble I’ll just mention here that all those Outlook options and Outlook on Office365 options for sharing calendars just don’t work. You can get the share link, and you will add a calendar in Nextcloud, and it will look right for the moment. You will have all those appointments there, but there it ends. Tomorrow after you add something to your calendar in Outlook it will not sync. It will sync tomorrow – maybe, or never. I don’t know. Maybe I am just missing something so obvious to other people. Whoever invented calendars published on the internet probably did it for some completely different purpose than people using it to sync calendars. And forget reading about refresh frequency in Nextcloud or Outlook. You will probably end up messing up your Nextcloud installation or something else if you don’t really know what you are doing. Nice advice how to mess up is given here:
https://help.nextcloud.com/t/how-to-subscrib-to-an-outlook-office-365-calendar/79006/3
It is just a wild goose chase. Maybe a challenge for calendar enthusiasts out there. The link from the Nextcloud website that did help me is this one:
https://nextcloud.com/blog/nextcloud-offers-caldav-synchronizer-for-outlook-users/
The Setup
In this particular case I have Nextcloud 18 on my shared hosting and Outlook 2016 installed on a Win10 machine.
Nextcloud
Calendar should be there by default. If not go here:
then find the Calendar app. It looks like this:
The button here is Disable button because I have Calendar app already installed, but If you don’t, you will see Install button, click the button, and then click the Enable button.
Open your calendar app and then add two calendars. Let say you will name them “Private” and “Work” (mine is called Outlooksync, don’t pay any attention to this). This setup with two calendars will enable you to have private calendar inputs in one color and work-related inputs in another color after sync is set up. You can of course add more calendars. So, add all you want and change their colors from the three-dot calendar menu (see picture below). This is convenient because when you test your set-up, you will see right colors in right places, or not if you messed something up.
A word about CalDAV links you are going to use. If you have two calendars in your calendar app there are actually three CalDAV addresses (links) you can find in Nextcloud:
- Primary CalDAV address can be found at the bottom Settings & Import menu and it looks like this:
https://yourdomain.com/cloud/remote.php/dav
- Private calendar link from the Private calendar is at its three-dot menu and it looks like this:
https://yourdomain.com/cloud/remote.php/dav/calendars/your-username/Private/
- Private calendar link from the Work calendar is at its three-dot menu and it looks like this:
https://yourdomain.com/cloud/remote.php/dav/calendars/your-username/Work/
You can use all of them depending on how you want the synced calendars to look and perform, but I’ll come back to this a bit later.
Outlook
When you go to calendar part of Outlook the default calendar named “Calendar” is there, you can rename it to “Work”. Create another one, name it “Private” and change its color. At this point it is helpful to match colors of your Outlook calendars to your Nextcloud calendars. This way you can easily tell if correct calendars are in sync after you sync them.
Now everything is ready for the star of this show.
CalDAV Synchronizer
Two good people from Austria made this piece of nerve saving software. They are Gerhard Zehetbauer and Alexander Nimmervoll. The software is called CalDAV Synchronizer and can be found at https://caldavsynchronizer.org. There is also Github link there. The software is free.
At this point I would like to apologize to all of you who knew about this software and how Nextcloud calendars could be synced with Outlook calendars.
Visit the webpage. Download the version that is right for you. Install. If something is not clear use the documentation. Restart Outlook.
There is a new menu on the top of the Outlook window.
Click on Synchronization profiles. You will have to create two or more profiles; one for each calendar you want to sync.
At the top, give your profile a name. Choose Outlook folder where the calendar you are syncing is. For default Outlook calendar this folder is Calendar folder. DAV URL is Private calendar link you got from Nextcloud for Work calendar (we covered this at the end of Outlook setup). Username is your Nextcloud username. Password is either your Nextcloud login password, or if you have two factor authentication enabled, it is app password you have to generate at the bottom of Nextcloud Settings –> Personal –> Security menu. Fill in your Nextcloud email as well (I am not sure what this email is for, but I will check). Click on Test or discover settings. If everything is OK, you will get OK message. Click OK to close the window and then click Synchronize now to synchronize the two calendars you just connected. With this set-up it should work two ways; you can add calendar events in both Nextcloud and Outlook calendars, delete them and the changes will be synced.
Create some events in Nextcloud and Outlook to see if it works.
Create another profile for another pair of calendars you want synced and you are done!
I mentioned three CalDAV links available in Nextcloud. For this set-up you are going to use link 2 and 3 from the above list. Link number 1 can also be used. It behaves funny. Existing events in the past and future look like they belong to separate calendar in Outlook, but newly created events are synced. Apart from this, I haven’t tested more. Private calendar links serve the purpose. Good enough for me.
In part II of this post, I will explain how to put it all on Android phone and be able to sync them with your calendar app and create events that will be visible in Nextcloud and Outlook calendars. If you’d like to investigate yourself, install Nextcloud, DAVx5 and optionally Etar apps on your phone and go for it. Good luck!