|
@@ -0,0 +1,228 @@
|
|
1
|
+# Server Installation for jitmeet
|
|
2
|
+
|
|
3
|
+This describes configuring a server `jitmeet.example.com`. You will nedd to
|
|
4
|
+change references to that to match your host, and generate some passwords for
|
|
5
|
+`YOURSECRET1` and `YOURSECRET2`.
|
|
6
|
+
|
|
7
|
+There are also some complete [example config files](https://www.dropbox.com/sh/jgp4s8kp6xuyubr/5FACgJmqLD) available, mentioned in each section.
|
|
8
|
+
|
|
9
|
+## Install prosody and otalk modules
|
|
10
|
+```sh
|
|
11
|
+echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
|
|
12
|
+wget --no-check-certificate https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
|
|
13
|
+apt-get update
|
|
14
|
+apt-get install prosody-trunk
|
|
15
|
+apt-get install git lua-zlib lua-sec-prosody lua-dbi-sqlite3 liblua5.1-bitop-dev liblua5.1-bitop0
|
|
16
|
+git clone https://github.com/andyet/otalk-server.git
|
|
17
|
+cd otalk-server
|
|
18
|
+cp -r mod* /usr/lib/prosody/modules
|
|
19
|
+```
|
|
20
|
+
|
|
21
|
+## Configure prosody
|
|
22
|
+Modify the config file in `/etc/prosody/prosody.cfg.lua` (see also the example config file):
|
|
23
|
+
|
|
24
|
+- modules to enable/add: compression, bosh, smacks3, smacks2, carbons, mam, lastactivity, offline, pubsub, adhoc, websocket, http_altconnect
|
|
25
|
+- comment out: `c2s_require_encryption = true`, and `s2s_secure_auth = false`
|
|
26
|
+- change `authentication = "internal_hashed"`
|
|
27
|
+- add this:
|
|
28
|
+```
|
|
29
|
+daemonize = true
|
|
30
|
+cross_domain_bosh = true;
|
|
31
|
+storage = {archive2 = "sql2"}
|
|
32
|
+sql = { driver = "SQLite3", database = "prosody.sqlite" }
|
|
33
|
+default_archive_policy = "roster"
|
|
34
|
+```
|
|
35
|
+- configure your domain by editing the example.com virtual host section section:
|
|
36
|
+```
|
|
37
|
+VirtualHost "jitmeet.example.com"
|
|
38
|
+authentication = "anonymous"
|
|
39
|
+ssl = {
|
|
40
|
+ key = "/var/lib/prosody/jitmeet.example.com.key";
|
|
41
|
+ certificate = "/var/lib/prosody/jitmeet.example.com.crt";
|
|
42
|
+}
|
|
43
|
+```
|
|
44
|
+- and finally configure components:
|
|
45
|
+```
|
|
46
|
+Component "conference.jitmeet.example.com" "muc"
|
|
47
|
+Component "jitsi-videobridge.jitmeet.example.com"
|
|
48
|
+ component_secret = "YOURSECRET1"
|
|
49
|
+```
|
|
50
|
+
|
|
51
|
+Generate certs for the domain:
|
|
52
|
+```sh
|
|
53
|
+prosodyctl cert generate jitmeet.example.com
|
|
54
|
+```
|
|
55
|
+
|
|
56
|
+Restart prosody XMPP server with the new config
|
|
57
|
+```sh
|
|
58
|
+prosodyctl restart
|
|
59
|
+```
|
|
60
|
+
|
|
61
|
+## Install nginx
|
|
62
|
+```sh
|
|
63
|
+apt-get install nginx
|
|
64
|
+```
|
|
65
|
+
|
|
66
|
+Add nginx config for domain in `/etc/nginx/nginx.conf`:
|
|
67
|
+```
|
|
68
|
+tcp_nopush on;
|
|
69
|
+types_hash_max_size 2048;
|
|
70
|
+server_names_hash_bucket_size 64;
|
|
71
|
+```
|
|
72
|
+
|
|
73
|
+Add a new file `jitmeet.example.com` in `/etc/nginx/sites-available` (see also the example config file):
|
|
74
|
+```
|
|
75
|
+server {
|
|
76
|
+ listen 80;
|
|
77
|
+ server_name jitmeet.example.com;
|
|
78
|
+ # set the root
|
|
79
|
+ root /srv/jitmeet.example.com;
|
|
80
|
+ index index.html;
|
|
81
|
+ location ~ ^/([a-zA-Z0-9]+)$ {
|
|
82
|
+ rewrite ^/(.*)$ / break;
|
|
83
|
+ }
|
|
84
|
+ # BOSH
|
|
85
|
+ location /http-bind {
|
|
86
|
+ proxy_pass http://localhost:5280/http-bind;
|
|
87
|
+ proxy_set_header X-Forwarded-For $remote_addr;
|
|
88
|
+ proxy_set_header Host $http_host;
|
|
89
|
+ }
|
|
90
|
+ # xmpp websockets
|
|
91
|
+ location /xmpp-websocket {
|
|
92
|
+ proxy_pass http://localhost:5280;
|
|
93
|
+ proxy_http_version 1.1;
|
|
94
|
+ proxy_set_header Upgrade $http_upgrade;
|
|
95
|
+ proxy_set_header Connection "upgrade";
|
|
96
|
+ proxy_set_header Host $host;
|
|
97
|
+ tcp_nodelay on;
|
|
98
|
+ }
|
|
99
|
+}
|
|
100
|
+```
|
|
101
|
+
|
|
102
|
+Add link for the added configuration
|
|
103
|
+```sh
|
|
104
|
+cd /etc/nginx/sites-enabled
|
|
105
|
+ln -s ../sites-available/jitmeet.example.com jitmeet.example.com
|
|
106
|
+```
|
|
107
|
+
|
|
108
|
+## Fix firewall if needed
|
|
109
|
+```sh
|
|
110
|
+ufw allow 80
|
|
111
|
+ufw allow 5222
|
|
112
|
+```
|
|
113
|
+
|
|
114
|
+## Install videobridge
|
|
115
|
+```sh
|
|
116
|
+wget https://download.jitsi.org/jitsi-videobridge/linux/jitsi-videobridge-linux-{arch-buildnum}.zip
|
|
117
|
+unzip jitsi-videobridge-linux-{arch-buildnum}.zip
|
|
118
|
+```
|
|
119
|
+
|
|
120
|
+Install JRE if missing:
|
|
121
|
+```
|
|
122
|
+apt-get install default-jre
|
|
123
|
+```
|
|
124
|
+
|
|
125
|
+In the user home that will be starting the jitsi video bridge create `.sip-communicator` folder and add the file `sip-communicator.properties` with one line in it:
|
|
126
|
+```
|
|
127
|
+org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
|
|
128
|
+```
|
|
129
|
+
|
|
130
|
+Start the videobrdige with:
|
|
131
|
+```sh
|
|
132
|
+./jvb.sh --host=localhost --domain=jitmeet.example.com --port=5347 --secret=YOURSECRET1 &
|
|
133
|
+```
|
|
134
|
+Or autostart it by adding the line in `/etc/rc.local`:
|
|
135
|
+```sh
|
|
136
|
+/bin/bash /root/jitsi-videobridge-linux-{arch-buildnum}/jvb.sh --host=localhost --domain=jitmeet.example.com --port=5347 --secret=YOURSECRET1 </dev/null >> /var/log/jvb.log 2>&1
|
|
137
|
+```
|
|
138
|
+
|
|
139
|
+Checkout and configure jitmeet:
|
|
140
|
+```sh
|
|
141
|
+cd /srv
|
|
142
|
+git clone https://github.com/jitsi/jitmeet.git
|
|
143
|
+mv jitmeet/ jitmeet.example.com
|
|
144
|
+```
|
|
145
|
+
|
|
146
|
+Edit host names in `/srv/jitmeet.example.com/config.js` (see also the example config file):
|
|
147
|
+```
|
|
148
|
+var config = {
|
|
149
|
+ hosts: {
|
|
150
|
+ domain: 'jitmeet.example.com',
|
|
151
|
+ muc: 'conference.jitmeet.example.com',
|
|
152
|
+ bridge: 'jitsi-videobridge.jitmeet.example.com'
|
|
153
|
+ },
|
|
154
|
+ useNicks: false,
|
|
155
|
+ bosh: '//jitmeet.example.com/http-bind' // FIXME: use xep-0156 for that
|
|
156
|
+ desktopSharing: 'ext', // Desktop sharing method. Can be set to 'ext', 'webrtc' or false to disable.
|
|
157
|
+ chromeExtensionId: 'diibjkoicjeejcmhdnailmkgecihlobk', // Id of desktop streamer Chrome extension
|
|
158
|
+ minChromeExtVersion: '0.1' // Required version of Chrome extension
|
|
159
|
+};
|
|
160
|
+```
|
|
161
|
+
|
|
162
|
+Restart nginx to get the new configuration:
|
|
163
|
+```sh
|
|
164
|
+invoke-rc.d nginx restart
|
|
165
|
+```
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+## Install [Turn server](https://github.com/andyet/otalk-server/tree/master/restund)
|
|
169
|
+```sh
|
|
170
|
+apt-get install make gcc
|
|
171
|
+wget http://creytiv.com/pub/re-0.4.7.tar.gz
|
|
172
|
+tar zxvf re-0.4.7.tar.gz
|
|
173
|
+ln -s re-0.4.7 re
|
|
174
|
+cd re-0.4.7
|
|
175
|
+sudo make install PREFIX=/usr
|
|
176
|
+cd ..
|
|
177
|
+wget http://creytiv.com/pub/restund-0.4.2.tar.gz
|
|
178
|
+wget https://raw.github.com/andyet/otalk-server/master/restund/restund-auth.patch
|
|
179
|
+tar zxvf restund-0.4.2.tar.gz
|
|
180
|
+cd restund-0.4.2/
|
|
181
|
+patch -p1 < ../restund-auth.patch
|
|
182
|
+sudo make install PREFIX=/usr
|
|
183
|
+cp debian/restund.init /etc/init.d/restund
|
|
184
|
+chmod +x /etc/init.d/restund
|
|
185
|
+cd /etc
|
|
186
|
+wget https://raw.github.com/andyet/otalk-server/master/restund/restund.conf
|
|
187
|
+```
|
|
188
|
+
|
|
189
|
+Configure addresses and ports as desired, and the password to be configured in prosody:
|
|
190
|
+```
|
|
191
|
+realm jitmeet.example.com
|
|
192
|
+# share this with your prosody server
|
|
193
|
+auth_shared YOURSECRET2
|
|
194
|
+
|
|
195
|
+# modules
|
|
196
|
+module_path /usr/lib/restund/modules
|
|
197
|
+turn_relay_addr [turn ip address]
|
|
198
|
+```
|
|
199
|
+
|
|
200
|
+Configure prosody to use it in `/etc/prosody/prosody.cfg.lua`. Add to your virtual host:
|
|
201
|
+```
|
|
202
|
+turncredentials_secret = "YOURSECRET2";
|
|
203
|
+turncredentials = {
|
|
204
|
+ { type = "turn", host = "turn.address.ip.configured", port = 3478, transport = "tcp" }
|
|
205
|
+}
|
|
206
|
+```
|
|
207
|
+
|
|
208
|
+Reload prosody if needed
|
|
209
|
+```
|
|
210
|
+prosodyctl reload
|
|
211
|
+telnet localhost 5582
|
|
212
|
+module:reload("turncredentials", "jitmeet.example.com")
|
|
213
|
+quit
|
|
214
|
+```
|
|
215
|
+
|
|
216
|
+## Running behind NAT
|
|
217
|
+In case of videobridge being installed on a machine behind NAT, add the following extra lines to the file `~/.sip-communicator/sip-communicator.properties` (in the home of user running the videobridge):
|
|
218
|
+```
|
|
219
|
+org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=<Local.IP.Address>
|
|
220
|
+org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=<Public.IP.Address>
|
|
221
|
+```
|
|
222
|
+
|
|
223
|
+So the file should look like this at the end:
|
|
224
|
+```
|
|
225
|
+org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
|
|
226
|
+org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=<Local.IP.Address>
|
|
227
|
+org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=<Public.IP.Address>
|
|
228
|
+```
|