How to configure NoMachine servers to use WebRTC

Added on: 2016-07-01 Last Modified: 2020-07-14
ID: AR07N00892 Applies To: NoMachine Software

Starting from version 5.1.40, NoMachine web-based sessions support WebRTC (Real-Time Web Communication) technology enabling peer-to-peer audio/video streaming and real-time data sharing. Currently in beta status, the WebRTC functionality is disabled by default and the classic web media exchange protocol is used.

In order to enable WebRTC, edit the configuration file, i.e.:

(i) server.cfg for servers v. 6 or later

(ii) cloud.cfg for Cloud Server v. 5 and 4.

Then apply changes described in the next steps.

The user's browser has to fully support WebRTC, like:
Firefox 22+
Chrome 23.0
Opera 15+
Edge 15+
Vivaldi 1.3+



Step 1. Uncomment the following key in server.cfg and set it as:

AcceptedWebMethods classic,webrtc

(For older servers, set: AcceptedMethods classic,webrtc in cloud.cfg).

With this configuration, the web session will use HTML5 real-time communication when the browser supports WebRTC or will fall back to the classic web media exchange protocol if the browser doesn't support WebRTC.


Step 2.  If the NoMachine Server has a multi-node environment set-up and the remote nodes are behind a NAT, you need to use a STUN/TURN Server and edit the NoMachine configuration accordingly.

At present NoMachine doesn't provide its own STUN/TURN server for WebRTC communications. You may either rely on existing public STUN/TURN servers or build your own. See also which documents an example of how to setup a coturn TURN server.


To define the STUN/TURN server to be used for WebRTC communications in NoMachine web sessions: 

i) uncomment all items of Section "STUN" (remove the pre-pended #) in the configuration file to specify settings for the STUN server:

Section "STUN"

Host      <hostname>
Port      <portnumber>
User      <username>
Password  <password>


and replace: <hostname>, <portnumber>, <username>, <password>

with: IP of the STUN server, its listen port, username and password to access it.

ii) To use a TURN server,  duplicate Section "STUN" and rename the new section into Section "TURN".  Complete it with the proper values.

By referring to the Coturn server set-up as per AR07N00894, the configuration file should report:

Section "STUN"

Port      3478
User      test01
Password testdriver


Section "TURN"

Port      3478
User      test01
Password  testdriver




In order to provide multiple STUN/TURN servers as alternatives, replicate Section "STUN" and Section "TURN" respectively. 

NoMachine will contact the first STUN/TURN server in the list and will attempt to connect to the next one if the first server is not reachable.