Prosody XMPP server with full-featured and secure setup, running in a docker container.
Features supported out of the box:
Install docker.
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 .
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.
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
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.
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.
Content type
Image
Digest
sha256:181c8e0d6…
Size
49.2 MB
Last updated
almost 11 years ago
docker pull synctree/docker-prosody