]> jfr.im git - solanum.git/blame - doc/connecting-servers.rst
Fix comment in example configuration
[solanum.git] / doc / connecting-servers.rst
CommitLineData
5c914e40
VL
1Connecting servers
2==================
3
4Servers can be connected together to improve redundancy, distribute bandwidth,
5lower latency, and connect network services.
6
7This document is an introduction to connecting servers. It assumes you are
8already somewhat familiar with Solanum's configuration (if not, read
9:file:`ircd.conf.example`, and set up your own server by editing it
10and running Solanum).
11
12Solanum uses the TS6 protocol, and can only be connected with other servers
13using this protocol. We recommend you only connect Solanum with other Solanum
14instances.
15
16Unlike some other IRCd implementations, all connections are reciprocal in
17Solanum, which means a single configuration block is used for both incoming
18and outgoing connections.
19Additionally, the same ports are used for server and client connections.
20
21Creating servers
22----------------
23
24If you already have a server running, copy its configuration to a new machine,
25and edit ``serverinfo`` for the new server. In particular, you must change the
26``name`` and ``sid``, but keep the same ``network_name``.
27We recommend you keep both configurations in sync using some external
28configuration management systems, so server configurations do not drift apart
29over time, as you change them.
30
31For each of the two servers, you must create a ``connect`` block to represent
32the connection with the other server. For example, if you have servers A and B
33respectively at a.example.org and b.example.org, use respectively::
34
35 serverinfo {
36 name = "a.example.org";
37 // ...
38 };
39
40 connect "b.example.org" {
41 host = "203.0.113.2";
42 port = 6666;
43
44 send_password = "password";
45 accept_password = "anotherpassword";
46
47 flags = topicburst, autoconn;
48
49 class = "server";
50 };
51
52and::
53
54 serverinfo {
55 name = "b.example.org";
56 // ...
57 };
58
59 connect "a.example.org" {
60 host = "203.0.113.1";
61 port = 6666;
62
63 send_password = "anotherpassword";
64 accept_password = "password";
65
66 flags = topicburst, autoconn;
67
68 class = "server";
69 };
70
71Note the reversed passwords.
72
73The ports should be any of the ports defined in a ``listen {}`` block of the
74other server.
75
76The ``autoconn`` flag indicates a server should automatically connect using
77this ``connect {}`` block. At least one of the two servers should have it,
78or the servers won't try to connect.
79
80If you are connecting servers over an unencrypted link, you should use SSL/TLS
81for the connection; see :file:`reference.conf`.
82
83
84Connecting services
85-------------------
86
87In addition to regular servers, you can also connect service packages such
88as atheme-services.
89
90These services typically do not accept incoming connections, and connect to
91one of the existing servers of the network.
92
93To allow connections from such a service server, you should create
94a new ``connect {}`` block for this package, on the server the services
95will connect to::
96
97 connect "services.example.org" {
98 host = "localhost";
99 port = 6666;
100
101 send_password = "password";
102 accept_password = "anotherpassword";
103
104 flags = topicburst; // No autoconn, services don't accept incoming connections
105
106 class = "server";
107 };
108
109And create the appropriate config in your services' configuration so that
110they connect to your server on the configured port, and from the configured
111hostname.
112
113For example, with atheme::
114
115 loadmodule "modules/protocol/charybdis";
116
117 uplink "a.example.org" {
118 host = "localhost";
119 port = 6666;
120 send_password = "anotherpassword";
121 receive_password = "password"
122 };
123
124Finally, you must configure all servers in your network to recognize the
125services server::
126
127 service {
128 name = "services.example.org";
129 };