Prosody

Prosody

Prosody’s website says that prosody can be installed from debian’s repositories by apt install prosody, however, Luke Smith in his tutorial states that it should be installed from prosody’s official repo by:

apt install extrepo
extrepo enable prosody
apt update
apt install prosody prosody-modules

I have went with foregoing the installation of extrepo, however, if you encounter any problems it may be worth a try to follow Luke Smith’s tutorial.

In the config file, /etc/prosody/prosody.cfg.lua, I uncommented mam and csi_simple in section modules_enabled to have a message history and mobile optimizations respectively, added myself to the admins section and added the following to enable multi user chatrooms and file sharing:

Component "chat.example.org" "muc"
    modules_enabled = { "muc_mam" }
    restrict_room_creation = "admin"
Component "uploads.example.org" "http_file_share"
Component "proxy.example.org" "proxy65"
http_file_share_expire_after = 60 * 60 * 24 * 7 -- any uploaded files are automatically deleted after 7 days (value is in seconds)

Then get https certificates with certbot and install them

certbot -d chat.example.com --nginx
certbot -d uploads.example.com --nginx
certbot -d proxy.example.com --nginx
prosodyctl --root cert import /etc/letsencrypt/live/

You might want to create a cronjob to update certificates every month.

Finally, you have to unblock ports 5222 and 5238.