Setting Up the XMPP Bridge

Configuring the XMPP Bridge

The XMPP bridge relies on the xmpp "component" feature. It is an equivalent of matrix application services. You need to configure an XMPP Component on an XMPP Server that the bridge will use to bridge matrix and xmpp user.

On the hosting machine

From the Installer's Integrations page, click "Install" under "XMPP Bridge".

For the provided xmpp.yml, please use the following documentation to configure the bridge:

In all the examples below the follow are set

domain_name from parameters.yml : element.local XMPP Server FQDN: xmpp.example.com XMPP External Component/xmpp_domain: element.xmpp.example.com

Prosody Example

If you are configuring prosody, you need the following component configuration (for the sample xmpp server, element.xmpp.example.com):

    Component "element.xmpp.example.com"
        ssl = {
          certificate = "/etc/prosody/certs/tls.crt";
          key = "/etc/prosody/certs/tls.key";
        }
      component_secret = "eeb8choosaim3oothaeGh0aequiop4ji"

And then with that configured, you would pass the following into xmpp.yml:

xmpp_service: xmpp://xmpp.example.com:5347
xmpp_domain: "element.xmpp.example.com" # external component subdomain
xmpp_component_password: eeb8choosaim3oothaeGh0aequiop4ji # xmpp component password

Note: We've used pwgen 32 1 to generate the component_secret.

Joining an XMPP Room

Once you have the XMPP bridge up, you need to map an XMPP room to a Matrix ID. To do this, if the room on XMPP is named:

#iwotevo@conference.xmpp.lab.element.com

(conference is the fqdn of the component's hosting rooms on our xmpp test instance)

then on Matrix, you would join:

#_xmpp_iwotevo_conference.xmpp.example.com:element.local

The command to do that from within the Element client would be: (assuming your homeserver domain is example.com)

/join #_xmpp_iwotevo_conference.xmpp.example.com:element.local

Joining a Matrix room from XMPP

If the Element/Matrix room is public you should be able to query the room list at the external component server address(Ex: element.xmpp.example.com)

The Matrix room at alias #roomname:element.local maps to #roomname#element.local@element.xmpp.example.com on the XMPP server xmpp.example.com if yout xmpp_domain: element.xmpp.example.com

Element XMPP
#roomname:element.local (native Matrix room) #roomname#element.local@element.xmpp.example.com (bridged into XMPP)
#_xmpp_roomname_conference.xmpp.example.com:element.local (bridged into Matrix/Element) #roomname@conference.xmpp.example.com (native XMPP room)

Revision #5
Created 28 November 2022 20:25:44 by Karl Abbott
Updated 28 February 2023 20:50:57 by Karl Abbott