Contacts - Self-Hosting I would like to host the contacts of my android device on my own.

Up to now I used an old android device and tine20

I upgraded my android device to the latest LineageOS.

Now the contact sync to tine20 seems broken. The contacts get synced, but some minutes later they are all gone again. I tried CardDAV, but this did not work (at least not on the first try)

I am not married with tine20. I can change the server, as long as I can do "self-hosting".

What choices do I have now, and what is the most simple solution?
I use owncloud and its contacts plugin now.

For syncing I use DavDroid

Here is the way I managed to transfer the contacts from ActiveSync+Tine20 to CardDAV+Owncloud:


On Android device connect via ActiveSync (aka Exchange) to tine20. 
Do sync, wait until sync finished.
Don't wait too long now, since after some minutes all contacts are lost again. At least on my device (LineageOS Android 7.1.2)
Go to contacts app in android. 
Export all contacts to VCF. 
Remove ActiveSync/Exchange account
Restart android device. List of contacts should be empty now
Install DavDroid (or an other CardDAV sync app)
Go to Contacts/Accounts add a DavDroid account. I use owncloud, but other CardDAV provider should work, too.
Go to Contacts/Settings set the new account as default
Got to Contacts/Settings/Import import the contacts again, which you exported in the above step.
Done :-)


Feedback welcome. I guess above guideline can be improved, tell me how, or do it if you have enough credits on this site.