====== 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 [[doc:modules:mod_muc|MUC]] component would be:
Component "conference.jabber.org" "muc"
===== Adding an external component =====
Prosody supports all external components that use the XEP-0114 component protocol (practically all do).
Example external components include [[http://spectrum.im/|Spectrum]], which we recommend if you wish to bridge your Prosody server to legacy IM networks such as MSN, Yahoo, AIM and ICQ. You can use the documentation on the [[http://spectrum.im/projects/spectrum/wiki|Spectrum wiki]] to further assist you.
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. Be sure that the password and the port (Prosody defaults to 5347) that you tell Prosody match the same password and port in your component's configuration file(s).
Definition is the same as for internal components, except no internal plugin is specified:
Component "msn.example.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). Multiple components can all use the same port to connect.
Also by default for security Prosody will only listen for connections on the local interface (127.0.0.1 or 'localhost'). This can optionally be changed with the global 'component_interface' option.
For example:
-- Global config section --
component_ports = { 8888 }
component_interface = "192.168.0.10"
The above would configure Prosody to listen for component connections on port 8888, coming only to the IP address 192.168.0.10.