XMPP

Prosody is a light and easy to set up XMPP server

Here are a few notes to install prosody on OpenBSD.

Install prosody:

# pkg_add prosody

Add DNS fields :

A record :

xmpp.athome.tld

SRV records :

_xmpp-client._tcp.athome.tld. 18000 IN SRV 0 5 5222 xmpp.athome.tld.
_xmpp-server._tcp.athome.tld. 18000 IN SRV 0 5 5269 xmpp.athome.tld.

If you host MUCs :

_xmpp-server._tcp.conference.athome.tld. 18000 IN SRV 0 5 5269 xmpp.athome.tld.

Configuration

Edit "/etc/prosody/prosody.cfg.lua"

VirtualHost "athome.tld"
	ssl = {
		certificate = "/etc/prosody/certs/athome.tld.crt";
        key = "/etc/prosody/certs/athome.tld.key";
	}

Certificate must be readable by _prosody user. If you got them with acme-client, then you need to install them in prosody directory :

install -g _prosody -o _prosody -m 400 /etc/ssl/private/athome.tld.key /etc/prosody/certs/
install -g _prosody -o _prosody -m 400 /etc/ssl/athome.tld.crt /etc/prosody/certs/

Add the previous commands to your periodic task when certificates are renewed.

Add the admin :

# prosodyctl adduser batman@athome.tld

Check it's allright :

prosodyctl check config

Ports

Open 5222 (xmpp-client) and 5269 (xmpp-server).

logs

Edit "/etc/newsyslog.conf" :

/var/prosody/prosody.log                644  5     300  *     Z
/var/prosody/prosody.err                644  5     300  *     Z

More

Look official instructions 😉