Difference between relay and coturn? #2256

Open
opened 2025-11-20 07:06:36 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @qiangxinglin on GitHub (Sep 9, 2025).

Hi team,

I have following config on my spare server (not the one hosted netbird dashboard and api).

services:
  coturn:
    image: coturn/coturn:latest
    volumes:
      - ./turnserver.conf:/etc/turnserver.conf:ro
    network_mode: host
    command:
      - -c /etc/turnserver.conf

  relay:
    image: netbirdio/relay:latest
    environment:
      - NB_LOG_LEVEL=info
      - NB_LISTEN_ADDRESS=:33080
      - NB_EXPOSED_ADDRESS=rel://SPARE_IP:33080
      - NB_AUTH_SECRET=Wl......
    ports:
      - 33080:33080

I'm wondering which service should I deploy based on the geolocation of the spare server.
Based on September newsletter, it seems that coturn is outdated and only the relay service rels://DOMAIN:PORT should be use.

Also, when I set multiple Relay.Addresses entries in main server's management.json

    "Relay": {
        "Addresses": [
            "rels://netbird.MAIN.com:443/relay",
            "rel://SPARE_IP:33080"
        ],
        "CredentialsTTL": "24h0m0s",
        "Secret": "Wl......"
    },

The netbird status -d only show one relay:

Relays:
  [stun:netbird.MAIN.com:3478] is Available
  [turn:netbird.MAIN.com:3478?transport=udp] is Available
  [rel://SPARE_IP:33080] is Available            # <-- Only the second entry listed here
Originally created by @qiangxinglin on GitHub (Sep 9, 2025). Hi team, I have following config on my spare server (not the one hosted netbird dashboard and api). ``` services: coturn: image: coturn/coturn:latest volumes: - ./turnserver.conf:/etc/turnserver.conf:ro network_mode: host command: - -c /etc/turnserver.conf relay: image: netbirdio/relay:latest environment: - NB_LOG_LEVEL=info - NB_LISTEN_ADDRESS=:33080 - NB_EXPOSED_ADDRESS=rel://SPARE_IP:33080 - NB_AUTH_SECRET=Wl...... ports: - 33080:33080 ``` I'm wondering which service should I deploy based on the geolocation of the spare server. Based on [September newsletter](https://netbird.io/knowledge-hub/september-newsletter), it seems that `coturn` is outdated and only the `relay` service `rels://DOMAIN:PORT` should be use. Also, when I set multiple `Relay.Addresses` entries in main server's `management.json` ``` "Relay": { "Addresses": [ "rels://netbird.MAIN.com:443/relay", "rel://SPARE_IP:33080" ], "CredentialsTTL": "24h0m0s", "Secret": "Wl......" }, ``` The `netbird status -d` only show one relay: ``` Relays: [stun:netbird.MAIN.com:3478] is Available [turn:netbird.MAIN.com:3478?transport=udp] is Available [rel://SPARE_IP:33080] is Available # <-- Only the second entry listed here ```
Author
Owner

@1nerdyguy commented on GitHub (Sep 9, 2025):

I'm curious on this as well. To my understanding, the long-term goal is to have the Relay do all the work, but at the moment CoTurn is still required for...some reason.

As for the single listing, I believe that's because it's showing which one is responding fastest. If you were to, for example, shut down the spare_ip one, I bet status -d would change

@1nerdyguy commented on GitHub (Sep 9, 2025): I'm curious on this as well. To my understanding, the long-term goal is to have the Relay do all the work, but at the moment CoTurn is still required for...some reason. As for the single listing, I believe that's because it's showing which one is responding fastest. If you were to, for example, shut down the spare_ip one, I bet status -d would change
Author
Owner

@saule1508 commented on GitHub (Sep 11, 2025):

I think coturn is still needed for the STUN functionality, which is a very lightweight functionality that can be done via public stun servers, google for example (there is no authentication for stun as the cost of authentification is higher than the cost of providing the service).
We have two netbird networks, one with relay and one with coturn, both work fine

@saule1508 commented on GitHub (Sep 11, 2025): I think coturn is still needed for the STUN functionality, which is a very lightweight functionality that can be done via public stun servers, google for example (there is no authentication for stun as the cost of authentification is higher than the cost of providing the service). We have two netbird networks, one with relay and one with coturn, both work fine
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2256