How to change TURN server port to 80 from 3478

In my deployment, in order to by pass firewall, I want to run TURN on port 80. I am using Openvidu 2.15 docker on premise installation, I changed “TURN_LISTEN_PORT=80” in docker-compose.yml. But coturn docker is still listening on port 3478 and in browser chrome://webrtc-internals iceServers ports are showing as 3478. Is there some other configuration to set TURN server port ? I am running everything in same machine. I do not want to letsencrypt if that is creating problem for coturn in listening in port 80.

I can see that stun server port 3478 is hardcoded in file


Even changing this port to 80 has no effect on iceServers configurations in browser.

I found there is a configuration parameter in Openvidu browser API called OpenViduAdvancedConfiguration. Through this I can set iceServer configuration. But how to do it. I am using openvidu Webcomponent js and just passing sessionId and token after user authentication webComponent.sessionConfig = { sessionId, user, token }; in my index.html ?

I can see that in file openvidu-call/openvidu-call-front/node_modules/openvidu-browser/src/OpenVidu/Session.ts the port information is hard coded.
const stunUrl = 'stun:' + coturnIp + ':3478'; const turnUrl1 = 'turn:' + coturnIp + ':3478'; const turnUrl2 = turnUrl1 + '?transport=tcp';

Even changing this file and compiling it and using the generated js file openvidu-webcomponent-2.15.0.js did not help me. Finally I had to edit openvidu-webcomponent-2.15.0.js file to remove port 3478

Actually we don’t support any other port for coturn than 3478. You need to open this port to work with our coturn container. Did you solve your problem by modifying these ports manually and recompiling?

@cruizba any specific reason for not supporting it. I have seen webRTC solution giving option to run COTURN on any port of user choice and make it configurable parameter. I restricted firewall settings, it may required that user wants to host its COTURN over port 80 or 443 (read TURNS) in order to bypass firewalls. Can I deploy openvidu version 2.15.0 in old manner like version 2.12.0 and use TURN port other than 3478 ? Thanks

Since version 2.21.0 a TURN server can be deployed or used externally for special conditions or users behind firewalls. Check: Allow users behind firewalls - OpenVidu Docs

You can also change default port with parameter COTURN_PORT in /opt/openvidu/.env