Xmpp server setup

From LCA2016 Delegate wiki
Revision as of 08:12, 26 January 2016 by Sbragg@deakin.edu.au (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quick notes for setting up your own xmpp server.

dns entries

Add the following entries to your domain. I have a subdomain xmpp to make things easier

xmpp IN CNAME nerdsniping.net. conference IN CNAME nerdsniping.net. _xmpp-client._tcp.nerdsniping.net. 86400 IN SRV 5 0 5222 xmpp.nerdsniping.net. _xmpp-server._tcp.nerdsniping.net. 86400 IN SRV 5 0 5269 xmpp.nerdsniping.net. _xmpp-server._tcp.conference.nerdsniping.net. 18000 IN SRV 0 5 5269 xmpp.nerdsniping.net.


open the firewall on the server to allow 5222 (client) and 5269 (server to server)

install software

install prosody

Install package from your distro. edit /etc/prosody/prosody.cfg.lua allow registration on the server enable the modules that you want

create a domain config in /etc/prosody/conf.d/nerdsniping.net for example

VirtualHost "nerdsniping.net"
enabled = true -- Remove this line to enable this host

ssl = {
	key = "/etc/prosody/certs/nerdsniping.net-3.key";
	certificate = "/var/lib/acme/nerdsniping.net.combined";
	protocol = "tlsv1"

Component "conference.nerdsniping.net" "muc"

Use letsencrypt.org to create a certificate, you will need a web server and the ability for a lets encrypt tool to write to a .well-known/acme-challenge directory when running one of the acme tools. The certificates file must contain the chain with your certificate on the top of the file followed by any intermediate file.

To create an admin user first allow registration on the server, create a user and then add that user as an admin in the config file. You can administer the server with some desktop xmpp clients after doing this.

Some Interesting Modules

  • External components and spectrum to create IRC bridge
  • mod_csi to control presence updates useful to not suck battery on mobile clients