Android
From Jon's Wiki
How to get off the Google train.
Install F-Droid
On your phone, install the F-Droid app, it's an open source only app store.
IM, chat, Hangouts
On the server, install the Prosody XMPP server and create yourself an account. On your phone, install one of:
- IM+ (multi-protocol)
- OctroTalk (lets you do voice & video calls over Google XMPP)
- Conversations (XMPP only)
Calendar and contacts sync
On the server, install Baïkal, which is a very lightweight PHP-based CalDAV and CardDAV server. Point Apache at it and strap on an SSL certificate and you're good to go. On your phone, install [DAVdroid and add accounts with the appropriate CalDAV and CardDAV URLs. Export your contacts from Google/Facebook/wherever, and import them into Baïkal, and they'll turn up (eventually) on your phone.