Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
Proxying COTURN behind NGINX with SSL and other servers

I am trying to use webrtc inside of a difficult network that blocks all ports but 80 and 443 outbound and everything inbound. So I need a coturn server running to listen to 80 and 443 with SSL certs. I would like to run that alongside a REST API server, some websocket servers, and NGINX hosting static files. I am starting from this working nginx config. There is an example in another so question on how to forward on the root. But I wasn't able to get the same thing to work with a path. For example, I would like the turn server to work on <url>/coturn. I would prefer the ssl be handled by nginx but it is fine if that job gets passed to coturn.

Can anyone show me a nginx config that handles coturn with multiple other endpoints like this?

Edit: Here is a very minimal config, just trying to get the proxying to work similarly to this:

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}

stream{
    upstream turn_secure{
        server coturn:5349;
    }
    upstream turn{
        server coturn:3478;
    }

    server{
        listen 3478;
        proxy_pass turn;
    }
    server{
        listen 3478 udp;
        proxy_pass turn;
    }
    server{
        listen 5349;
        proxy_pass turn_secure;
    }
    server{
        listen 5349 udp;
        proxy_pass turn_secure;
    }
}

The domain references are given by the docker-compose that I have running.

But running this through trickleice, I get a non-reachable error. If I instead run coturn exposed to the internet then it seems to work as expected.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!