summaryrefslogtreecommitdiff
path: root/jitsi.html
blob: ad15404f854b08641b99148ef9251520c87b6893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!-- <!DOCTYPE html> -->
<html lang="en">
  <head>
    <title>Jitsi Video Chat &ndash; LandChad.net</title>
    <meta charset="utf-8" />
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="alternate" type="application/rss+xml" title="Land Chad RSS" href="/rss.xml" />
  </head>
  <body>
    <header><h1>Jitsi Video Chat</h1></header>
    <nav></nav>
    <main>
        <img src="pix/jitsi.svg" alt="Jitsi" class=titleimg>
      <p>
      <dfn>Jitsi</dfn> is a set of open-source projects that allows you to easily build and deploy secure video conferencing solutions.
      </p>
      <p>
        Is really easy to install, and also a really good private, federated and libre alternative to Zoom or other video conferencing software.
        You can create calls just by typing the URL, and loging-in is not necessary.
      </p>

      <h2>Dependencies and Installation</h2>

      <p>First, install some dependencies:</p>

      <pre><code>apt install gpg apt-transport-https nginx python3-certbot-nginx</code></pre>

      <p>Jitsi has its own package repository, so let's add it.</p>

      <pre class=wide><code>curl https://download.jitsi.org/jitsi-key.gpg.key | gpg --dearmor &#62; /usr/share/keyrings/jitsi-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/jitsi-keyring.gpg] https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list
apt update -y</code></pre>

      <p>
        Ok. So now we can install Jitsi, but before we do that, let's setup the firewall <code>ufw</code>, in case you
        have it enabled, and the SSL certificate.
      </p>

      <h2>Enable Required Ports</h2>

      <p>If you are using <a href="ufw.html">ufw</a> or another firewall, there are several ports we need to ensure are open:</p>
      <pre><code>ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 10000/udp
ufw allow 3478/udp
ufw allow 5349/tcp
ufw enable</code></pre>

      <p>For your information, these allow the following:</p>

      <ul>
        <li>80 TCP &ndash; Certbot.</li>
        <li>443 TCP &ndash; General access to Jitsi Meet.</li>
        <li>10000 UDP &ndash; General network video/audio communications.</li>
        <li>3478 UDP &ndash; Quering the stun server (coturn, optional, needs config.js change to enable it).</li>
        <li>
          5349 TCP &ndash; Fallback network video/audio communications over TCP (when UDP is blocked for example), served by coturn.
        </li>
      </ul>

      <h2>SSL certificate</h2>

      <p>
        I'll be using <a href="./certbot.html" target="blank">certbot</a> and
        <a href="./nginx.html" target="blank">Nginx</a> to generate a certificate
        for the Jitsi subdomain to allow encrypted connections.
      </p>

      <pre><code>certbot --nginx certonly -d <strong>meet.example.org</strong></code></pre>

      <p>
      We will not create an Nginx config file for Jitsi because the Jitsi package we will be installing will do that automatically.
      </p>

      <h2>Installation</h2>

      <p>To begin the installation process, just run:</p>
      <pre><code>apt install jitsi-meet</code></pre>

      <p>
        It will ask you for your <code><strong>hostname</strong></code
        >; there you'll need to input the subdomain you have just added to Nginx, like
        <code><strong>meet.example.org</strong></code>.
      </p>

      <p>For the SSL certificate, choose <code>I want to use my own certificate</code>.</p>

      <p>
        When it ask you for the certification key and cert files, input
        <code>/etc/letsencrypt/live/<strong>meet.example.org</strong>/privkey.pem</code> and
        <code>/etc/letsencrypt/live/<strong>meet.example.org</strong>/fullchain.pem</code> respectively.
      </p>

      <h2>Using Jitsi</h2>

      <img src="pix/jitsi-01.webp" alt="Jitsi once installed">

      <p>Jitsi can be used in a browser by then just going to <code>meet.example.org</code>.</p>

      <p>Note that there are also Jitsi clients for all major platforms:</p>

      <ul>
          <li><a href="https://desktop.jitsi.org/Main/Download.html">Desktop</a> (Windows, MacOS, GNU/Linux)</li>
          <li>Android (<a href="https://f-droid.org/en/packages/org.jitsi.meet/">F-Droid</a> and <a href="https://play.google.com/store/apps/details?id=org.jitsi.meet">Google Play</a>)</li>
          <li><a href="https://apps.apple.com/us/app/jitsi-meet/id1165103905">iPhone/iOS</a></li>
      </ul>

      <p>
      <strong>When using a Jitsi app for the first time, remember to go to the "Settings" menu and change your server name to the Jitsi site you just created.</strong>
      </p>

      <p>When you create a video chatroom, its address will appear as <code><strong>meet.example.org/yourvideochatname</strong></code> and can be shared as such.</p>

      <h2>Security</h2>

      <p>
      By default, anyone who has access to <strong>meet.example.org</strong> will be able to create a chatroom. You probably don't want that, so you'll need to set up some authentication. The simplest option is to handle authentication through the local <a href="./prosody.html">Prosody</a> user database.
      </p>

      <h3>Prosody configuration</h3>
      <p>
      First, we need to enable password authentication in <a href="./prosody.html">Prosody</a>. Edit <code>/etc/prosody/conf.avail/<strong>meet.example.org</strong>.cfg.lua</code>, and locate this block:
        <pre><code>VirtualHost "<strong>meet.example.org</strong>"
    authentication = "anonymous"</code></pre>
      And change the authentication mode from <code>"anonymous"</code> to <code>"internal_hashed"</code>.
      </p>
      <p>
      Then, to enable guests to login and join your chatrooms, add the following block <strong>after</strong> the one you just edited:
      <pre><code>VirtualHost "guest.<strong>meet.example.org</strong>"
    authentication = "anonymous"
    c2s_require_encryption = false</code></pre>
      </p>

      <h3>Jitsi Meet configuration</h3>
      <p>
      Next, in <code>/etc/jitsi/meet/<strong>meet.example.org</strong>-config.js</code>, uncomment the following line:
      <pre><code>var config = {
    hosts: {
        // anonymousdomain: 'guest.jitsi-meet.example.com',
    },
}
</code></pre>
      And change <code>'guest.jitsi-meet.example.com'</code> to <code>'guest.<strong>meet.example.org</strong>'</code>.
      </p>

      <h3>Jicofo configuration</h3>
      <p>
      Finally, we configure Jicofo to only allow the creation of conferences when the request is coming from an authenticated user. To do so, add the following <code>authentication</code> section to <code>/etc/jitsi/jicofo/jicofo.conf</code>:
      <pre><code>jicofo {
  authentication: {
    enabled: true
    type: XMPP
    login-url: <strong>meet.example.org</strong>
 }</code></pre>
      </p>

      <h3>Create users in Prosody and restart the services</h3>
      <p>
      You now need to register some users in <a href="./prosody.html">Prosody</a>, you can do so manually using <code>prosodyctl</code>:
      <pre><code>prosodyctl register &ltusername&gt <strong>meet.example.org</strong> &ltpassword&gt</code></pre>
      </p>
      <p>
      Finally, restart <code>prosody</code>, <code>jicofo</code>, and <code>jitsi-videobridge2</code>:
      <pre><code>systemctl restart prosody
systemctl restart jicofo
systemctl restart jitsi-videobridge2</code></pre>
      </p>

      <h2>More info</h2>

      <p>
        This article is based on <a href="https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-quickstart" target="blank">the original documentation</a>. There you can find more details and configurations.
      </p>

      <ul>
        <li>Written by <a href="https://josefabio.com" target="blank">Jose Fabio.</a> Donate Monero: <code class="crypto">484RLdsXQCDGSthNatGApRPTyqcCbM3PkM97axXezEuPZppimXmwWegiF3Et4BHBgjWR7sVXuEUoAeVNpBiVznhoDLqLV7j</code> <a href="https://josefabio.com/figures/monero.jpg" class="crypto" target="blank">[QR]</a></li>
        <li>Edited and revised by <a href="https://lukesmith.xyz">Luke</a>.</li>
      </ul>
    </main>

    <footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="donate-bitcoin.html"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="donate-monero.html"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer>
  </body>
</html>