WebRTC Kurento Docker Image on EC2

1.5k views Asked by At

I have setup a local Kurento MediaServer with Docker and tested the provided application locally on my home network. But at my work place it doesn't work. The clients can reach the web apps but I think the mediaserver IP-address is not accessible from outside the installation network. How can I deploy the provided mediaserver from Kurento with Docker to an EC2 instances?

2

There are 2 answers

2
igracia On

Yes, but due to the fact that you are behind a NAT, you'll be needing to configure a STUN server in your KMS. You can uncomment the lines referring to STUN server in the config file /etc/kurento/kurento.conf.json

 "WebRtcEndpoint" : {
     "stunServerAddress" : "173.194.66.127", // Only IP address are supported                                  
     "stunServerPort" : 19302
    // turnURL gives the necessary info to configure TURN for WebRTC.                                                        
    //    'address' must be an IP (not a domain).                                                                            
    //    'transport' is optional (UDP by default).                                                                          
    // "turnURL" : "xxx:[email protected]:3478"
    // "pemCertificate" : "file"                                                                                             
  },

I'd suggest you take some time studying WebRTC, and why you need a STUN/TURN server in some cases

0
Jay On

On top of the NAT / STUN / TURN related issues, you'll want to reconsider doing this in production because Docker and UDP are not a happy marriage, given UDP access needs to span a number of ports normally. You can get round some of this with --net to host but obviously this comes at some cost to security and possible service conflicts.