7

I have just started out with learning WebRTC for implementing audio and video application and know there are various Public stun servers available for peer connection. But i am a bit confused can I use these Public servers for a commercial application?

Also I would like to know if there is any tutorial or guide available from where i can understand how to make and deploy my own stun or turn server if i want to create a commercial app?

abhihan
  • 71
  • 1
  • 4
  • 1
    Possible duplicate of [Implementing our own STUN/TURN server for WebRTC Application](http://stackoverflow.com/questions/22233980/implementing-our-own-stun-turn-server-for-webrtc-application) – mido Feb 17 '16 at 08:35

1 Answers1

3

Whether you can use public STUN servers for commercial applications depends entirely on the licensing/Terms of Service agreement of the operator of said servers. Peruse those if available. If not indicated otherwise, I wouldn't distinguish "commercial" use from any other use.

There are many many implementations of STUN/TURN servers available you can set up yourself on any machine you happen to have (in practice that probably means an instance on AWS, Azure or the like). Search for and pick one you like. STUN servers use relatively little resources, while TURN servers typically need powerful CPUs and fast internet connections to be useful (they must relay the entire video stream as quickly as possible).

Operating such a server yourself may become expensive, depending on your usage. Using a commercial provider for TURN servers may be the better option; personally I've had good experiences with Twilio in this regard, but do shop around for other offerings.

deceze
  • 510,633
  • 85
  • 743
  • 889
  • I might sound a bit weird.. But i am totally new to all this. I am actually making this app on node and react and signalling channel will be provided using socket.io . Going by what you have just said , If i wish to have my own STUN server i have to deploy it separately ? I was thinking if i can have that implementation somewhere with my node code.? Maybe i sound a bit foolish but not so sure. Can you suggest few free implementations of STUN servers available? and Thanks for the guidance – abhihan Feb 17 '16 at 10:00
  • *Theoretically* a STUN server could probably be implemented as node module. I don't know if there is any such implementation. Separating the two is probably a better idea, even just for reasons of managing server loads. To get a foot in the door, even Wikipedia will do: https://en.wikipedia.org/wiki/STUN#External_links – deceze Feb 17 '16 at 10:04
  • Cool .. Any idea on how much will it cost to get the service from twilio..? – abhihan Feb 17 '16 at 10:10
  • 1
    Read their website. It's very affordable to be sure; for low to medium usage a few cents or dollars per month. – deceze Feb 17 '16 at 10:16
  • Hey @deceze♦ as you said setting up our own server would become expensive, could you please help me understand if Twilio could be the go-to option? – Arjun Feb 25 '21 at 04:52