How to build a Linux-powered smart home

Jitsi Meet

Jitsi Meet is a completely free, open source video conferencing program that you can connect to via a browser or smartphone app. 

You can use it right now by visiting and choosing a name for your virtual meeting (or indeed accepting one of the amusing ones the website randomly generates). 

There are no downloads or configuration required by clients, they just need to click a link which you can share by email from within the meeting room. Or they can dial in and connect with a PIN. Simple.

Screenshot of Jitsi Meet

Jitsi is free, easy to use, and its random name generation algorithm has been a constant source of amusement throughout these otherwise unamusing times. (Image credit: Jitsi Meet)

Obviously Jitsi’s free service has some limitations, but these will be gone when we self host our own Jitsi installation. 

You don’t need any particularly special hardware to do this, and thanks to the excellent Debian and Ubuntu packaging you don’t really need to do much in the way of configuration at all. 

You will need a domain name though; a free one from a dynamic DNS service such as DuckDNS or Dyndns will work. As you can imagine (and we’ll look at this in a moment if you can’t), under the bonnet Jitsi is a rather complicated affair. 

Not only does it have to wrangle the vagaries of streaming through NAT gateways (such as home routers), it also needs to keep all this secure with SSL, so if you cheat and use a self-signed certificate, your users will see scary warnings.

If you’re happy for you and your users to see these warnings (or brave enough to add an exception to your browser), and your users are all local, you can get away with using a bogus domain name and fudging users’ /etc/hosts files to resolve this to your machine. 

Or even just use IP addresses directly. But it’s probably easier in that case to have an in-person (where’s the fun in that?–Ed) conversation rather than involving the machines. 

If you have a domain, the install process can automatically generate Let’s Encrypt certificates, and then no one needs to see any security warnings.

A Jitsi install is in fact a collection of several components, all working in harmony to bring bright smiley faces closer in a world that grows ever more distant. 

Firstly, it relies on a web server (and some pretty wild JavaScript) to provide the web frontend. You can use Nginx or Apache here. Most of the software is written in Java, so keen-eyed dependency spotters will note the OpenJDK runtime making an appearance. 

The magic of connecting more than two participants is handled by Jitsi VideoBridge (JVB). This uses the XMPP (like Jabber) and WebRTC (like Google Meet) protocols to swiftly route video to call participants.

Deciding which participant is the speaker, and hence who users see ‘focussed’ on their screens, is handled by Jicofo (Jitsi Conference Focus). 

Note that this is as close to video processing as Jitsi gets – all the encoding and decoding is handled on the user side. 

At the heart of it all the Prosody XMPP server keeps all these components and users connected. You’ll find more information about these and everything else Jitsi in the Handbook.

What if it doesn’t work?

If you can join a room from multiple locations but don’t see any other participants and are stuck with a message telling you you’re the only one here, port forwarding is almost certainly the culprit. In some configurations the extra port 4443 will be necessary. 

Your next stop should be the log files. JVB and Jicofo’s are located in /var/log/jitsi and Prosody’s is in /var/log/prosody

It’s handy to delete these after a configuration change so that you don’t get confused by previous logs. 

Alternatively use tail to view the last few entries. After any configuration change, you’ll want to ensure that you restart all the services, which is a matter of:

$ sudo systemctl restart jitsi-videobridge2 jicofo prosody

You might want to add nginx to that list, particularly if you’ve changed anything that will affect the frontend, such as the authentication we added earlier. 

And if it all goes wrong you can purge all Jitsi data and configuration with:

$ sudo apt purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge2