Dead Simple Prosody Chat Server

Prosody is a free and open source software that provides XMPP/Jabber server service for chat or instant messaging. It has multi-domain supports and other XMPP/Jabber features.

Let’s install it, configure it and use it. I’ll be using Ubuntu server 14.04 and Prosody from apt-get.

Upgrade the server and reboot:

sudo apt-get -y update
sudo apt-get -y upgrade
sudo reboot

Please note that you may skip above steps if you know what you’re doing.

Install Prosody:

sudo apt-get -y install prosody

That’s it. Installation is finished. Next is to create SSL certificates and do some basic configuration.

Create self-signed SSL certificate, valid for 10 years, and prepare it for Prosody. In this example I have created 1 set of cert for domain

openssl req -new -x509 -newkey rsa:4096 -days 3650 -keyout -out
openssl rsa -in -out
chmod 640 *.key *.crt
sudo chown root.prosody *.key *.crt
sudo mv* /etc/prosody/certs/
sudo ls -l /etc/prosody/certs/

Repeat creating and preparing more self-signed SSL certificates when you need to. One set of SSL certificate for one domain.

Please note that file permissions, ownership, names and location are important.

Start working on Prosody config files, first the main config file prosody.cfg.lua:

cd /etc/prosody
sudo vi prosody.cfg.lua

On prosody.cfg.lua, add admin XMPP/Jabber ID:

admins = { "" }

Still on prosody.cfg.lua, set to require encryption for client connection and server to server connection:

c2s_require_encryption = true
s2s_secure_auth = true

Save the file and exit editor.

Next, configure domains. In this example I will configure Prosody to handle 2 domains: and I have previously created 2 sets of self-signed SSL certificates and copy them to /etc/prosody/certs.

Start working on domain config file, copy from example configuration:

sudo cp conf.avail/ conf.d/

Find and replace every with

sudo sed -i 's/' conf.d/

Edit conf.d/

sudo vi conf.d/

On conf.d/, enable it:

enabled = true

Repeat the process to add more domains. One config file for one domain.

Restart Prosody and check the status:

sudo /etc/init.d/prosody restart
sudo prosodyctl status
sudo tail -f /var/log/prosody/prosody.log

Add XMPP/Jabber ID for admin:

sudo prosodyctl adduser

Example of adding 2 more XMPP/Jabber IDs:

sudo prosodyctl adduser
sudo prosodyctl adduser

You may add as much XMPP/Jabber IDs as you want to.

Installation and basic configuration of Prosody is finished. You may try to login from XMPP/Jabber client softwares now.


2 thoughts on “Dead Simple Prosody Chat Server

Comments are closed.