Set unique MUC_NICKNAME on JVB

So I have a working JVB image that I want to auto scale in AWS, is there a way to set new MUC_NICKNAME on instance start up, like a script I can put on User data?

Edit: Looks like this should do it →

sudo sed -i '/MUC_NICKNAME/s/{EXISTING_NICKNAME}/{NEW_NICKNAME}/g' /etc/jitsi/videobridge/

Thanks, curious what’s that jvb-config.service for?

The script must be run before JVB starts. /etc/systemd/system/jvb-config.service is a systemd service which triggers the script before JVB.

If you are not familiar with systemd, you need to run following commands to active the service

systemctl daemon-reload
systemctl enable jvb-config.service
systemctl start jvb-config.service

And don’t forget to set the execute permission for script

chmod 744 /usr/local/sbin/jvb-config

You wouldn’t have a script for gracefully shutting down a jvb in there too? Thinking of writing a script to ping SQS each minute and check if it was told to shutdown, but then again need a way to know if jvb is still in use. Might also need a way for my Jitsi server to keep the jvb alive but don’t assign it new connections since it’s shutting down. Or maybe a lambda function to run a script and move the conversation to another JVB so this one can shut down.

I have one but it’s for my custom environment.

It works on JMS host. It periodically checks JVBs’ status and shutdowns idle JVBs if there are more than needed (or creates new JVB instances if needed)

In my setup JVBs are in LXC containers and JMS can access JVB servers using an SSH key. OCTO is not active.

Thanks, I’m using octo and most strategies prioritize least loaded bridges, pretty sure a bridge will never become idle and thus checking for idle to shut down will not happen.

For your script to work I would first need a way to tell Jicofo that a particular bridge should not handle anymore conferences but keep it alive, then it would eventually become idle.

EDIT: Nevermind, I see jitsi-videobridge/reference.conf at master · jitsi/jitsi-videobridge · GitHub Shutdown takes care of this.