This is a basic tutorial on how to setup your Android phone to sync with your selfhosted Nextcloud instance just by using 100% free and open source reliable software.
Technologies used
- Nextcloud file sync is based on WebDAV.
- Regarding Calendars and Tasks, we have CalDAV
- For Contacts, we have CardDAV
Nextcloud is based on the combination of SabreDAV to support these technologies at the server backend, combined with a javascript WebDAV/CalDAV/CardDAV frontend for the web interface.
The Nextcloud desktop synchronization client also talks WebDAV with the server, whereas we usually resort to something like Thunderbird to sync calendars and tasks.
When it comes to Android, it is the Nextcloud sync client that talks WebDAV with the server, whereas DAVdroid talks CalDAV and CardDAV for tasks, contacts and calendars.
Basic procedure
Install F-Droid
First of all, if you haven’t yet, install F-Droid. This is a great app store that only contains FOSS software ( Free and Open Source ).
In order to install this or any other app that doesn’t come from the Google Play store, you first need to allow Unknown Sources in the Security section of your phone settings.
Then, download F-Droid and ejecute the download to install it.
You will find all required apps here
Install DAVdroid
From F-Droid, install DAVdroid. Don’t open it yet.
Install Nextcloud
Next, install the Nextcloud sync client app
Configure Nextcloud
Enter your server address and credentials
Configure DAVdroid from Nextcloud
In settings, look for the option to Sync calendar & contacts.
This will autofill the weird URL that we need to type otherwise. Enter your credentials again.
Finally, open DAVdroid and select which calendars, tasks and contacts you want to sync with the phone.
Install OpenTasks
DAVdroid will suggest that you install OpenTasks.
You can install it from F-Droid at any moment, but make sure you install it after you have connected DAVdroid to your cloud.
Your tasks will automatically appear as available in OpenTasks. I recommend that you use the widget 😉
Install Etar (optional)
In my case, I wasn’t very fond of the default Calendar that comes with LineageOS, so I recommend Etar, which is available in F-Droid.
It is light, clear and simple. In any case, your Nextcloud calendars should now show in your Calendar app.
What’s next?
We probably will install other Nextcloud Apps in our server, such as Nextcloud News, Notes, or Bookmarks. There are open source apps for all those on F-Droid.
Install Nextcloud News
Install Nextcloud Notes
Install Nextcloud Bookmarks
There we have it! We can now enjoy all of our self hosted Nextcloud instance in our phone.
thanks forsharing, have a great lizard year
have a nice year!
Thank you so much nachoparker for Nextcloudpi its brilliant today I set up davdroid and its working perfectly. Your tutorials are perfect for everyone keep up the Good work. I’ll definitely donate
great! thanks for your words!
I also want to thank the devs of Nextcloud and DAVdroid… I was fortunate to meet them at the conference and be able to thank them personally
I want to share my NC setup:
For simple notes:
I use calDAV / cardDAV app for synchronisation and make calenders for subgroups of my tasks, eg
– shopping general
– shopping hardware store, IKEA, …
– link collection hobby
– to do work
– to do private
– things to do when with my parents
– a general notes list
… (I have about 15 task lists)
Then I go to the Nextcloud database (use phpmyadmin), table oc_calendars, column components, here I remove “VEVENT,” so that only VTODO is left (this prevents the calendar from showing as a calendar, it’s only a task list then).
Either in caldav app or in the database (column calendarcolor) I set the color.
The reason for sync notes this way
I can use the widget from opentask app to put my list on the homescreen. Since I have different colours for the calenders I can immediately see where a task / note belongs to, the most recent is on top of the list.
If I need to see only certain subtasks / notes I open the app. Since one of the recent opentask updates there is also the possibility to add subtasks like a checklist.
This way I can set individual remainders even for notes (or none) and if I go shopping I can open the corresponding shopping list = task list (IKEA, hardware store,…) with a checklist. The search function in opentask is basic but sufficient to search through all notes.
I also use this for some bookmarks (hobby) that I don’t need everyday but that I want to save. The links are clickable in opentask app. Reason: there is still no way to organize bookmarks in a kind of folder system (only tags). This prevents that my everyday bookmark list gets too full in the nc bookmark app on android.
For everyday bookmarks the nc boomark app is useful as long as there are max 15 -20 tags. Don’t import / sync Firefox (floccus addon) bookmark structure with subfolders in NC: you end up with 100s of tags in the bookmark app. This is not really helpful on a mobile phone.
Downside of Nextcloud:
As mentioned before: you can’t organize tags in a folder structure (bookmark tags, file tags).
If you end up with 2000+ contacts or 1000+ tasks the nc web surface becomes very slow, some browser stop working. Since I never use Nc in a browser I don’t mind.
For Emails I still use the surface from my webhoster, thunderbird or the android email app from htc (apkmirror.com). I’m not convinced by the NC surface.
The Nextcloud Sync App for Android uses a lot of data transfer. Since I’m mostly on mobile data I rather use foldersync for synchronising. More options / better control. Or I use the direct method (sftp or vpn) from my webhoster and es file explorer. It’s the easiest way for copying a lot of files from android to nc. I can’t remember but I think then somewhere in the NC settings you have to activate a variable for the transfer to be visible in your nc instance.
Last comment:
There is no WORKING open source and / or free password manager across all operating systems. Passman alpha apk for android is years away (Imho) to be comparable with eg SafeInCloud to be usable on mobile phones (sorry wish it were different). I needed something that worked across all platforms in an easy way. Esp. on mobile phones without Android 8 I needed something to easily find and input the password (I save the database in NC, but the app copies it locally and updates the cloud with every change). I mention this for users like me who are more interested to get NC in all aspects working than to have open source apps.
It takes a while to get NC running but once you have managed that, it is a replacement for google drive.
Happy New Year 2018
thanks for sharing, that’s quite interesting.
I like the trick to make task only calendars
I use KeePass, works like a charm.
KeePass is great. Can I ask how you’re syncing the .kdb file to your Android device? I was under the impression that file syncing isn’t available yet in the Android NextCloud app.
I use keepassx on linux, keepass2android on phone, works well. Also, I simply activate the grocery list in davdroid and open tasks on android, but not on my calendar.
Re: Password Manager – I use Enpass. It’s cross platform and you can store the database on your Nextcloud via WebDAV. You can have 20 free entries before having to pay for more. It’s a flat fee per mobile platform, free desktop clients.
Hello,
I tried what you explained, but it doesnt seem to work…
I got something like this :
https://cdn6.aptoide.com/imgs/f/f/f/fff6814bb682e2260cc750ed1dab9437_screen.png?h=464
But then what? Nothing appeards either in my android agenda, neither in davdroid ?
Thanks
Thank you for this article 🙂 I follow it step by step
Some additional notes:
Calendar “event colours” are not displayed with this setup. I understand only some Android calendar apps support Event colours. (different from Calendar colours) These are useful to differentiate important events from day to day trivial events.
DAVdroid didn’t sync an ICS calendar (from our school) . But the app suggested installing ICSDroid. Which was successful and easy.
I am curious: which contact manager do you use on Android? IMost of them request subscription in which case all privacy is gone.
I use the one that comes with LineageOS
Thanks for this setup. I was looking for a solution.
I did everything as listed, but I’m not sure I understand how it works. I have DAVx running, but the contacts on my phone are not populating the NC account. Am I supposed to manually upload them instead of counting on the sync?
I can see that DAVdroid is in paid version in Google Playstore.
What is the difference between the Google Play version and FDroid version then, when it is coming from the same developers?
Also, I prefer to support the developers for their work. So should I buy it from Playstore or download from FDroid and donate?
Thanks for sharing your insight.
@nazo: It’s from the same devs. I guess as google takes its part from the Play store revenue, it’d be better to donate the same amount directly to the devs.
Thanks this, was a very useful explanation! I am now hosting my own calendar and it feels good 🙂
Thanks – quite helpful. There is something that I haven’t figured out yet, though: is there a tasks app that allows re-arranging tasks using drag&drop? A list of 20 or more tasks without me being able to prioritize them is no good to me.
Thanks for any advice on that matter.
mccinemaniac
*edit*
I’ve just realised that after setting “sort by” to “manual”, this is possible in tasks.org by Alex Baker
Thank you for alle the explanations. Is it possible to share notes beetween other nextcloud users?
Following your instructions I found DAVdroid not only snycing with Etar, but also Googles built in calendar is synced. This is what I do not want. So is there a way to stop that? Or is it inevitable? Maybe I did something wrong.
Thank you very much in advance.