Running Janus behind reverse proxy with SSL termination on Google Cloud

88 views
Skip to first unread message

Venelin Spiridonov

unread,
Feb 23, 2023, 5:16:35 PM2/23/23
to meetecho-janus
Steps to run PoC on GCP
  1. Reserve Static IP address for UI
  2. Reserve Static IP address for Janus
  3. Generate crt and key files for NGINX ssl and store them in certs folder
  4. Populate Janus Static IP to NGINX custom config
  5. Build NGINX docker image and deploy as Compute engine instance, allow https for it 
  6. Assign to deployed instance the IP from step 1
  7. Build Janus docker image where nat_1_1_mapping = “<IP from step 2>“ in janus.jcfg
  8. Deploy Janus docker image as Compute engine instance, allow http
  9. Assign to Janus instance the IP from step 2


Example of NGINX config 


server {

    listen 443 ssl;

    ssl_certificate /etc/nginx/certs/server.crt;

    ssl_certificate_key /etc/nginx/certs/server.key;


    location / {

        root   /usr/share/nginx/html;

        index  index.html index.htm;

    }


    location ~* \.(js|jpg|png|css)$ {

        root /usr/share/nginx/html/;

    }


    location /janus {

        proxy_pass http://ip-from-step-2:8088;

    }


    error_page   500 502 503 504  /50x.html;

    location = /50x.html {

        root   /usr/share/nginx/html;

    }

}


Example of NGINX Dockerfile 


FROM nginx

COPY /certs/ etc/nginx/certs

COPY nginx.conf /etc/nginx/conf.d/nginx.conf

COPY html /usr/share/nginx/html

EXPOSE 443


Example of Janus Dockerfile


FROM canyan/janus-gateway:master

COPY ./janus.jcfg ./usr/local/etc/janus/janus.jcfg



Hope this will save time to every WebRTC enthusiast like me.

ENJOY this great product Janus!



Reply all
Reply to author
Forward
0 new messages