This is a small guide to a modern, feature rich XMPP setup.s it’s running on my server and clients. Features should include message archiving, encryption and file sharing, and all those things should work with multiple clients.

Let’s begin with the server setup. With Prosody there is an open source server with good performance and high extensibility. For the optimal setup

  • Prosody 0.10+
  • Prosody Community Modules

are needed. After the installation of Prosody, check out the community modules and add the path to the configuration file. Now you can enable the following additional modules:

  • http (File sharing)
  • http_upload (File sharing)
  • mam (Server side message archiving. Message history can be synchronized between clients)
  • smacks
  • carbon
  • csi

While using the http module, i would disable http and only allow https:

http_ports = { }
http_interfaces = { }

https_ports = { 5281 }
https_interfaces = { "*" }

It’s also a good idea to force ssl for all server to server and client to server connections:

c2s_require_encryption = true
s2s_require_encryption = true

I’m using a letsencrypt certificate for my XMPP server to avoid problems due to invalid certificates.

The client selection is quite small. The best client around is Conversations on Android. You can get it for a small fee in the Google Play Store or for free via F-Droid. The source code is available on github, so building it youself is possible, too. Conversations supports all features we have enabled on our server: All your incoming and outgoing messages are synchronized between all clients, clients can use power saving features and you can send contacts files by uploading them to the XMPP server. A good alternative for desktops is Gajim. Gajim has support for message archiving since version 0.16 and should be expanded with the following plugins:

  • HttpUpload (File sharing)
  • Url Image preview (Image previews in the chat)

OMEMO is a multi-client end to end encryption. You should enable OMEMO on all clients and convince should contacts to enable it, too. With OMEMO, all messages are encrypted but can still be read on all your clients. Remember, that the message without encryption are saved as clear text on the server due to the usage of message archiving.

With such a server setup and those clients, you’ll have your own XMPP setup that has most features you will need for instant messaging. The big advantage over proprietary solutions is, that you have a transparent, open setup and can determine yourself, how long you want to store what information (chat history, login times). Also, you’re independent of any company as long as you use your own server. You don’t have to enable features you don’t want or create your own features as you like.