I had the idea today to spin up my own private Jitsi Meet and share it using zrok for easy private video calling.
It was really easy to get Jitsi up and running locally using docker compose by following these instructions. I used the default ports 8000 and 8443.
I then I tried zrok share public localhost:8000 and it almost worked. I was able to get the Jitsi Meet main page at http://localhost:8000 and https://localhost:8443. I was also able to get to the main page using https://<TOKEN>.share.zrok.io, but when I attempted to join a call I got the following error from Jitsi
So, probably I should rather share HTTPS rather than HTTP. I did try that, i.e. zrok share public https://localhost:8443, but nothing seemed to work at all - I got an error like this in the zrok console,
β[ 31.889] ERROR zrok/endpoints/proxy.newReverseProxy.func2: error proxying: tls: failed to verify certificate: x509: certificate relies on legacy Common β
βName field, use SANs instead
I'm woefully underequipped to work this out. Of course I don't expect anyone here to be a Jitsi expert, but maybe someone has got a few hints that could guide me here. Or maybe someone has experience with zrok + another video calling stack that I could try as an alternative.
I'm not a Jitsi expert. I set it up following those instructions and I can join the meeting and got the same error as you...
I opened dev tools BEFORE joining the meeting (otherwise I saw nothing) and then I had a hint:
strophe.stream-management.js:224 WebSocket connection to 'wss://localhost:8443/xmpp-websocket?room=automaticenvironmentsaccelerateevenly' failed:
This led me to finding the PUBLIC_URL setting for jitsi... Since it wants a reliable URL I then needed to use zrok reserve to make a share that never changes:
zrok reserve public https://localhost:8443 --unique-name nameThisWhatever
With a reserved share, i could then share it:
zrok share reserved nameThisWhatever
With a reserved share I could update the jitsi .env file:
Now unfortunately, when I did that and when I'd gotten by all the hurdles, I still ran into what I think might be a zrok issue protocol error: received DATA before a HEADERS frame:
[ 4.165] INFO main.(*shareReservedCommand).run: [] -> GET /structuralhierarchieswrapyesterday
[ 5.276] INFO main.(*shareReservedCommand).run: [] -> GET /libs/excalidraw-assets/vendor-75e22c20f1d603abdfc9.js
[ 7.755] INFO main.(*shareReservedCommand).run: [] -> GET /xmpp-websocket?room=structuralhierarchieswrapyesterday
2024/07/31 12:20:39.794 INFO protocol error: received DATA before a HEADERS frame
[ 7.757] ERROR zrok/endpoints/proxy.newReverseProxy.func2: error proxying: stream error: stream ID 5; PROTOCOL_ERROR
[ 7.766] INFO main.(*shareReservedCommand).run: [] -> GET /pwa-worker.js
I'll see if @michael.quigley has any thoughts as to what's going on here. It feels like there's just a bug that needs to be squashed.... It looks like it'll work though once this is settled...
I followed @TheLumberjack 's instructions and I was able to connect using the insecure HTTPS reserved zrok share! I was able to have video call with myself between laptop (hosting the self-hosted Jitsi) and my phone (from a browser and also using the Jitsi app). The conversation was one-sided... But it worked!
I'm not sure of the implications of the other ports as mentioned by @qrkourier. The Jitsi docker compose file does expose a few ports to the host, namely,
$HTTP_PORT TCP (8000)
$HTTPS_PORT TCP (8433)
$JICOFO_REST_PORT TCP (8888)
$JVB_COLIBRI_PORT TCP (8080)
$JVB_PORT UDP (10000)
Perhaps those other ports (22, 3478, 5349) are required for the different components to speak to each other, i.e. internal, but don't need to exposed externally.
Jocifi and JVB are for some other features like recording video I think, etc. I'll have another look tomorrow.
@qrkourier So awesome that you already have a guide for this! Just busy following your instructions. I'm getting
β― bash compose.bash logs zrok-enable
zrok-enable-1 | ERROR: STATE_DIRECTORY is undefined. This script must be run from systemd because it runs as a dynamically-allocated user and exclusively manages the files in STATE_DIRECTORY
# set HOME to the first colon-sep dir in STATE_DIRECTORY inherited from systemd, e.g. /var/lib/zrok-share
if [[ -n "${STATE_DIRECTORY:-}" ]]; then
export HOME="${STATE_DIRECTORY%:*}"
else
echo "WARNING: STATE_DIRECTORY is undefined. Using HOME=${HOME}" >&2
fi
echo "DEBUG: zrok state directory is ${HOME}/.zrok"
This can't be what's causing the error, but maybe I'm looking at a newer version of that code than is in the image i'm pulling (openziti/zrok latest debc0efa2ff1 2 months ago 558MB).
I'm now getting carried away with building my own customised jitsi/web image with my own logos and theme. Making the changes and rebuilding the frontend is easy enough. But then building that into the equivalent of the jisti/web image, is a bridge too far for tonight...
Thanks @TheLumberjack! I didn't realize compose does have a pull policy! I see the default pull policy is "missing," so it's not pulled when there's a newer image, only when no images matching the spec have been downloaded. Nice.