WIP: Ports for installing Jitsi Meet on FreeBSD

I’m working on creating ports for Jitsi Meet server and it’s dependencies (jicofo & videobridge) using the manual install steps as a guide. My overall goal is to allow FreeBSD users to install a Jitsi Meet server with a single command pkg install jitsi-server.

Progress can be followed at https://github.com/tuaris/freebsd-jitsi-meet. Completed so far is getting jicofo & videobridge to build successfully. Remaining work on the deps is to get the install targets and rc.d scripts written. Once that’s complete I’ll move on to working on the jitsi-meet server port.

I’d really like this to become officially supported by the Jitsi community.

1 Like

I apologize for bumping this back to the top with a reply, but it doesn’t seem possible to edit a post. I wanted to make an update on status.

The jitsi-meet server port is building correctly from source on FreeBSD and it’s creating a local offline cache of the npm dependencies (being able to build offline is a requirement. Poudriere, the tool used to bulk build the ports tree in a reproducible way, disallows Internet access). It was tricky to get it working due to the node-sass dependency. node-sass wants to build it’s own copy of libsass instead of using the system one. This makes me a bit uncomfortable, but it works for now. Maybe I might split out node-sass as a separate dependent port that will be installed globally (if that’s even possible with Node/NPM).

There is one issue I can’t work out. Even though I’m passing in the ‘–offline’ flag to npm, it still attempts to download the binary first. Not sure why it’s doing that, but it’s fine since it does fallback automatically to building from source when there is no Internet connection.

Next I will move on to creating the offline maven cache archives for the other two components ( jicofo & videobridge). Once that’s complete I will begin work on the install targets and rc.d scripts for all three items.

Hi tuaris

I have added a functional version of jitsi-meet and basic dependencies to FreeBSD ports tree. Take a look at ports tree of following apps

net-im/jicofo
net-im/jitsi-videobridge
www/jitsi-meet

Also, you can search info about it at http://www.freshports.org

Btw, I tested them and it works great on FreeBSD. I tested it on FreeBSD 11.3-amd64 and 12.1-amd64

Greetings
ACM

Wow, thats awesome. Thanks!

Hi jacardenasm and tuaris!

Thank you both for your work on this port. This is just so great and very important for FreeBSD imho. However I’m having trouble running videobridge and/or jicofo on a vanilla FreeBSD 21.-amd64 system. After a successful build (thanks to LLVM80 it takes about 3-4 hrs on my system ;() Both ports report (/var/log/jicofo.log; /var/log/jitsi-videobdrige.log):

Invalid maximum heap size: -Xmx
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Don’t know what to do about it. Do you have any idea? Thanks a lot!

btw: Using jicofo.conf.sample and videobridge.conf.sample

Best DD

I haven’t tested it myself yet, but a quick glance at the rc.d script it looks the VIDEOBRIDGE_MAX_MEMORY variable might be missing from your config?

As soon as I can test it out, I’ll post my results.

I wasn’t able to run into the problem you are having but I did come across a small mismatch in the rc script that may or may not be causing your issue.

The startup scripts are expecting to find the conf files under /usr/local/etc/jicofo.conf and /usr/local/etc/jitsi/jitsi-videobridge.conf, where as the respective ports are placing them under /usr/local/etc/jitsi/jicofo/jicofo.conf and /usr/local/etc/jitsi/videobridge/jitsi-videobridge.conf.

Perhaps this is a typo @jacardenasm?

I was able to workaround that by doing:

sysrc jicofo_env_file="/usr/local/etc/jitsi/jicofo/jicofo.conf" jitsi_videobridge_env_file="/usr/local/etc/jitsi/videobridge/jitsi-videobridge.conf"

A tip for @dingensdongens. You can avoid having to build LLVM from source by just installing the Maven dependency from packages:

pkg install -y maven

That will pull in everything you need to build jitsi-videobridge and jicofo from the ports tree.

Another tip if your using net-im/prosody. Add Include "conf.d/*.cfg.lua" to the bottom of /usr/local/etc/prosody/prosody.cfg.lua and drop in your Jitsi configuration in /usr/local/etc/prosody/conf.d/jitsi.example.cfg.lua

VirtualHost "jitsi.example.com"
    authentication = "anonymous"
    ssl = {
        key = "/var/db/prosody/jitsi.example.com.key";
        certificate = "/var/db/prosody/jitsi.example.com.crt";
    }
    modules_enabled = {
        "bosh";
        "pubsub";
    }
    c2s_require_encryption = false
	
VirtualHost "auth.jitsi.example.com"
    ssl = {
        key = "/var/db/prosody/jitsi.example.com.key";
        certificate = "/var/db/prosody/jitsi.example.com.crt";
    }
    authentication = "internal_plain"
	
	admins = { "focus@auth.jitsi.example.com" }
	
Component "conference.jitsi.example.com" "muc"
Component "jitsi-videobridge.jitsi.example.com"
    component_secret = "YOURSECRET1"
Component "focus.jitsi.example.com"
    component_secret = "YOURSECRET2"

Finally, the Prosody port complains about a missing pidfile option in the configuration. I’ve pinged the port maintainer about that. Hopefully he can fix it. Until then add the option into the main config file (/usr/local/etc/prosody/prosody.cfg.lua) before any VirtualHost sections. I added mine around line 129

-- FreeBSD:
--   Please, don't change this option since /var/run/prosody/
--   is one of the few directories Prosody is allowed to write to
--
pidfile = "/var/run/prosody/prosody.pid";

Besides these small glitches I was able to get Prosody, jitsi-videobridge, and jicofo running and talking to each other. I haven’t gotten as far as setting up www/jitsi-meet and Apache/NGINX. I’ll try that later.

Hi dingensdongens

It seems like this patch file (https://reviews.freebsd.org/D14453) was not applied to /etc/rc.subr. It will add {name}_env_file feature to your system. it is used by jicofo/jitsi-videobridge rc script

Greetings

Hi tuaris

I have committed a change to jicofo/jitsi-videobridge ports fixing configuration path. Thanks for request me about that

Greetings

Thank you guys so much!!! Everything is working perfectly thanks to your advice and generous work. I’m so happy and I hope that maybe other developers feel encouraged by your work and help out porting JIGASI + JIBRI to make Jitsi complete on FreeBSD.

Thanks!