You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Felix Delattre 9536159188 Moving to a cooler setup 2 years ago
build Moving to a cooler setup 2 years ago
docs Moving to a cooler setup 2 years ago
.gitignore Moving to a cooler setup 2 years ago
LICENSE.txt Add docker-compose configuration, a readme file and a license 2 years ago Moving to a cooler setup 2 years ago
docker-compose.yml Moving to a cooler setup 2 years ago
env-example Moving to a cooler setup 2 years ago

Prosody Docker Setup

Docker image containing the Prosody XMPP server and a Docker Compose setup to run the server. It includes Let’s Encrypt for certificate creation. The configuration is built to support multi-domain setups.


Everybody needs a open communication platform that everyone can use. This configuration allows you to setup a full working jabber/xmmp server in one single command.


DNS configuration

The tricky part of the configuration is in the DNS records: Besides pointing your domain, and some subdomains to the server. The main A record needs to be pointed there also. This will allow Let’s Encrypt to generate a valid certificate for the XMPP server.

Further, some SRV records for your domain need to be specified for XMPP to work properly. In case you are not running your own name server and you can not specify SRV records in the user interface of your provider, write directly to their support.


Your main domain for jabber services: EXAMPLE-DOMAIN.TLD

For this setup the main domain name should be configured to redirect to the the docker setup. Host your website on www.EXAMPLE-DOMAIN.TLD. This configuration redirects all incoming connections on port 80 and 443 to the www.EXAMPLE-DOMAIN.TLD. This is due to the fact, that we need Let’s Encrypt certificates for everything and we need to have valid certificates also the main domain: EXAMPLE-DOMAIN.TLD.

xmpp.EXAMPLE-DOMAIN.TLD - The main subdomain for the server. conference.EXAMPLE-DOMAIN.TLD - Multi-user-chats live on a separate sub domain. proxy65.EXAMPLE-DOMAIN.TLD - Proxy65 file sharing capabilities.

DNS entries

The following DNS entries need to be made for each domain used as a virtual host in prosody.

_xmpp-client._tcp.EXAMPLE-DOMAIN.TLD. 18000 IN SRV 0 5 5222 xmpp.EXAMPLE-DOMAIN.TLD.
_xmpp-server._tcp.EXAMPLE-DOMAIN.TLD. 18000 IN SRV 0 5 5269 xmpp.EXAMPLE-DOMAIN.TLD.
_xmpp-server._tcp.conference.EXAMPLE-DOMAIN.TLD. 18000 IN SRV 0 5 5269 xmpp.EXAMPLE-DOMAIN.TLD.


Prepare configuration

You basically have to find all occurenses of EXAMPLE-DOMAIN.TLD and replace it with your domain, in the following files:

  • conf/prosody/prosody.cfg.lua
  • conf/prosody/conf.d/04-vhost-example-domain.tld.cfg.lua
  • conf/nginx/conf.d/example-domain.tld.conf

The last two ones, you should also rename to your domain. And for multiple domains just create a new pair of these two last for any other domain you want to support.

Building prosody and starting

docker-compose up -d --build


Directory structure

  • build - contains the information of the docker image to be build
  • conf - configuration files of prosody
  • data - prosody stores all data here
  • logs - prosody’s logs

All is in one place. A backup of the full folder stores everything.

Docker images

Restart prosody

docker-compose stop && docker-compose up -d


Register a new user in one command

docker exec -it prosody_prosody_1 prosodyctl register USERNAME EXAMPLE-DOMAIN.TLD PASSWORD

Add user

docker exec -it prosody_prosody_1 prosodyctl adduser USERNAME@EXAMPLE-DOMAIN.TLD

Change password

docker exec -it prosody_prosody_1 prosodyctl passwd USERNAME@EXAMPLE-DOMAIN.TLD

Delete user

docker exec -it prosody_prosody_1 prosodyctl deluser USERNAME@EXAMPLE-DOMAIN.TLD


This information is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the MIT License