Running Greenlight from multiple URLs (like seperate container)

1,730 views
Skip to first unread message

Kirk Pathumanun

unread,
Jul 17, 2017, 1:53:01 AM7/17/17
to BigBlueButton-dev
Hello,

Just wondering that as of right now I have installed Greenlight frontend by docker image for one URL ex (abc.com) What is the most efficient way to install Greenlight for a different URL ex (cde.com) sitting on the same bigbluebutton server where both url is using nginx for url mangement ? Practically I would like people to be able to use Greenlight from both abc.com and cde.com. Thank you.

Regards,

Kirk Pathumanun

unread,
Jul 17, 2017, 3:24:45 AM7/17/17
to BigBlueButton-dev
Not sure I'm on the right track just basically created different directory and follow the instruction just like the original greenlight install. So now I have to make modification to /etc/bigbluebutton/nginx/greenlight.nginx to point to the different domain ? For nginx reverse proxy of the container
Then after that  I would run the command

docker run -d -p 3000:80 -v $(pwd)/db/production:/usr/src/app/db/production --env-file env --name greenlight bigbluebutton/greenlight to have the docker image running from new cde.com site 3000 bind to port 80
and the original abc.com from port 5000.

Not sure if this is the right direction but will try to see. Thank you for any suggestion in advance.

Regards,

Kirk Pathumanun

unread,
Jul 17, 2017, 5:09:58 AM7/17/17
to BigBlueButton-dev
Hello I tried

location /b {
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
}
on the nginx file of cde.com in /etc/nginx/sites-available and it works partially where the page, database loaded up fine but the link for css and picture didn't load up properly. I'm getting close to the goal but will need someone to point in the right direction for this.

Regards,

Fred Dixon

unread,
Jul 17, 2017, 9:39:27 AM7/17/17
to BigBlueButton-dev
Hi Kirk,

You could certainly run multiple instances of GreenLight on the same server -- you need to duplicate the greenlight directory (call it ~/greenlight_abc and ~/greenlight_cde).

With two instances of GreenLight running, one listening on port 5000 and the other on port 5001, you could create a new entry in /etc/nginx/sites-available/greenlight_cde to map incoming calls for cde.com to port 5001.

server {
     listen   80;
     server_name  cde.com;

     access_log  /var/log/nginx/cde.com.access.log;


        location /b {
           proxy_pass         http://127.0.0.1:5001;
           proxy_set_header Host $host;
           proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
           proxy_set_header   X-Forwarded-Proto $scheme;
           proxy_http_version 1.1;
        }
        
        location /b/cable {
           proxy_pass         http://127.0.0.1:5001;
           proxy_set_header Host $host;
           proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;
           proxy_set_header   X-Forwarded-Proto $scheme;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_read_timeout 6h;
           proxy_send_timeout 6h;
           client_body_timeout 6h;
           send_timeout 6h;
        }


        #error_page  404  /404.html;

        # Redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /var/www/nginx-default;
        }
}



Alternatively, you could try setting up the server so BigBlueButton is configured for hostname bbb.server.com, and you have nginx files for abc.server.com and cde.server.com that the nginx files map to port 5000.  In this scenario, users could join from abc.server.com and cde.server.com but get redirected to bbb.server.com when starting a meeting.

GreenLight itself isn't designed to be multi-tenant as it has is configured for a single host in the env file -- which means it will always return a join URL for a given hostname.  The above may not work, but it should help you understand more about GreenLight and how it works (and potentially how to modify it for your needs).


Regards,... Fred

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-dev+unsubscribe@googlegroups.com.
To post to this group, send email to bigbluebutton-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.



--
BigBlueButton Developer
@bigbluebutton

Kirk Pathumanun

unread,
Jul 17, 2017, 12:10:02 PM7/17/17
to BigBlueButton-dev
Hello Fred,

Thank you for the insight and yes I will probably will have to make adjustment to the codes and nginx but this is sufficiently proficient to get me started. Thank you so much for the support.

Regards,
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To post to this group, send email to bigblueb...@googlegroups.com.

Carl Gosselin

unread,
Oct 15, 2018, 2:20:43 PM10/15/18
to BigBlueButton-dev
Hello,

I plan to take a similar approach in using multiple greenlight front-ends (for separate groups).  
I'm wondering if I can use this thread as a sounding board before I begin building another bigbluebutton environment...

Does the following make sense...
1. I plan to install another instance of bigbluebutton (including greenlight + html5) on Digital Ocean

2. I'll be creating a website that will link to bigbluebutton meetings/functionality.  Sounds like the best option is to create this website on a different server for simplicity (easier to upgrade, prevent conflicts, etc…).  Is this correct?  

3. On the bigbluebutton server, I plan to have multiple greenlight applications (for separate groups).  In reading the post, I should look towards creating subdomains for each group.  Does this sound right?  

Does this make sense?
Should I be considering other things?

Carl

Fred Dixon

unread,
Oct 15, 2018, 4:38:06 PM10/15/18
to BigBlueButton-dev
Hi Carl,

> 1. I plan to install another instance of bigbluebutton (including greenlight + html5) on Digital Ocean

Sounds good.

> 2. I'll be creating a website that will link to bigbluebutton meetings/functionality.  Sounds like the best option is to create this website on a different server for simplicity (easier to upgrade, prevent conflicts, etc…).  Is this correct?  

Yes, we always recommend setting up any web-based application on a different server so as to not conflict with BigBlueButton's configuration.

> 3. On the bigbluebutton server, I plan to have multiple greenlight applications (for separate groups).  In reading the post, I should look towards creating subdomains for each group.  Does this sound right?  

You can run multiple docker containers, each listening to a different port (such as 5001, 5002, etc), and you can use nginx to map different domains to different GreenLight servers,


We've not done this ourselves, but that should get you going.

Regards,...  Fred


Carl Gosselin

unread,
Nov 16, 2018, 3:09:34 PM11/16/18
to BigBlueButton-dev
I'm just wondering if anyone has been able to create multiple greenlight front-ends (one per group).  

My steps so far...
1. I created two greenlight folders on the server
2. In each env file, I updated the RELATIVE_URL_ROOT to different paths: greenlight1 and greenlight2

My next steps was to update the greenlight.nginx in the following location:  /etc/bigbluebutton/nginx/greenlight.nginx
- However, it seems like I can only add one of the relative paths (not both).  So not sure where to go from here.

I also took a look at the sites-enabled file called bigbluebutton but it doesn't seem like it's the right place to identify multiple greenlight servers.
Any ideas?

I'm trying to produce the following:

Kirk Pathumanun

unread,
Nov 17, 2018, 12:50:28 PM11/17/18
to BigBlueButton-dev
Hello Carl Since I guess I was the one who started this topic, mind as well I will be the one to bring it to a closure. Yes you can do this with an instance of DO separate from the BBB server.
First don't use docker since it would hog the living system of DO on both ram and disk space. Only lazy people use docker for greenlight literally. Here are the step to run greenlight on DO without Dockers

  1. Log into your BigBlueButton server as root.
  2. Ensure you have both Ruby and Ruby on Rails installed on your BigBlueButton server. GreenLight requires a minimum of Ruby 2.4.0 and Rails 5.
  3. Clone the GreenLight repo and switch into the /greenlight directory.
  4. Open up the Gemfile and move the dotenv-rails gem outside of the test/development block.
  5. Install bundler if you need to (gem install bundler), then run bundle. If it fails to bundle the pg gem, run sudo apt-get install libpq-dev then try again.
  6. Copy the file at /scripts/greenlight.nginx to /etc/bigbluebutton/nginx on your BigBlueButton server. To apply the change, restart nginx using systemctl restart nginx.
  7. Return to the /greenlight directory and copy the sample.env file to .env using cp sample.env .env.
  8. Fill out the .env file. For information on how to do this, see the Enter BigBlueButton Credentials section. Make sure to uncomment the BigBlueButton server credentials. To generate the SECRET_KEY_BASE, run rake secret from within the /greenlight directory.
  9. Uncomment the RELATIVE_URL_ROOT=/b line within the .env file.
  10. Migrate the database using RAILS_ENV=production rake db:migrate.
  11. Precompile the assets by running rails assets:precompile.
  12. Start the Greenlight server using rails s -p 5000 -e -d production. (This will run your greenlight on the background)
  13. Navigate to your host at /b to use GreenLight.

Next to answer about running multiple separate address like


You can use niginx port forward to map out the address as such


 location /b {
  proxy_pass          http://127.0.0.1:5000;
  proxy_set_header    Host              $host;
  proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
  proxy_set_header    X-Forwarded-Proto $scheme;
  proxy_http_version  1.1;
}

location /b/cable {
  proxy_pass          http://127.0.0.1:5000;

  proxy_set_header    Host              $host;
  proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
  proxy_set_header    X-Forwarded-Proto $scheme;
  proxy_set_header    Upgrade           $http_upgrade;
  proxy_set_header    Connection        "Upgrade";
  proxy_http_version  1.1;

  proxy_read_timeout  6h;
  proxy_send_timeout  6h;
  client_body_timeout 6h;
  send_timeout        6h;
}

Insert this block into the directory where you want to point to the URL at one's heart desire and of course if you have multiple instances from different ports then use can just modify port number accordingly and point to whatever the URL you want.
As for me I have figure out a super resource saver way of running this trick on one port linking to a centralize LDAP and then have greenlight point out to various urls and this would give the appearance of loggin on from various domain points. Anyway whatever ways you would like to implement this should be a great way to start. Sorry for the long instruction but I just had a hold my beer moment where the moderators at time are to implicit on solution.


Good Luck.
Kirk

Carl Gosselin

unread,
Nov 17, 2018, 9:55:52 PM11/17/18
to BigBlueButton-dev
Thanks Kirk.  This is great.  I appreciate the guidance.  I'll give it a go.  I'm not too familiar with the nginx port forward but hopefully I'll be able to push through.

Fred Dixon

unread,
Nov 18, 2018, 10:26:16 AM11/18/18
to bigblueb...@googlegroups.com
Hi Kirk,

> First don't use docker since it would hog the living system of DO on both ram and disk space. Only lazy people use docker for greenlight literally. Here are the step to run greenlight on DO without Dockers

We would recommend anyone interested in Green Light use the Docker container to get started quickly.  We are running GreenLight in a Docker container on https://demo.bigbluebutton.org/.  When I log into the system and run `top`, I don't see the Docker container (or the ruby process) anywhere near the top.  

Docker is *very* efficient for running separate processes.   It also isolates all the rails environment from the host BigBlueButton server.  Also, running Green Light in docker also makes it easy to upgrade when we release new versions, see



Regards,... Fred


--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To post to this group, send email to bigblueb...@googlegroups.com.
Visit this group at https://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/d/optout.

Kirk Pathumanun

unread,
Nov 19, 2018, 2:44:20 AM11/19/18
to bigblueb...@googlegroups.com
Nice to hear from you Fred and yes we are still waiting on RC8 candidate instead of docker debate, so have a great day !

Regards,

Kirk

Virus-free. www.avg.com

You received this message because you are subscribed to a topic in the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bigbluebutton-dev/US9q9_Z4STo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bigbluebutton-...@googlegroups.com.

Carl Gosselin

unread,
Nov 19, 2018, 11:54:01 AM11/19/18
to BigBlueButton-dev
Thanks again for the feedback.  I'll try both options for multiple greenlight front-ends (with Docker and without Docker).  I've been working with Docker so far so I'll keep going.  

I currently have a dockerized greenlight app with custom changes that I made via Ruby on Rails.  It's working well.  I changed the relative root from 'b' to 'greenlight1'.  At the moment, I created a second greenlight folder with a different logo.  I'm going to leave the relative root as 'b' for now.  I'm hoping to see two different greenlight apps in the following locations:

I'm stuck at the following set of instructions:  4. Configure Nginx to Route To Greenlight
If I perform the following command, the greenlight.nginx file for greenlight1 will be overwritten with the second greenlight.nginx file:
docker run --rm bigbluebutton/greenlight:v2 cat ./greenlight.nginx | sudo tee /etc/bigbluebutton/nginx/greenlight.nginx

I'm not sure how to run two docker containers without overwriting each other.  I'm wondering if I just need to update the second file to something like greenlight2.nginx.  Can anyone help?

Chad Pilkey

unread,
Nov 19, 2018, 12:00:11 PM11/19/18
to BigBlueButton-dev
You can just edit the existing greenlight.nginx file and add an extra "location" block for your second instance.

Carl Gosselin

unread,
Nov 19, 2018, 4:29:41 PM11/19/18
to BigBlueButton-dev
Thanks Chad.  I added the extra location in the greenlight.nginx file.  I had a few other roadblocks after that but I finally made it work.  
note: I also had to add the second greenlight parameters in the docker-compose.yml file...

services:
  app:
    entrypoint: [bin/start]
    image: folder1
    container_name: container-folder1
    env_file: .env
    restart: unless-stopped
    ports:
      - 5001:80
    volumes:
      - ./db/production:/usr/src/app/db/production
      - ./log:/usr/src/app/log
#    logging:
#      driver: $LOG_DRIVER
#      options:
#        syslog-address: $LOG_ADDRESS
#        tag: $LOG_TAG

  app2:
    entrypoint: [bin/start]
    image: folder2
    container_name: container-folder2
    env_file: ../../folder2/greenlight/.env
    restart: unless-stopped
    ports:
      - 5002:80
    volumes:
      - ./db/production:/usr/src/app/db/production
      - ./log:/usr/src/app/log
#    logging:
#      driver: $LOG_DRIVER
#      options:
#        syslog-address: $LOG_ADDRESS
#        tag: $LOG_TAG

With the code above, I was able to run 'docker-compose up -d' for both containers simultaneously.
Thanks for everyone's help.  Learned a lot!

Chad Pilkey

unread,
Nov 20, 2018, 8:13:29 AM11/20/18
to BigBlueButton-dev
One problem you might run into with that setup is that both containers are using the same database and log location. I would suggest splitting the logs for sure and probably also setting the database to a different directory also.

Carl Gosselin

unread,
Nov 20, 2018, 9:08:21 AM11/20/18
to BigBlueButton-dev
Thanks for the heads up Chad.  I'll make the changes.

Yugdeep katariya

unread,
May 22, 2020, 5:49:22 AM5/22/20
to BigBlueButton-dev
Hi Krik,

I know, this is old thread. but i want to know if you have achieved the desired result?

hyunho

unread,
Nov 27, 2020, 10:08:18 AM11/27/20
to BigBlueButton-dev

I am also curious if you have achieved good results. Perhaps because I am immature, I am struggling.  

2020년 5월 22일 금요일 오후 6시 49분 22초 UTC+9에 katariya...@gmail.com님이 작성:
Reply all
Reply to author
Forward
0 new messages