How can I install a TURN server on my ubuntu 12.04? Can you share tutorial? I read this tutorial: Implementing our own STUN/TURN server for WebRTC Application. But what I don't understand is how I can I install my own TURN server on my ubuntu 12.04?
I am using currently using something like the following code to create the RTCPeerConnection
const pc_config = {"iceServers": [{"url": "stun:stun.l.google.com:19302"},
{"url":"turn:my_username@<turn_server_ip_address>", "credential":"my_password"}]};
const pc_new = new webkitRTCPeerConnection(pc_config);
And I want to fill the above code's arguments to work with a different network.
When i want to install turn server then I get
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package resiprocate-turn-server
I used apt-get install resiprocate-turn-server
. I also used this https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html tutorial.
it is easy to install in linux machines, not tried in other OSes.
simple way:
If you say no, I want the latest cutting edge, you can download source code from their downloads page in install it yourself, example:
sample command for running TURN server:
command description:
check this wiki for more details and configurations.
now you can use the TURN server in your WebRTC application as:
This link will provide all details regarding installation and configuration of TURN server.
https://www.webrtc-experiment.com/docs/TURN-server-installation-guide.html
The guy has very good repository for WebRtc demos.
I think the guide is somewhat outdated.
Look at this Google open source TURN server.
Really easy to install and works very well.
https://code.google.com/p/rfc5766-turn-server/
Turn Server Installation
change the package according to your server
Add following to turn server.conf
Add the username and password on turnuserdb.conf
in the following format
To Start the Turn Server:
To add new Turn User:
To See if the Turn Server is running :
The above command should list some processes as turnserver , if the TURN server is running properly.
On your ubuntu server machine, set up, configure & run a packaged version of coturn. For a basic setup, do
Add
--daemon
to keep it running in the background. See https://github.com/coturn/coturn/wiki/turnserver for the list of options ofturnserver
and have a look at their example config file if you want to use one with-c CONFIGFILE
instead of using-n
and passing all options on the commandline like I did above.To check that it worked, in Google Chrome, while on any page of a secure origin (for example stackoverflow.com), run this in the developer console:
You should get