FTR, Telegram is not the proper alternative to WhatsApp or FB Messenger if you’re looking for something “open”. Just because the client is open source doesn’t make the cut, if the server is closed source, and I don’t understand why people don’t get this.

Signal may be a better alternative since the server code is open source, although it’s not easy to rollout your own server because the official client has the central server address hardcoded and you’d have to fork the client as well.

Another alternative is XMPP, although it doesn’t have a lot of traction, specially considering how modern chatty stuff such as ‘last online at’ or ‘read receipts’ depend on XEP extensions that have to be implemented by both the server and the client. Despite that, running an XMPP server nowadays is as easy as installing ejabberd, keeping sensible defaults such as making logins private, and using your Let’s Encrypt SSL certificate (yes it can be used!).