Installing Jitsi-Meet twice on one server with two subdomains

I have the following Situation:
one Server Ubuntu 18.04 LTS headless with nginx and one public IP
Two domains are directed to this server, now both want to have video conferences.
I have created two subdomains: and

I installed jitsi-meet on one subdomain without any problem, but now how can I have another jitsi-meet on the other subdomain?


Just copy the nginx config of the configured domain, change just server_name, change the proxy host: Let’s say you when installing the packages you use
proxy_set_header Host $http_host; to be proxy_set_header Host;.
Probably you will need to generate new certificates and update the nginx file for the new cert files:
This should make the same deployment visible under two domains.

Thanks, I made the changes.
It opens up the jitsi-meet, and it lets me create conferences, but I cannot activate the mic or video and it disconnects an reconnects again and again without mic or video, only on the second domain, the first domain is fine.
any other settings that I need to do?

What is the error you see in the console? Are you accessing it using http or https?

Where do I find the error logs? I have full root access. I am using https.

In the browser, developer tools -> javascript console.

Access to XMLHttpRequest at ‘’ from origin ‘’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Logger.js:125 [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>: UnhandledError: null Script: null Line: null Column: null StackTrace: Error: Strophe: request id 2.2 error 0 happened
at Object.i.Strophe.log (strophe.util.js:89)
at Object.error (strophe.js:2083)
at e.Bosh._onRequestStateChange (strophe.js:5565)
Logger.js:125 [modules/xmpp/strophe.util.js] <Object.i.Strophe.log>: Strophe: request id 2.2 error 0 happened

Hi I have added the following lines in the main nginx domain and it works:

add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';


add_header 'Access-Control-Allow-Origin' '*';

but is it the right way?

Your domain accessing the deployment is different from the domain configured for bosh connections: bosh: '//',

Hello. I’m new here. :grinning:

I am having the same issue as @peseotni.

My goal is that I have a dev version of jitsi-meet and a demo version of jitsi-meet in one server so the demo version is not affected when I experiment/develop on jitsi. I still cannot make the “two jitsi meet in one server, different subdomains” scenario work.

I followed your solution to change the bosh connection via /etc/jitsi/meet/

    hosts: {
    // XMPP domain.
    domain: '',

    // When using authentication, domain for guest users.
    // anonymousdomain: '',

    // Domain for authenticated users. Defaults to <domain>.
    // authdomain: '',

    // Jirecon recording component domain.
    // jirecon: '',

    // Call control component (Jigasi).
    // call_control: '',

    // Focus component domain. Defaults to focus.<domain>.
    // focus: '',

    // XMPP MUC domain. FIXME: use XEP-0030 to discover it.
    muc: ''

// BOSH URL. FIXME: use XEP-0156 to discover it.
bosh: '//',

It is resulting to this:

Thanks for your advice.

The original one I setup on the GUI via jitsi meet installation is working. For the /etc/nginx/sites-available/ file, I just changed the subdomain name part and obtain a new cert

server {
if ($host = {
    return 301 https://$host$request_uri;
} # managed by Certbot

listen 80;
return 301 https://$host$request_uri;

server {
listen 443 ssl;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "SSL_CIPHERS_HERE";

add_header Strict-Transport-Security "max-age=31536000";
ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot

root /usr/share/jitsi-meet;
index index.html index.htm;
error_page 404 /static/404.html;

location /config.js {
    alias /etc/jitsi/meet/;

location /external_api.js {
    alias /usr/share/jitsi-meet/libs/external_api.min.js;

location ~ ^/([a-zA-Z0-9=\?]+)$ {
    rewrite ^/(.*)$ / break;

location / {
    ssi on;

location /http-bind {
    proxy_pass      http://localhost:5280/http-bind;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $http_host;


I figured it out. I had to modify the BOSH part in /etc/nginx/sites-available/ to this:
location /http-bind {
proxy_pass http://localhost:5280/http-bind;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host;

However, I decided to just set up a different server for development purposes to not interrupt the demo site during nginx stop/restart etc. So instead of two jitsi meet instances in one server, it will be one per instance.

In which file and under which name you added this headers becuase if add these directly to nginx it saying you cannnot headers in nginx and add it to the location.and i tried to add it under nginx/sites enabled location /http-bind but even after that i am getting cors error when i call from localhost

Hi @peseotni
did you configured two subdomains in single server, please let me know how you done if you have document or configuration file share to me. I am trying this last 4 days I am able to fix the issue. The second sub domain it keep rejoining . And were you copied the above line in nginx file.
Thanks in advance.

Sorry, I gave up the idea of having two on the same server. It caused more problems, with kicking people out for no reason. I wish you good luck.

Thanks for the update, so how you are using then.

another domain, another VPS
I suppose.

thanks, but it casting for me I am using same in aws.

hi @damencho I tried your suggested method, setup server on one subdomain( and created one more subdomain( on the same server.

Copied nginx conf ( to file and a different ssl certificate, however when i created certificate got error in doing so, the error was server_names_hash_bucket_size was defined already. So commented out this line on top from ( file.

Then it started working, but i got CORS error on .
I fixed this adding cors header mentioned @peseotni in file.

Then website started coming out nice i have changed image folder for pointed to other folder so i can have two different layout, logo for both subdomain.

Then i got error in authentication , i thought it is subdomain authentication error from prosody tried creating new user for sd2 but prosody failed with error ( not found in config file)

My first question is .

  • Is it possible to create/add one more subdomain to same prosody config so i can have different users for different subdomains ?

After that i have created new user so it started working on too.

then when i started recording this session jibri failed to record and recording failed.

My second question is

  • do i need to add jibri’s new user and new recorder user for new subdomain ( in jibri config ?


P.S. i love jitsi meet. You guys are doing a very good job. thanks for making this open source

In your second nginx config make sure for bosh you have:

proxy_set_header Host '';