add bbb-dyndns

main
yova 1 year ago
parent 3194f4e378
commit c5418b5158

@ -0,0 +1,116 @@
---
title: BBB behind DynDNS
description: Big Blue Button selfhosted
date: 2023-03-07
---
Although BBB does not recommend to run it at home it is possible with an dynamic IP configuration. With the nowadays available fibre and fast VDSL lines at least conferences for small groups are feasible.
The trick is to bind the websockets to localhost and let the current IP loop on localhost. Then let a script update the config on IP change.
Lets take a look step by step. First [install BBB](https://docs.bigbluebutton.org/2.5/install.html) with the official installer. Be sure to have prepared your box according to the system requirements with the now aged ubuntu **20**.
Then have a look at the configuration files. There are several. You can display the values of matter with `bbb-conf --check`.
You need to adapt the config files until you get a similar output like this:
- FQDN of server: `host.domain.tld`
- local IP: `5.5.5.5`
```
BigBlueButton Server 2.5.4 (3063)
Kernel version: 5.4.0-125-generic
Distribution: Ubuntu 20.04.4 LTS (64-bit)
Memory: 32893 MB
CPU cores: 24
/etc/bigbluebutton/bbb-web.properties (override for bbb-web)
/usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties (bbb-web)
bigbluebutton.web.serverURL: https://host.domain.tld
defaultGuestPolicy: ALWAYS_ACCEPT
svgImagesRequired: true
defaultMeetingLayout: CUSTOM_LAYOUT
/etc/nginx/sites-available/bigbluebutton (nginx)
server_name: host.domain.tld
port: 80, [::]:80
port: 443 ssl
/opt/freeswitch/etc/freeswitch/vars.xml (FreeSWITCH)
local_ip_v4: 5.5.5.5
external_rtp_ip: host:host.domain.tld
external_sip_ip: host:host.domain.tld
/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml (FreeSWITCH)
ext-rtp-ip: $${external_rtp_ip}
ext-sip-ip: $${external_sip_ip}
ws-binding: 127.0.0.1:5066
wss-binding: 127.0.0.1:7443
/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
playback_host: host.domain.tld
playback_protocol: https
ffmpeg: 4.2.7-0ubuntu0.1
/usr/share/bigbluebutton/nginx/sip.nginx (sip.nginx)
proxy_pass: 127.0.0.1
protocol: http
/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml (Kurento SFU)
/etc/bigbluebutton/bbb-webrtc-sfu/production.yml (Kurento SFU - override)
kurento.ip: 5.5.5.5
kurento.url: ws://127.0.0.1:8888/kurento
kurento.sip_ip: 127.0.0.1
recordScreenSharing: true
recordWebcams: true
codec_video_main: VP8
codec_video_content: VP8
/usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml (HTML5 client)
/etc/bigbluebutton/bbb-html5.yml (HTML5 client config override)
build: 2829
kurentoUrl: wss://host.domain.tld/bbb-webrtc-sfu
enableListenOnly: true
sipjsHackViaWs: true
/usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml (STUN Server)
stun: stun.l.google.com:19302
```
In detail you need to change:
- `/opt/freeswitch/etc/freeswitch/vars.xml`
- set `local_ip_v4` (l. 59) to the local IP
- set `external_rtp_ip` (l. 295) and `external_sip_ip` (l. 307) to the fqdn like `host:host.domain.tld`
- `/opt/freeswitch/etc/freeswitch/sip_profiles/external.xml`
- set IP of `ws-binding` (l. 100) and `wss-binding` (l. 101) to `127.0.0.1`. Leave ports as they are.
- `/usr/share/bigbluebutton/nginx/sip.nginx`
- set `proxy_pass` IP to `127.0.0.1` leave port as is.
- `/etc/bigbluebutton/bbb-webrtc-sfu/production.yml`
- change it to this format, where `5.5.5.5` is the internal IP and `7.7.7.7` the external IP
```yaml
freeswitch:
ip: 7.7.7.7
sip_ip: 127.0.0.1
kurento:
- ip: 5.5.5.5
url: ws://127.0.0.1:8888/kurento
mediasoup:
plainRtp:
listenIp:
announcedIp: 7.7.7.7
ip: 0.0.0.0
webrtc:
listenIps:
- announcedIp: 7.7.7.7
ip: 0.0.0.0
- announcedIp: 5.5.5.5
ip: 0.0.0.0
```
Then you need to add the public IP to the loopback device of the server: `ip addr add 7.7.7.7/32 dev lo`.
On each new IP given from your ISP you need you only need to update the configfile `/etc/bigbluebutton/bbb-webrtc-sfu/production.yml` and replace the IP of the local loopback device. I wrote [a little script](https://git.gugelfrei.de/bbb/dyndns-update) for that. This is a dirty hack, but should work for ovh and hetzner (own branch).
Inspirations:
- https://munari.xyz/2020/10/25/bigbluebutton-behind-nat/
- https://github.com/bigbluebutton/bigbluebutton/issues/10968
Loading…
Cancel
Save