Table of Contents

Components in Prosody

Components are extra services on a server which are available to clients, usually on a subdomain of the main server (such as mycomponent.example.com). Example components might be chatroom servers, user directories, or gateways to other protocols.

Prosody supports internal components (implemented with Prosody-specific plugins) and external components (using XEP-0114, which most standalone components support).

Components are not affected by the “require_encryption” option.

Adding an internal component

To add a component, you simply add a line to the config file specifying the hostname, and the plugin you wish to use for the component.

An example of adding the Prosody MUC component would be:

Component "conference.jabber.org" "muc"

Adding an external component

As of 0.4, Prosody supports external components that use the XEP-0114 component protocol (practically all do).

To add an external component, you need to tell Prosody the address and a password (or 'secret') which the component will use to log in.

Definition is the same as for internal components, except no plugin is specified:

Component "conference.jabber.org"
         component_secret = "mysecretcomponentpassword"

To configure the port(s) Prosody listens on for component connections, set the component_ports option in the global section of the config. The default port is 5347 (in Prosody 0.7 or later).

Also by default Prosody will only listen for connections on the local interface (127.0.0.1 or 'localhost'). This can optionally be changed with the component_interface option.

For example:

Host "*"
        -- Some options here... --
        component_ports = { 8888 }
        component_interface = "192.168.0.10"
        -- ...maybe some more options here --

The above would configure Prosody to listen for component connections on port 8888, coming only to the IP address 192.168.0.10.