Configuring the XMPP server

To use spectrum, you also have to configure your XMPP server to work with your spectrum instances. The configuration details you give to your XMPP server of course have to correspond to the details you give in the Spectrum configuration file.

ejabberd

In the ejabberd configuration file (by default in /etc/ejabberd/ejabberd.cfg), you have to add a field to the "listen" directive.

In the section that says: ‘{listen,’ add these lines:

{{5347, "127.0.0.1"}, ejabberd_service, [
                                        {access, all},
                                        {host, "icq.example.com", [{password, "secret"}]}
]}
  • 5347 is port which will be used by Spectrum to connect your ejabberd server. Each Spectrum instance has to be connected to ejabberd server with different port.
  • "icq.example.com" is the hostname of your Spectrum transport.
  • "secret" is the password which will be used by Spectrum to authenticate itself to the ejabberd server.
  • "{access, all}" lets everybody use your transport.

To use the new settings, you can either just restart ejabberd or use ejabberd's web-interface to add the new port to the running instance. You can find the Settings under Nodes -> <your node> -> Listened Ports. For full information on how to add external components (like Spectrum) to your ejabberd installation, also refer to the Ejabberd guide

prosody

In the prosody configuration file (normally in /etc/prosody/prosody.cfg.lua) is at the bottom of the file the configuration line for components.

It looks like this:

--Component "gateway.example.com" 
--      component_secret = "password" 

You have to edit this line to make spectrum work:

Example: ICQ

Component "icq.example.com" 
     component_secret = "mysecreticqpassword" 

For every spectrum transport you want to use, you have to add those two lines:

Example:

Component "icq.example.com" 
     component_secret = "mysecreticqpassword" 

Component "msn.example.com" 
     component_secret = "mysecretmsnpassword" 

Component "yahoo.example.com" 
     component_secret = "mysecretyahoopassword" 

Save the file and restart your prosody server.