Jitsi Meet as a standalone and DIY docker instance

jitsi meet | standalone | virtual host | image preparation | image usage

we’re gonna use the dumb-init flavor of our Devuan images, because with SVR4, JVB doesn’t start for some reason (it is probably relying on other components and starts too early)

docker pull pbraun9/devuan

FQDN is required as hostname and we need to open HTTP already for standalone certs. as for the port binding, it might conflict with a running web server, this is why we force the bind on a specific alternate IP address.

dedicated ip

    docker run -d --name meet --hostname meet.nethence.com --workdir /root \
            -p x.x.x.x:80:80 \
            -p x.x.x.x:443:443 \
            -p x.x.x.x:10000:10000/udp \
            pbraun9/devuan
docker logs meet
docker exec -ti meet /bin/bash

otherwise reverse-proxy

idem but without -p

Setup

same as for /chat/jitsi-meet but…

Tweak the LE script

    cp -pi /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh.dist
chmod -x /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh.dist
    vi /usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

    if [[ $DISTRO = Debian || $DISTRO = Devuan ]]; then

start the web service right away

    service nginx start

Behind Docker-or-NAT

with a dedicated IP

on the host

    #ifconfig eth0:0 $facingip/32
    ip addr add $facingip/32 dev eth0

within the instance

tune for NAT

    ifconfig eth0 | grep 'inet '
    curl -s ifconfig.me; echo

    cp -pi /etc/jitsi/videobridge/sip-communicator.properties /etc/jitsi/videobridge/sip-communicator.properties.dist
    vi /etc/jitsi/videobridge/sip-communicator.properties

COMMENT OUT THAT ONE

    #org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443

ADD THOSE

    org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=172.17.0.2
    org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=62.210.110.7

    ln -s /etc/jitsi/videobridge/sip-communicator.properties

Handy scripts

eventually make a few wrapper scripts available

cat > /root/START <<-EOF
rm -f /var/run/jicofo.pid
rm -f /var/run/jitsi-videobridge.pid
service nginx start
service prosody start
service jicofo start
service jitsi-videobridge2 start
EOF

cat > /root/STATUS <<-EOF
service nginx status
service prosody status
service jicofo status
service jitsi-videobridge2 status
EOF

cat > /root/STOP <<-EOF
service nginx stop
service prosody stop
service jicofo stop
service jitsi-videobridge2 stop
pkill turnserver
EOF

cat > /root/RESTART <<-EOF
service nginx restart
service prosody restart
service jicofo restart
service jitsi-videobridge2 restart
EOF

cat > /root/log <<-EOF
tail -n0 -F /var/log/* /var/log/*/*
EOF

chmod +x /root/START /root/STATUS /root/STOP /root/RESTART /root/log

Ready to go

finally startup the rest

    #rm -f /var/run/jicofo.pid
    #rm -f /var/run/jitsi-videobridge.pid
    #service nginx start
    service prosody start
    service jicofo start
    service jitsi-videobridge2 start

and enable it at boot-time in case that instance got restarted

vi /etc/rc.local

    rm -f /var/run/jicofo.pid
    rm -f /var/run/jitsi-videobridge.pid
    service nginx start
    service prosody start
    service jicofo start
    service jitsi-videobridge2 start

eventually make an image out of it however it will have the FQDN and IPs hard-coded. rather go for the other guide if you wanna build an image.

Troubles

when starting the instance

    docker: Error response from daemon: driver failed programming external connectivity on endpoint meet 
      (d4ce2b4d7f4bcedbf3016f12172e17eb2aad3bfe88650366e0caaae0f106a26a): 
      Error starting userland proxy: listen tcp4 INSTANCE-IP:443: bind: address already in use.

==> NGINX reload nor reopen on the host are not enough, you need to restart it after you’ve tuned listen HOST-IP:80 lines

#nginx -s stop
nginx -s quit
nginx

Resources

dedicated ip

Public accessible IP in container (like bridge network in VirtualBox) https://forums.docker.com/t/public-accessible-ip-in-container-like-bridge-network-in-virtualbox/3668

How to Get A Docker Container IP Address - Explained with Examples https://www.freecodecamp.org/news/how-to-get-a-docker-container-ip-address-explained-with-examples/

How to assign static public IP to docker container https://stackoverflow.com/questions/34688906/how-to-assign-static-public-ip-to-docker-container

Assign static IP to Docker container https://stackoverflow.com/questions/27937185/assign-static-ip-to-docker-container


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun