Showing posts with label calendar. Show all posts
Showing posts with label calendar. Show all posts

September 3, 2014

Installing Baikal CalDAV calendar server on Raspberry Pi

In this post we will set up a lightly prepared Raspberry Pi to serve a calDAV calendar. We have previously looked at doing this on a Synology NAS, and overall, Baikal requires very similar steps taken to work on a different platform such as a Raspberry Pi.

There are a few things we will need right off the bat:

PHP5:
sudo apt-get install php5 php5-xmlrpc php5-curl
Apache2:
sudo apt-get install apache2 libapache2-mod-php5
Sqlite:
sudo apt-get install php5-sqlite

In the /var/www folder, download and extract the "flat" package from Baikal's website:

sudo wget http://baikal-server.com/get/baikal-flat-0.2.7.zip
sudo unzip baikal-flat-0.2.7.zip
sudo mv baikal-flat/ baikal/
sudo chown -R www-data:www-data baikal/
sudo chmod 755 baikal
cd baikal/
sudo chmod 755 Specific/
sudo chmod 755 Specific/db
sudo chmod 755 Specific/db/db.sqlite
sudo touch Specific/ENABLE_INSTALL

Once that's done, load up your Pi's IP address, http://192.168.0.xx/baikal/admin/install, and follow the Baikal install. Refer to this post from the Initialization Wizard steps onward if things get confusing.

April 3, 2014

CalDAV Calendar on Synology DSM5: Remote access to Baikal with iPhone/iPad

Previously we had set up Baikal to sync locally with our CalDAV client. This is a great, convenient way to edit your calendar while using your home computer. But what if we're on the road, and need to block in an upcoming meeting?

This required some changes on our Synology NAS' part, and involved adding a DDNS host and opening some ports to the interwebs for public access.

Now we can attempt to connect using an iPhone! This might vary depending on your version of iOS, but generally it is found at Settings -> Mail, Contacts, Calendars:


Add an "Other" type account:


Add a "CalDAV Account" (and keep in mind that CardDAV might come in handy one day as well... Baikal can also handle our contacts!):


Give your server's hostname here, including the Baikal username and password for the account to be connected to:


Make sure to specify port 80, and enter the following into Account URL, substituting for your own credentials. Note that the port does not need to be specified in the URL:
http://[your-ddns-server-hostname]/baikal/cal.php/principals/[baikal-username]


If you are using a third-party DNS host, see here for configuration.

We are done, and once hitting that button on your phone, it should verify the credentials, and if successful will show some blue checkmarks next to each input box. All that remains is to open your calendar app and enjoy the fruit of your labor!

April 2, 2014

CalDAV Calendar on Synology DSM5: Locally sync Baikal with Windows eM Client

In my previous post, we set up the Baikal calendar package and added some users and blank calendars. Now let's sync it with a CalDAV client over the local home network. In my case, I will be using eM Client on Windows 7.

I don't have Outlook, and am more interested in eM Client, which seems to be one of rather few alternative standalone mail/contacts/calendar clients for Windows. For purposes of simply viewing and editing a calendar, it is overkill given all of its features, but it is easy and convenient to set up and use while troubleshooting this setup. My eventual goal is to sync the calendar hosted on my Synology box with my cellphone.

Once eM Client is installed, go to Tools -> Accounts -> New Account. From here, go to the "Calendar" dropdown, and select "CalDAV":


Fill in your info as was set up during Baikal's installation. Note that the account address URL does not contain a port number, and that the user ID that should be used is not any existing DSM user, but instead a Baikal user that was set up during the package's installation:



If all went well, you should see... absolutely nothing!:



This is because we have yet to add any info to our blank calendars. I am planning to import my Google Calendar here, so let's go grab that real quick. Select from your desired Calendar, and go to its settings page:



Here export your calendar as ICAL format by conveniently clicking the green button (don't get to say that often, lol), and then right-clicking and "Save Link As..." in the pop-up:



It's probably not a bad idea to rename the default name from basic.ics to something more meaningful, especially if you have multiple calendars to export. This will help keep track when importing them via the now-connected eM Client to our NAS. Back in eM Client, go File -> Import, and select "Import events from iCalendar (.ics)":




Once the import is complete, you should now see your previously existing Google Calendar events here. Congratulations, you just severed the tie with Google, and now have a completely private calendar that you can access over your local network! In the next post, we will sync our private calendar with a mobile device, becoming fully self-reliant.

April 1, 2014

CalDAV Calendar on Synology DSM5: Installing Baikal app

I got tired of spoonfeeding Google my day-to-day routines through using their Calendar app. I'll put on my tinfoil hat here, but nobody really knows what our habits, places and events translate into for a data-mining operation, and I would rather enjoy freedom from being part of a statistic. A small step towards cutting the cord involved privatizing my personal calendar and reminders.

I had a lot of difficulty trying to get the built-in Synology CalDAV working, so instead I ended up looking at Baïkal instead. Baïkal is a third-party app that runs on Synology's DSM, and while at the time of this writing it has only been tested by the author on DSM4.3, I found it worked well for me running DSM5.0. Furthermore, it also abstracted itself from existing user accounts, which I found useful, because I likely would have made calendar-specific users anyways. Additionally, it actually uses SQLite or MySQL, which opens a whole new dimension of possibilities, including some convenient backing up methods.

First, download the Baïkal DSM installable .spk package.

Next, back in DSM, install MariaDB from the Synology Package Center if you haven't already - this will provide SQLite and MySQL support. Note that MySQL was replaced in DSM5.0 with MariaDB.

Another prerequisite is to enable Web Station on your NAS, so go to Control Panel -> Web Services and check the "Enable Web Station" checkbox.


Now we are ready to install the downloaded package manually in Package Center:


Follow the steps, and once installed, Baïkal should appear in the list of installed packages. It can now be launched from the Main Menu in the top-left of your DSM interface. You should be greeted with a page such as this below, located at the URL path of [servername]/baikal/admin/install. Note that the port is omitted. For security reasons, you have one hour to complete installation, else you must remove the Baikal package and re-install it.


I will just stick with SQLite for now, but if you want to set up MySQL, feel free to consult the online Baïkal manual. If all goes well, and the installation goes to completion, you should be welcomed with a fresh Dashboard:



 From here, you can add new users, and then calendars for those users:


In the next post we'll take a look at syncing with a CalDAV client and actually adding some stuff!