How To Do: WebDav, CardDav and CalDav work with my Synology?
-
Steffi -
March 14, 2017 at 7:15 PM -
25,267 Views -
0 Comments -
9 Minutes
Since the update from Synology for all NAS it is much easier to implement WebDav and HTTPS within your owncloud.
What is WebDav?
Web-based Distributed Authoring and Versioning - Thanks very much! and now?
In short: WebDav connects to a user as a hard drive would be directly connected to his/hers computer. It is also the core basis of CardDav and CaldDav protocol.
Why should I use WebDav ?
Well, there are Internet connections almost everywhere available today and WebDav has its advantage over other protocols as it uses HTTP and the port 80/8080. Almost no firewall will block this port in order to get into the Internet and most operating systems and mobile devices can handle WebDav.
That means, it does not matter from where you like to connect to your data as long as you got an Internet connection available.
Setup in Your Own Cloud (Synology)
It does not matter which setup you have got but the main components for a WebDav connection are:
- WebStation Here you will enter all important stuff like type of server ie. Apache, Nginx and your PHP version on your Synology. This is the core implementation to get a connection at all.
- If you like also to virtualise you can enter here all credentials needed.
- WebDav-Server
In this boxes your will need to chose from HTTP or HTTPS for the core module. - HTTP or HTTPS?
I have started with HTTP in order to see if everything works nicely. Once done, you can switch to HTTPS.
Be careful with the advanced options!<br><br>
In here you will enter all data for a connection from the Internet to your own cloud and how your server will answer to requests.
Anonymous WebDav is always a security hole!
The Ports for HTTP and HTTPS I have got my "own" ports and do not use the standard ports at all ie 80/443.
This is important for your port re-connections in the case you will use a router which will handle all requests from and to the Internet.
Why do I have to change the ports?
It is one of many security measures you can use to protect your own cloud. If you use QuickConnect or your IP/DNS your would also need the correct non-standard port in order to get access to your own cloud.
Please check and change the levels of access rights if and where applicable for your user and shared folders, so that they have access to WebDav in the system settings of your Synology NAS.
How do I know if works?
A test within your local network will show if all properties entered are correct and will connect your computer to your own cloud.
The easiest is: Go to Networks - and try to access your own cloud.
If it is working your will see all your data and you will be able to change, share them. After that you can change the settings to HTTPS if you like - that is more secure.
Do you have an own signed SSL certificate or use the "on board" certificate? Once you are trying to access your own cloud, your computer or browser or App will ask if you like to proceed. Just click Yes and you will be able to connect to your data.
Similar to above, try to use your browser and enter your URL i.e.
https://myserver:2222/folder.
You will be asked for security purposes if you like to continue - after that you should be able to login.
Have you installed the Synology Apps on your mobile device?
Then you can continue testing with the Apps. Just try the DS File App at first to see if it works.
If you having issues, try to use the local IP first and do not forget your assigned port i. e. 192.1.188.40:2222.
Does it work? Fantastic.and Congratulation!
Now, you got your computer and mobile Apps connects using WebDav! Let's proceed to the next step:
Use your IP/DNS or quick-connect name in these Apps and try if you can access your data.
Little Hint:
You will need to install on your Synology NAS the Apps as well before you can connect to them using your mobile devices for instant: FileStation, VideoStation, NoteStation, PhotoStation etc.
The access rights for folders and the installed Apps should be on read/write mode before you will try to sync your data. Just check again if all rights are granted on your folders too.
Now you will be able to:
- Access your data and can change them
- Enable you to write your notes using Synology note program
- See and download or play your videos and photos
- Able to backup your photos and videos from your mobile device to your own cloud
- Create new folders
- Share your data to everybody you would like
- Synchronise your data with your own cloud
The Calendar
Synology has the possibility to synchronise your calendar with your own cloud easily. The easiest method is to use the calendar item in your WebDav server.
CalDav you will need to activate and in the list of calendars your will name your sync calendar. Further you have to chose the location within your own cloud to save your data.
In almost every operating system you can now sync your calendar with your own cloud!
To connect your application to your own cloud use the URL like this:
http(s)://eigeneCloud/Kalendername.
Just enter your user credentials and you are done.
If you like you can install the calendar app as well - which will enable a web-based calendar too.
Contacts
Your contacts you can sync with CardDav Server from Synology quite easily:
Install the CardDav Server using the package centre - choose your HTTP or HTTPS ports
To synchronise your contacts with your own cloud, just use your IP and the calendar name like this:
http(s)://ownCloud/Calendar name.
Done and dusted!
For all your Synology user there will be address books available which are generated automatically. There is also a possibility to import your "old" address books into your own cloud.
Was not to hard was not it?
If you need help do not hesitate to contact me!
The Advantages are clear:
- fast setup
- not to bother about Linux or to "program" anything
- Synchronisation works!
4 Disadvantages which I see:
- Data security and protection
Your data will be saved on the shared folders and you would need to restrict this folder - Integration of data
Your data are saved in full text in a folder on your Synology NAS and will be synced from there - User Management
Do you like more accounts or invite friends and family members to join your calendars or contacts? You would need to setup new accounts in your own cloud with all or none rights. Which is more than cumbersome! - Security of your own cloud
User accounts and password for your calendar and contact are identical to your login into your Synology NAS! If somebody knows your password, they will be able to access not only your calendar and contacts but your Synology as well and could compromise it.
A better solution
Contacts and Calendars should be:
- Separated from your actual system
- User data to sync contacts and calendar should not be the same as your user data to access your own cloud.
- Data should be kept in a database
- User management of calendars and contacts should be separated from your actual system
The answer is a little program called Baikal for Synology
This little add-on will allow you to connect and synchronise using HTTPS and separates your data and accounts in a database directly located on your own cloud!
This program for Synology version 0.2.7 and an upgrade to 0.4.6 you will find at the end of my article to download.
A nice review and how-to-do for the upgrade you can find here.
How to install this software on my synology?
At first you will need to install the following software on your Synology:
- php Admin (Manager of database)
- Maria DB (database).
If these programs are not already installed, you will need to do this first using the package centre. The setup is easy using the install assistant.
Very important is not to forget the password for MariaDB!!
After the basis is set you can install Baikal:
Go to the package centre and then on settings
Choose install from "any developer" - you can reset this after Baikal is installed.
Go to manual installation and install the SPK-Package.
Once finished you will see a new icon for Baikal
Click on this to finish the installation process:
Make sure to tick the option for "Use MYSQL"!
After installation has finished just enter your credentials and login.
Using „User and resources“ you will be able to add your first user:
Enter all information and save them.
Users are the access data for to sync across your devices.
If a user has been created you can adjust their address book and calendar name if you like.
You will be able to add more accounts or add more calendars i.e. work and private - the same is available for contacts
All your data are save in your database and can be synced easily.
Setup of your programs and Apps
In order to sync your data your will need to enter the following URL:
Contacts:
https://OwnCloud:443/baikal/http://card.php/principals/User name
Calendars:
https://OwnCloud:443/baikal/http://cal.php/principals/User name
Then just enter the credentials for this user and sync!
I do not like... something in this setup!
And this is the port Baikal uses - 443 - a standard port for HTTPS!
You can change the port setting in you router to forward from another port to 443. The port forwarding looks then like this
From the Internet with Port 7754 to you own cloud on port 443.
Now you should be able to sync your:
- Contacts
- Calendars
- several accounts and/or users within the your network and outside.
A word to the implementation
Personally, I have used the following tips to get my WebDav, CardDav and CalDav running:
- Network Plan
Create a network plan with all locations, ports used and type of connections. It will be a valuable source for later. - Test at first in your local network with HTTP or the local IP address
- If successful, test with HTTPS in your local network
- If both are successful, use your IP/DNS and try HTTP at first and after that HTTPS
- Test only one connection before going further
i.e. first WebDav and then your Apps and then your mobile device and then per Internet - Get CardDav and CalDav in your local network running at first
If you use this method, you will be able to sort out issue as they occur. Further to this, check your firewall and allow the ports used by your own cloud.
There is not much difference in the Baikal version which I could see. The upgrade is difficult- therefore, for all beginners just just the SPK - Version to implement CardDav and WebDav!
You can use now your sync on all your devices which allow WebDav. Does not matter if Windows, Android or MAC, IOS.
Did you know that you can install your own messenger within your own cloud without any hassle?
I hope, I could give you an inside how you can connect using WebDav and to sync using CardDav and CalDav.
Do you have any questions - do not hesitate to contact me. I look forward to your comments!
Best regards,
Steffi
Comments
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.
Newly created comments need to be manually approved before publication, other users cannot see this comment until it has been approved.