https://wiki.xmpp.org/web/XMPP_E2E_Security
XMPP has omemo and pgp as e2ee.
I’ve hosted https://prosody.im/ before I went to matrix.
You will need to enable some of the extensions, if you want to have group chats, chat history and so on. But after initial configuration prosody will just work ™ and is absolutely lightweight.
The only reason I stopped using XMPP was, that no one uses it, which is sad, but I can’t do much about it.
Also one important bit is, that most clients are not e2ee by default and you need to enable that you only want to send encrypted messages and not plain text.
) Plesse close that parentheses