Changeset - b9a87c04c8b1
[Not reviewed]
0 8 3
Jan Kaluza - 10 years ago 2015-12-01 18:51:06
jkaluza@redhat.com
documentation update
11 files changed with 353 insertions and 233 deletions:
0 comments (0 inline, 0 general)
_includes/themes/twitter/my.html
Show inline comments
 
@@ -6,7 +6,7 @@
 
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
 
    <meta name="description" content="Spectrum 2 : Spectrum 2 IM transports" />
 

	
 
    <link href="http://spectrum.im/css/style.css" rel="stylesheet" type="text/css" media="all">
 
    <link href="/css/style.css" rel="stylesheet" type="text/css" media="all">
 

	
 
    <title>Spectrum 2</title>
 
  </head>
 
@@ -18,7 +18,7 @@
 
        <header class="inner">
 
          <a id="forkme_banner" href="https://github.com/hanzz/spectrum2">View on GitHub</a>
 

	
 
<img id="logo" src="http://spectrum.im/logo.png" style="width:250px; margin-left: auto;margin-right: auto; display:block;"/>
 
<img id="logo" src="/logo.png" style="width:250px; margin-left: auto;margin-right: auto; display:block;"/>
 

	
 
            <section id="menu" style="text-align: center;">
 
            <a class="menuitem" href="http://spectrum.im">About</a>
_includes/themes/twitter/myconfig.html
Show inline comments
 
@@ -6,7 +6,7 @@
 
    <meta http-equiv="X-UA-Compatible" content="chrome=1" />
 
    <meta name="description" content="Spectrum 2 : Spectrum 2 IM transports" />
 

	
 
    <link href="http://spectrum.im/css/style_config.css" rel="stylesheet" type="text/css" media="all">
 
    <link href="/css/style_config.css" rel="stylesheet" type="text/css" media="all">
 

	
 
    <title>Spectrum 2</title>
 
  </head>
 
@@ -18,7 +18,7 @@
 
        <header class="inner2">
 
          <a id="forkme_banner" href="https://github.com/hanzz/spectrum2">View on GitHub</a>
 

	
 
<img id="logo" src="http://spectrum.im/logo.png" style="width:250px; margin-left: auto;margin-right: auto; display:block;"/>
 
<img id="logo" src="/logo.png" style="width:250px; margin-left: auto;margin-right: auto; display:block;"/>
 

	
 
            <section id="menu" style="text-align: center;">
 
            <a class="menuitem" href="http://spectrum.im">About</a>
css/style_config.css
Show inline comments
 
@@ -335,7 +335,7 @@ Full-Width Styles
 

	
 
.inner2 {
 
  position: relative;
 
  max-width: 640px;
 
  max-width: 880px;
 
  padding: 20px 10px;
 
  margin: 0 auto;
 
}
documentation/about.md
Show inline comments
 
@@ -3,60 +3,34 @@ layout: page
 
title: Spectrum 2
 
---
 

	
 
## Gateway mode and server mode
 
![Spectrum 2 animation](/animation.gif)
 

	
 
Spectrum 2 can work in two modes: Gateway mode and Server mode. This chapter describes differences betweeen those two modes. If you want to find out how to configure Spectrum 2 to run in gateway or server mode, read the Configuration part of this documentation.
 
Spectrum 2 is an open source instant messaging transport. It allows users to chat together even when they are using different IM networks. It acts as a transport layer between the users as showed in the animation above.
 

	
 
### Gateway mode
 

	
 
Gateway mode represents the classic way how XMPP gateway works. You have to configure an external XMPP server (like Prosody or Ejabberd) to serve the subdomain you want to use for Spectrum 2 (for example "icq.domain.tld"). Spectrum 2 in gateway mode then connects the XMPP server as its component and users are able to find out "icq.domain.tld" in Service Discovery, register it and use it.
 
## Spectrum 2 frontends and backends
 

	
 
*Advantages:*
 
* Users can use more legacy networks using single XMPP account (and using single TCP connection).
 
* It's easy to extend existing XMPP servers using gateway mode.
 
As it was already written above, Spectrum 2 supports multiple IM networks. Spectrum 2 distinguishes between **Frontend** and **Backend** networks.
 

	
 
*Disadvantages:*
 
* Passwords are stored (even in encrypted form) on server.
 
* Roster (contact list) synchronization can be problematic, because it depends on the client user uses. This can be improved by usage of Remote Roster protoXEP.
 
* You have to setup XMPP server and use database even if you only want to use Spectrum 2 as a tool to connect legacy networks using XMPP protocol.
 
If some network is supported as **Frontend**, it means that Spectrum 2 allows its users to use this network to communicate with other users using the **backend** network.
 

	
 
### Server mode
 
#### Example
 

	
 
In server mode, Spectrum 2 behaves as standalone server. User then logins legacy networks by logging XMPP account like this one: "my_msn_name%hotmail.com@msn.domain.tld".
 
If you for example use **Slack** as a frontend and **IRC** as a backend, the Spectrum 2 users can add Spectrum 2 to their Slack team, join the IRC network and communicate with their friends on IRC network.
 

	
 
*Advantages:*
 
* Passwords are not stored on server.
 
* Roster synchronization is easy, because Spectrum 2 acts as normal server.
 
* If you want to use Spectrum 2 as wrapper between different networks, you don't need database or Jabber server as another layer.
 
* Using SRV records you can easily run Spectrum 2 on different machines to scale it.
 
## Supported frontends
 

	
 
*Disadvantages:*
 
Currently, following frontends are supported:
 

	
 
* Clients have to support more accounts to connect more legacy networks (Therefore they will need have to use more TCP connections).
 
* XMPP
 
* Slack
 

	
 
## Instance, main process and backends
 

	
 
This chapter describes differences between Spectrum 2 instance, Spectrum 2 main process and Spectrum 2 backends.
 

	
 
### Spectrum 2 instance
 

	
 
In server mode, Spectrum 2 instance is single XMPP server. In gateway mode, it is single XMPP gateway. We can say these statements about Spectrum 2 instance:
 

	
 
* One instance is defined by one configuration file (By default stored in `/etc/spectrum2/transports/`).
 
* Spectrum 2 instance is represented to end user by its Jabber ID (for example icq.domain.tld).
 
* Internally every Spectrum 2 instance consists of Spectrum 2 main process and Spectrum 2 backends.
 
* One instance can run just one type of Spectrum 2 backend.
 

	
 
### Spectrum 2 main process
 

	
 
Spectrum 2 main process is the main process of Spectrum 2 instance.
 

	
 
* Spectrum 2 main process is responsible for running Spectrum 2 backends and routing users' requests to proper backend.
 
* By default the logs of Spectrum 2 main process are stored in `/var/log/spectrum2/$jid/spectrum2.log`.
 

	
 
### Spectrum 2 backend
 

	
 
Spectrum 2 backend is special application run by Spectrum 2 main process. The goal of Spectrum 2 backend is to handle users's sessions. Spectrum 2 main process can handle more Spectrum 2 backends, but all messages from single user are always handled by the same backend.
 

	
 
One Spectrum 2 instance can run only one type of Spectrum 2 backend.
 
## Supported backends
 

	
 
* IRC
 
* Twitter
 
* Skype
 
* XMPP
 
* Facebook
 
* MSN
 
* Yahoo
documentation/configuration/config_file.md
Show inline comments
 
@@ -4,6 +4,7 @@ title: Spectrum 2
 
---
 

	
 
> **\[database\]**
 
>
 
> * [database](#databasedatabase)
 
> * [password](#databasepassword)
 
> * [port](#databaseport)
 
@@ -12,12 +13,6 @@ title: Spectrum 2
 
> * [type](#databasetype)
 
> * [user](#databaseuser)
 
>
 
> **\[identity\]**
 
>
 
> * [category](#identitycategory)
 
> * [name](#identityname)
 
> * [type](#identitytype)
 
>
 
> **\[logging\]**
 
>
 
> * [backend_config](#loggingbackend_config)
 
@@ -25,32 +20,26 @@ title: Spectrum 2
 
>
 
> **\[registration\]**
 
>
 
> * [auto_register](#registrationauto_register)
 
> * [enable_public_registration](#registrationenable_public_registration)
 
> * [auto_register](#registrationautoregister)
 
> * [enable_public_registration](#registrationenablepublicregistration)
 
> * [instructions](#registrationinstructions)
 
> * [username_label](#registrationusername_label)
 
> * [username_mask](#registrationusername_mask)
 
> * [username_label](#registrationusernamelabel)
 
> * [username_mask](#registrationusernamemask)
 
>
 
> **\[service\]**
 
>
 
> * [admin_jid](#serviceadmin_jid)
 
> * [admin_password](#serviceadmin_password)
 
> * [allowed_servers](#serviceallowed_servers)
 
> * [admin_jid](#serviceadminjid)
 
> * [admin_password](#serviceadminpassword)
 
> * [backend](#servicebackend)
 
> * [backend_host](#servicebackend_host)
 
> * [backend_port](#servicebackend_port)
 
> * [cert](#servicecert)
 
> * [cert_password](#servicecert_password)
 
> * [backend_host](#servicebackendhost)
 
> * [backend_port](#servicebackendport)
 
> * [group](#servicegroup)
 
> * [jid](#servicejid)
 
> * [password](#servicepassword)
 
> * [pidfile](#servicepidfile)
 
> * [port](#serviceport)
 
> * [server](#serviceserver)
 
> * [server_mode](#serviceserver_mode)
 
> * [user](#serviceuser)
 
> * [users_per_backend](#servicusers_per_backend)
 
> * [working_dir](#serviceworking_dir)
 
> * [users_per_backend](#servicusersperbackend)
 
> * [working_dir](#serviceworkingdir)
 

	
 

	
 

	
 
@@ -147,41 +136,6 @@ Default:|empty string
 

	
 
For server-client databases, this option configures username to be used to connect the database.
 

	
 
#### identity.category
 

	
 
Key | val
 
----|----
 
Description:|Configures disco#info identity category.
 
Context:|gateway-mode
 
Type:|string
 
Default:|gateway
 

	
 
This option configures disco#info identity category.
 

	
 
#### identity.name
 

	
 
Key | val
 
----|----
 
Description:|Configures the name showed in service discovery.
 
Context:|gateway-mode
 
Type:|string
 
Default:|Spectrum 2 Transport
 

	
 
This option configures the name showed in service discovery.
 

	
 
#### identity.type
 

	
 
Key | val
 
----|----
 
Description:|Configures type of transport as showed in service discovery.
 
Context:|gateway-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures type of transport as showed in service discovery. It is usually used by XMPP client to show proper
 
icons according to type of network. See [Disco Categories](http://xmpp.org/registrar/disco-categories.html#gateway) for
 
allowed values.
 

	
 
#### logging.config
 

	
 
Key | val
 
@@ -290,29 +244,6 @@ Default:|empty string
 

	
 
This option configures the password which is used by clients defined in service.admin_jid to use Admin Interface.
 

	
 
#### service.allowed_servers
 

	
 
Key | val
 
----|----
 
Description:|Configures list of servers from which users can connect and register Spectrum 2 transport.
 
Context:|gateway-mode
 
Type:|list of JIDs
 
Default:|empty list
 

	
 
Configures list of servers from which users can connect and register Spectrum 2 transport. This option is used together with
 
registration.enable_public_registration option. If registration.enable_public_registration is set to 0, you can use this option
 
as a white-list, to enable users from particular domain to use your Spectrum 2 instance, but disallow it to any other users.
 

	
 
Following part of config file disables public registrations and allows only users from xmpp.org and jabber.org to use this Spectrum 2 instance:
 

	
 
	[service]
 
	allowed_servers=xmpp.org
 
	allowed_servers=jabber.org
 
	
 
	[registration]
 
	enable_public_registration=0
 

	
 

	
 
#### service.backend
 

	
 
Key | val
 
@@ -350,29 +281,6 @@ Default:|0
 
This option configures port on which Spectrum 2 listens on for backends connections. If the value of this option is 0, then Spectrum 2
 
uses randomly generated port number.
 

	
 
#### service.cert
 

	
 
Key | val
 
----|----
 
Description:|Configures certificate to be used for SSL encryption in server-mode.
 
Context:|server-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures full path to PKCS#12 certificate which is used for SSL in server-mode. To find out, how to create
 
such certificate, please read [Using SSL in server mode](http://spectrum.im/documentation/configuration/server_ssl.html).
 

	
 
#### service.cert_password
 

	
 
Key | val
 
----|----
 
Description:|Configures password for certificate which is used for SSL encryption in server-mode.
 
Context:|server-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures password which is used to decrypt PKCS#12 certificate (if it is encrypted). For more information about SSL
 
with Spectrum 2, read service.cert option description.
 

	
 
#### service.group
 

	
 
@@ -427,71 +335,6 @@ Default:|/var/run/spectrum2/$jid.pid
 
This option configures path to file when Spectrum 2 stores its process ID. This file is later used by `spectrum2_manager` to determine,
 
if this particular Spectrum 2 instance runs.
 

	
 
#### service.port
 

	
 
Key | val
 
----|----
 
Description:|Configures port on which Spectrum listens to in server-mode or to which connects in gateway-mode.
 
Context:|server-mode and gateway-mode
 
Type:|integer
 
Default:|0
 

	
 
This option configures port on which Spectrum listens to in server-mode or to which connects in gateway-mode. In server-mode
 
the default port for XMPP servers is 5222, so you should use this port. In gateway-mode, you have to at first configure your
 
server to allow Spectrum 2 to connect it as its component. On many servers, the default component port is 5347, but this option
 
depends on particular XMPP server and its configuration.
 

	
 
#### service.server
 

	
 
Key | val
 
----|----
 
Description:|Configures hostname or IP address of server to which Spectrum 2 connects to.
 
Context:|gateway-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures hostname or IP address of server to which Spectrum 2 connects to. It is used only in gateway-mode and
 
you should configure it to point to hostname or IP of your XMPP server.
 

	
 
#### service.server_mode
 

	
 
Key | val
 
----|----
 
Description:|Configures if Spectrum 2 works in server mode or gateway mode
 
Context:|server-mode and gateway-mode
 
Type:|boolean
 
Default:|0
 

	
 
If this option is true, Spectrum 2 works in server-mode and acts as standalone server.
 

	
 
User then logins legacy networks by logging XMPP account like this one: `my_msn_name%hotmail.com@msn.domain.tld`.
 

	
 
*Advantages:*
 
* Passwords are not stored on server.
 
* Roster synchronization is easy, because Spectrum 2 acts as normal server.
 
* If you want to use Spectrum 2 as wrapper between different networks, you don't need database or Jabber server as another layer.
 
* Using SRV records you can easily run Spectrum 2 on different machines to scale it.
 

	
 
*Disadvantages:*
 

	
 
* Clients have to support more accounts to connect more legacy networks (Therefore they will need have to use more TCP connections).
 

	
 
If this option is false, Spectrum 2 acts as normal XMPP component (gateway).
 

	
 
You then have to configure an external XMPP server (like Prosody or Ejabberd) to serve the subdomain you want to use for Spectrum 2 (for example "icq.domain.tld"). Spectrum 2 in gateway mode then connects the XMPP server as its component and users are able to find out "icq.domain.tld" in Service Discovery, register it and use it.
 

	
 
*Advantages:*
 
* Users can use more legacy networks using single XMPP account (and using single TCP connection).
 
* It's easy to extend existing XMPP servers using gateway mode.
 

	
 
*Disadvantages:*
 
* Passwords are stored (even in encrypted form) on server.
 
* Roster (contact list) synchronization can be problematic, because it depends on the client user uses. This can be improved by usage of Remote Roster protoXEP.
 
* You have to setup XMPP server and use database even if you only want to use Spectrum 2 as a tool to connect legacy networks using XMPP protocol.
 

	
 

	
 

	
 

	
 
#### service.user
 

	
 
Key | val
documentation/frontends/frontends.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
## Spectrum 2 frontends and backends
 

	
 
Spectrum 2 supports multiple IM networks. Spectrum 2 distinguishes between **Frontend** and **Backend** networks.
 

	
 
If some network is supported as **Frontend**, it means that Spectrum 2 allows its users to use this network to communicate with other users using the **backend** network.
 

	
 
#### Example
 

	
 
If you for example use **Slack** as a frontend and **IRC** as a backend, the Spectrum 2 users can add Spectrum 2 to their Slack team, join the IRC network and communicate with their friends on IRC network.
 

	
 
This page contains the list of currently supported frontends with the basic information about them.
 

	
 
### How to change frontends
 

	
 
Frontends are switched in Spectrum 2 config file using the following option:
 

	
 
Section| Option| Value
 
-------|-------|------
 
service|frontend|Name of the frontend.
 

	
 
### List of frontends
 

	
 
Name| Supported network
 
----|-------------------
 
`xmpp`| XMPP (Jabber)
 
`slack`| Slack
documentation/frontends/xmpp.md
Show inline comments
 
new file 100644
 
---
 
layout: config
 
title: Spectrum 2
 
---
 

	
 
> **\[identity\]**
 
>
 
> * [category](#identitycategory)
 
> * [name](#identityname)
 
> * [type](#identitytype)
 
>
 
>
 
>
 
> **\[service\]**
 
>
 
> * [allowed_servers](#serviceallowedservers)
 
> * [cert](#servicecert)
 
> * [cert_password](#servicecertpassword)
 
> * [port](#serviceport)
 
> * [server](#serviceserver)
 
> * [server_mode](#serviceservermode)
 

	
 

	
 

	
 
## XMPP frontend Description
 

	
 
XMPP frontend allows users to use XMPP as a frontend network for Spectrum 2.
 

	
 
### Configuration
 

	
 
You have to choose this frontend in Spectrum 2 configuration file to use it:
 

	
 
	[service]
 
	frontend=xmpp
 

	
 

	
 
## Gateway mode and server mode
 

	
 
XMPP frontend can work in two modes: Gateway mode and Server mode. This chapter describes differences betweeen these two modes. If you want to find out how to configure Spectrum 2 to run in gateway or server mode, read the Configuration part of this documentation.
 

	
 
### Gateway mode
 

	
 
Gateway mode represents the classic way how XMPP gateway works. You have to configure an external XMPP server (like Prosody or Ejabberd) to serve the subdomain you want to use for Spectrum 2 (for example "icq.domain.tld"). Spectrum 2 in gateway mode then connects the XMPP server as its component and users are able to find out "icq.domain.tld" in Service Discovery, register it and use it.
 

	
 
**Advantages:**
 

	
 
* Users can use more legacy networks using single XMPP account (and using single TCP connection).
 
* It's easy to extend existing XMPP servers using gateway mode.
 

	
 
**Disadvantages:**
 

	
 
* Passwords are stored (even in encrypted form) on server.
 
* Roster (contact list) synchronization can be problematic, because it depends on the client user uses. This can be improved by usage of Remote Roster protoXEP.
 
* You have to setup XMPP server and use database even if you only want to use Spectrum 2 as a tool to connect legacy networks using XMPP protocol.
 

	
 
### Server mode
 

	
 
In server mode, Spectrum 2 behaves as standalone server. User then logins legacy networks by logging XMPP account like this one: "my_msn_name%hotmail.com@msn.domain.tld".
 

	
 
**Advantages:**
 

	
 
* Passwords are not stored on server.
 
* Roster synchronization is easy, because Spectrum 2 acts as normal server.
 
* If you want to use Spectrum 2 as wrapper between different networks, you don't need database or Jabber server as another layer.
 
* Using SRV records you can easily run Spectrum 2 on different machines to scale it.
 

	
 
**Disadvantages:**
 

	
 
* Clients have to support more accounts to connect more legacy networks (Therefore they will need have to use more TCP connections).
 

	
 
## XMPP frontend configuration variables
 

	
 
This chapter contains available configuration variables for XMPP frontend. Note that these are only XMPP frontend specific. For list of general configuration variables, check [Configuration file description](/documentation/configuration/config_file.html).
 

	
 
#### identity.category
 

	
 
Key | val
 
----|----
 
Description:|Configures disco#info identity category.
 
Context:|gateway-mode
 
Type:|string
 
Default:|gateway
 

	
 
This option configures disco#info identity category.
 

	
 
#### identity.name
 

	
 
Key | val
 
----|----
 
Description:|Configures the name showed in service discovery.
 
Context:|gateway-mode
 
Type:|string
 
Default:|Spectrum 2 Transport
 

	
 
This option configures the name showed in service discovery.
 

	
 
#### identity.type
 

	
 
Key | val
 
----|----
 
Description:|Configures type of transport as showed in service discovery.
 
Context:|gateway-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures type of transport as showed in service discovery. It is usually used by XMPP client to show proper
 
icons according to type of network. See [Disco Categories](http://xmpp.org/registrar/disco-categories.html#gateway) for
 
allowed values.
 

	
 
#### service.allowed_servers
 

	
 
Key | val
 
----|----
 
Description:|Configures list of servers from which users can connect and register Spectrum 2 transport.
 
Context:|gateway-mode
 
Type:|list of JIDs
 
Default:|empty list
 

	
 
Configures list of servers from which users can connect and register Spectrum 2 transport. This option is used together with
 
registration.enable_public_registration option. If registration.enable_public_registration is set to 0, you can use this option
 
as a white-list, to enable users from particular domain to use your Spectrum 2 instance, but disallow it to any other users.
 

	
 
Following part of config file disables public registrations and allows only users from xmpp.org and jabber.org to use this Spectrum 2 instance:
 

	
 
	[service]
 
	allowed_servers=xmpp.org
 
	allowed_servers=jabber.org
 
	
 
	[registration]
 
	enable_public_registration=0
 

	
 
#### service.cert
 

	
 
Key | val
 
----|----
 
Description:|Configures certificate to be used for SSL encryption in server-mode.
 
Context:|server-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures full path to PKCS#12 certificate which is used for SSL in server-mode. To find out, how to create
 
such certificate, please read [Using SSL in server mode](http://spectrum.im/documentation/configuration/server_ssl.html).
 

	
 
#### service.cert_password
 

	
 
Key | val
 
----|----
 
Description:|Configures password for certificate which is used for SSL encryption in server-mode.
 
Context:|server-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures password which is used to decrypt PKCS#12 certificate (if it is encrypted). For more information about SSL
 
with Spectrum 2, read service.cert option description.
 

	
 

	
 
#### service.port
 

	
 
Key | val
 
----|----
 
Description:|Configures port on which Spectrum listens to in server-mode or to which connects in gateway-mode.
 
Context:|server-mode and gateway-mode
 
Type:|integer
 
Default:|0
 

	
 
This option configures port on which Spectrum listens to in server-mode or to which connects in gateway-mode. In server-mode
 
the default port for XMPP servers is 5222, so you should use this port. In gateway-mode, you have to at first configure your
 
server to allow Spectrum 2 to connect it as its component. On many servers, the default component port is 5347, but this option
 
depends on particular XMPP server and its configuration.
 

	
 
#### service.server
 

	
 
Key | val
 
----|----
 
Description:|Configures hostname or IP address of server to which Spectrum 2 connects to.
 
Context:|gateway-mode
 
Type:|string
 
Default:|empty string
 

	
 
This option configures hostname or IP address of server to which Spectrum 2 connects to. It is used only in gateway-mode and
 
you should configure it to point to hostname or IP of your XMPP server.
 

	
 
#### service.server_mode
 

	
 
Key | val
 
----|----
 
Description:|Configures if Spectrum 2 works in server mode or gateway mode
 
Context:|server-mode and gateway-mode
 
Type:|boolean
 
Default:|0
 

	
 
If this option is true, Spectrum 2 works in server-mode and acts as standalone server.
 

	
 
User then logins legacy networks by logging XMPP account like this one: `my_msn_name%hotmail.com@msn.domain.tld`.
 

	
 
**Advantages:**
 

	
 
* Passwords are not stored on server.
 
* Roster synchronization is easy, because Spectrum 2 acts as normal server.
 
* If you want to use Spectrum 2 as wrapper between different networks, you don't need database or Jabber server as another layer.
 
* Using SRV records you can easily run Spectrum 2 on different machines to scale it.
 

	
 
**Disadvantages:**
 

	
 
* Clients have to support more accounts to connect more legacy networks (Therefore they will need have to use more TCP connections).
 

	
 
If this option is false, Spectrum 2 acts as normal XMPP component (gateway).
 

	
 
You then have to configure an external XMPP server (like Prosody or Ejabberd) to serve the subdomain you want to use for Spectrum 2 (for example "icq.domain.tld"). Spectrum 2 in gateway mode then connects the XMPP server as its component and users are able to find out "icq.domain.tld" in Service Discovery, register it and use it.
 

	
 
**Advantages:**
 

	
 
* Users can use more legacy networks using single XMPP account (and using single TCP connection).
 
* It's easy to extend existing XMPP servers using gateway mode.
 

	
 
**Disadvantages:**
 

	
 
* Passwords are stored (even in encrypted form) on server.
 
* Roster (contact list) synchronization can be problematic, because it depends on the client user uses. This can be improved by usage of Remote Roster protoXEP.
 
* You have to setup XMPP server and use database even if you only want to use Spectrum 2 as a tool to connect legacy networks using XMPP protocol.
 

	
 

	
documentation/index.md
Show inline comments
 
@@ -9,9 +9,7 @@ title: Spectrum 2
 

	
 
#### Installation
 

	
 
* [Debian/Ubuntu packages](installation/debian_ubuntu.html)
 
* [Fedora/RHEL/CentOS packages](installation/fedora_rhel.html)
 
* [Gentoo ebuild](installation/gentoo.html)
 
* [Installing using Docker](installation/docker.html)
 
* [Installing from source code](installation/from_source_code.html)
 

	
 
#### Tutorials
 
@@ -23,9 +21,15 @@ title: Spectrum 2
 
* [Configuration file description](configuration/config_file.html)
 
* [MySQL Support](configuration/mysql.html)
 
* [PostgreSQL Support](configuration/postgresql.html)
 
* [Using SSL in server mode](configuration/server_ssl.html)
 
* [Logging](configuration/logging.html)
 
* [Spectrum as bouncer](configuration/bouncer.html)
 

	
 
#### Frontends
 

	
 
* [Frontends overview](frontends/frontends.html)
 
* [XMPP Frontend](frontends/xmpp.html)
 
   * [Using SSL in server mode](configuration/server_ssl.html)
 
   * [Spectrum 2 as bouncer](configuration/bouncer.html)
 
* [Slack Frontend](frontends/slack.html)
 

	
 
#### Backends
 

	
documentation/installation/docker.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
## Install Docker
 

	
 
At first you have to install Docker. This is very well described on the official [Docker Installation page](https://docs.docker.com/v1.8/installation/).
 

	
 
## Pull the Spectrum 2 Docker image
 

	
 
To download Spectrum 2 Docker image to your system, just run following command:
 

	
 
	$ docker pull spectrum2/spectrum2
 

	
 
You can also update Spectrum 2 using this command later.
 

	
 
## Create directory for Spectrum 2 configuration files
 

	
 
Now you have to decide where to store the configuration files for Spectrum 2. We will use `/opt/spectrum2/` in our example:
 

	
 
	$ mkdir /opt/spectrum2
 

	
 
## Create configuration file
 

	
 
You can use following default configuration files as a starting place:
 

	
 
* [XMPP Frontend - gateway mode](https://github.com/hanzz/spectrum2/blob/spectrum/src/sample2_gateway.cfg)
 
* [XMPP Frontend - server mode](https://github.com/hanzz/spectrum2/blob/spectrum/src/sample.cfg)
 

	
 
Download the configuration file you chose into `/opt/spectrum` directory you have created earlier and edit it as you want. Check the documentation and tutorials for configuration examples.
 

	
 
Note that the configuration files must have `.cfg` file extension.
 

	
 
## Start Spectrum 2
 

	
 
To start Spectrum 2 on background using Docker, all you have to do is running following Docker command:
 

	
 
	$ docker run --name="spectrum2" -d -v /opt/spectrum2:/etc/spectrum2/transport spectrum2/spectrum2
 

	
 
It will start Spectrum 2 and load the configuration files from `/opt/spectrum`. It also gives the spawned container name `spectrum2`.
 

	
 
## Checking the Spectrum 2 logs
 

	
 
To check the Spectrum 2 logs, use following Docker command:
 

	
 
	$ docker logs spectrum2
 

	
 
## Stopping the Spectrum 2
 

	
 
To stop the Spectrum 2 container, use following Docker command:
 

	
 
	$ docker stop spectrum2
download/index.md
Show inline comments
 
@@ -7,12 +7,5 @@ title: Spectrum 2
 

	
 
Don't forget to check [Documentation](http://spectrum.im/documentation) and [Changelog](http://hanzz.github.com/libtransport/changelog) after downloading.
 

	
 
#### Spectrum 2
 

	
 
* [Debian/Ubuntu packages](http://spectrum.im/documentation/installation/debian_ubuntu.html)
 
* [Fedora/RHEL/CentOS packages](http://spectrum.im/documentation/installation/fedora_rhel.html)
 
* [Docker image](http://spectrum.im/documentation/installation/docker.html)
 
* [Spectrum 2.0-beta2 source code](https://github.com/downloads/hanzz/libtransport/spectrum-2.0.0-beta2.tar.gz)
 

	
 
#### Spectrum 1 - not maintained version
 

	
 
* [Spectrum 1.4.8 source code](https://github.com/downloads/hanzz/libtransport/spectrum-1.4.8.tar.gz)
index.md
Show inline comments
 
@@ -12,7 +12,7 @@ Spectrum 2 is an open source instant messaging transport.<br/><br/>
 
It allows users to chat together even when they are using different IM networks.<br/><br/>
 
It acts as a transport layer between the users as showed in the animation above.
 
<br/>
 
<a style="   position: absolute;bottom: 10px; right: 10px;" href="#">Read More</a>
 
<a style="   position: absolute;bottom: 10px; right: 10px;" href="/documentation/about.html">Read More</a>
 
</div>
 

	
 
<div style="position: relative;width: 250px; height:394px; float:left; margin-left: 40px; color: #222; background-color: #fff;border-radius: 2px;-moz-border-radius: 2px;-webkit-border-radius: 2px;  padding: 10px; margin: 0 3px; box-shadow: 0 0 10px rgba(0,0,0,.1);margin-left: 25px;">
 
@@ -35,7 +35,7 @@ It acts as a transport layer between the users as showed in the animation above.
 
<img alt="IRC" src="https://gci.copyleftgames.org/img/icons/irc.png" style="float:left;  margin-left:10px"/>
 
<img alt="Twitter" src="https://addons.cdn.mozilla.net/user-media/addon_icons/480/480584-64.png" style="float:left; margin-left:10px"/>
 
<div style="clear: both;"></div> 
 
<a style="   position: absolute;bottom: 10px; right: 10px;" href="#">Read More</a>
 
<a style="   position: absolute;bottom: 10px; right: 10px;" href="/documentation/about.html">Read More</a>
 
</div>
 

	
 
<div style="position: relative;width: 220px; height:394px; float:left; color: #222; background-color: #fff;border-radius: 2px;-moz-border-radius: 2px;-webkit-border-radius: 2px;  padding: 10px; margin: 0 3px; box-shadow: 0 0 10px rgba(0,0,0,.1);margin-left: 25px;">
0 comments (0 inline, 0 general)