How to self-host to not rely on WebRTC STUN server stun.l.google.com:19302?

Vicky picture Vicky · Nov 19, 2013 · Viewed 50.4k times · Source

I have just downloaded a video chat project. It uses a STUN server and specifies the URL stun:23.21.150.121. How can I use my own server instead of the STUN server? What do I have to enter instead of this URL?

Answer

Vlad Tsepelev picture Vlad Tsepelev · Nov 22, 2013

Actually there is no need to setup your own STUN or TURN servers, because there are a lot of public/semipublic servers. STUN from Google not always works very well.

This is my latest verified list (don't forget stun:/turn: scheme in URL):

{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
{url:'stun:stun3.l.google.com:19302'},
{url:'stun:stun4.l.google.com:19302'},
{url:'stun:stunserver.org'},
{url:'stun:stun.softjoys.com'},
{url:'stun:stun.voiparound.com'},
{url:'stun:stun.voipbuster.com'},
{url:'stun:stun.voipstunt.com'},
{url:'stun:stun.voxgratia.org'},
{url:'stun:stun.xten.com'},
{
    url: 'turn:numb.viagenie.ca',
    credential: 'muazkh',
    username: '[email protected]'
},
{
    url: 'turn:192.158.29.39:3478?transport=udp',
    credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
    username: '28224511:1379330808'
},
{
    url: 'turn:192.158.29.39:3478?transport=tcp',
    credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',
    username: '28224511:1379330808'
}

https://gist.github.com/yetithefoot/7592580

In case if you need your own STUN server, you can use this one written for Node.js, or find some here.

Also you can check this and this pages for better understanding.