Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Prosody XMPP server with full-featured and secure setup, running in a docker
container.

Features supported out of the box:

  • conferences
  • file transfer
  • smacks and carbon modules
  • PFS (Perfect Forward Secrecy) for message security

Prerequisites

Install docker.

Building the image

In order to create your own server, create a new directory. Inside, create a Dockerfile which inherits from this image. Example:

FROM mazzolino/prosody
CMD chown prosody /var/lib/prosody && prosodyctl start

(Note: The CMD line is needed because of a weird behaviour in Docker.)

Then, create two subfolders:

mkdir certs conf.d

Get an SSL certificate (e.g. from StartSSL) and put the cert and key into the certs folder:

cp my-domain.crt certs/ssl.cert
cp my-domain.key certs/ssl.key

(NOTE: The certificate file (ssl.cert) should contain the complete SSL certificate chain as needed.
E.g. for StartSSL, you have to concatenate your certificate, the class1 or class2 sub certificate and the CA certificate into it.)

Now you can build the final container image. Choose a name for your container image instead of xmpp.example.com. Also, replace example.com with your own domain.

docker build -t xmpp.example.com .

Running

Start your server like this. Replace xmpp.example.com with the name of the image you built in the last step. Replace example.com with your own domain.

docker run -d -p 5222:5222 -p 5269:5269 -p 5280:5280 -p 5347:5347 -v $(pwd)/.prosody:/var/lib/prosody -e "XMPP_DOMAIN=example.com" xmpp.example.com

You need to forward the above ports in your firewall to this machine.

Prosody's data will be stored in the directory .prosody inside the current directory, so make sure to keep that.

Adding users

You can add user logins like this. Replace xmpp.example.com with the name of your image. Also, replace username, example.com and password accordingly:

docker run --rm -v $(pwd)/.prosody:/var/lib/prosody xmpp.example.com prosodyctl register username example.com password

Add DNS records

You need to add SRV records to your domain so your server can be connected by other clients and servers correctly. See DNS configuration in Jabber/XMPP.

Customization

Prosody's main configuration file prosody.cfg.lua is not customizable from inherited images. You can add custom configuration files in the conf.d subdirectory instead.

See the configuration documentation for possible values.

Docker Pull Command
Owner
synctree
Source Repository