Ansible role that deploys, maintains, and updates Prosody - XMPP Server written in Lua.
Find a file
muppeth 8d65788f7e Merge pull request 'MKerge staging to main' (#41) from staging into main
Reviewed-on: #41
Reviewed-by: meaz <meaz@no-reply@disroot.org>
2026-03-18 21:42:34 +01:00
defaults Merge pull request 'MKerge staging to main' (#41) from staging into main 2026-03-18 21:42:34 +01:00
handlers lint; change apt repository to deb822 module 2025-11-13 15:42:42 +01:00
Playbooks lint; change apt repository to deb822 module 2025-11-13 15:42:42 +01:00
tasks lint; change apt repository to deb822 module 2025-11-13 15:42:42 +01:00
templates/etc readd ssl in bosh, though I'm pretty sure that can be removed! 2025-02-21 15:10:02 +01:00
.ansible-lint lint; change apt repository to deb822 module 2025-11-13 15:42:42 +01:00
.gitignore Migration commit; fresh start 2021-03-14 11:00:16 +01:00
DNS_configuration.md Migration commit; fresh start 2021-03-14 11:00:16 +01:00
LICENSE Migration commit; fresh start 2021-03-14 11:00:16 +01:00
README.MD Add info in readme about selfsigned certificates 2025-02-21 14:57:05 +01:00
Vagrantfile small addition to readme (we need much better one btw); removed changelog; added requested change in PR #31 2024-07-30 21:51:18 +02:00

Prosody - Ansible Role

This role deploys prosody XMPP server with all needed dependencies and prosody community modules.

You can deploy a test instance using Vagrantfile attached to the role. This role is released under MIT Licence. We do not give no warranty for this software.

Run in production

To run this role in production, do not forget to set your DNS as explained here and to change all vars from files in default/ to what you need.

The role's defaults should be already deploying fully functional and modern XMPP Server. It allows to add/remove any additional module (whether core or community).

Run test in Vagrant

To have it work using vagrant:

  • cd prosody where prosodyis the name of this repo.
  • vagrant up to build up the Virtual Environment.
  • and ansible-playbook -b Playbooks/prosody.yml to deploy Prosody on the Virtual Environment.

Use with selfsigned certificate

If you want to test with a selfsigned certificate:

  • Edit selfsigned.yml to add the domains you want certificates for.
  • Set prosody_allow_registration to true
  • Run ansible-playbook -b Playbooks/prosody.yml --tags selfsigned
  • Edit your hosts vim /etc/hosts and add 192.168.33.5 example.org

You can now test from a client with for example username@example.org.

Setup turnserver for viop

If you want to use viop, you need to set turncredentials to true in default/mod.yml. This feature depends on a third party service that needs to be installed separately: coturn. To see how to set it, check Prosody's documentation

Add LDAP authentication and vhosts

To add LDAP authentication, edit defaults/vhost.yml, change auth_method from internal_hashed to ldap and change the LDAP vars in prosody_ldap_config.

Virtual hosts

This role supports multiple vhosts. In order to define them specify vhosts in prosody_vhost array. You can set number or settings. Make sure to provide certificates for each domain prosody_certificate_path eg:


 prosody_vhost:
   - name: 'example.org'
     enabled: 'true'
     carbon_defaults: 'true'
     auth_method: 'internal_hashed'
   - name: 'example.com'
     enabled: 'true'
     carbon_defaults: 'true'
     auth_method: 'ldap'
     prosody_ldap_config:
       - ldap_server: "{{ prosody_ldap_server }}"
         ldap_rootdn: "{{ prosody_ldap_rootdn }}"
         ldap_password: "{{ prosody_ldap_password }}"
         ldap_basedn: "{{ prosody_ldap_basedn }}"
         ldap_tls: "{{ prosody_ldap_tls }}"
         ldap_mode: "{{ prosody_ldap_mode }}"

Modules