

For one to one chats and the occasional group chat? XMPP is pretty awesome and has lots of good clients (Conversations on Android, Monal on iDevices, Dino, Gajim, etc. on Linux)
If you want something closer to Discord and host public communities or very large chatrooms, Matrix is very good. You can self-host it with Continuwuity, and there are lots of clients too (Cinny, FluffyChat, Element, Fractal, NeoChat, etc.)
If you just need voice chat, Mumble is simple and works well.


Cinny is an awesome desktop client, as is Element, Fractal (GNOME, no spaces support though) and NeoChat (KDE)
For mobile, I personally prefer FluffyChat, but there’s other options too.