OpenVidu behind existing nginx-proxy on the same host

Hi there!
I’m trying to deploy dockerized openvidu server onto existing set of other containers. Setup based on openvidu/openvidu-server & kurento/kurento-media-server images only is in my docker-compose file.

Every single tutorial i’ve checked so far instructs to use nginx (namely openvidu/openvidu-proxy) as a gateway before all the other components coordinated by openvidu. But I don’t have a need for that, because I have already one – jwilder/nginx-proxy – which does an awesome job of automated reverse proxy configs for every new container added. Current setup is such that every service is tight with another by means of common default network created by docker. In conjunction with jrcs/letsencrypt-nginx-proxy-companion image based container the job for obtaining certificates for all the virtual host I have in my stack of containers is done in automatted manner.
So I just would like to integrate openvidu stack in the same way that other services around all together on the same host machine.
Is it possible not using “network_mode: host” for openvidu related services but rather take the common default docker network?
If so what is the most appropriate architecture I should implement?

1 Like

I know very well jwilder/nginx-proxy, but it is nice when you have containers which only bind two or three ports, but i don’t think this image will fit the use case of openvidu. OpenVidu needs network host because it needs a lot ports to work properly.

When you bind port ranges in Docker, launch time and performance are really slow because of Docker updating ip tables to bind ports into the host network. That’s why OpenVidu needs network_mode: host to work properly.

If you need to modify the nginx configuration of OpenVidu, take a look to this:
https://docs.openvidu.io/en/2.17.0/troubleshooting/#16-how-can-i-customize-deployed-nginx

Regards.

1 Like

Yeah. I’ve already experienced such the situation while trying to bind “just” a hundred of ports. Docker actually hung right away. Haha. So you have confirmed my tendency to deploy openvidu into separate dedicated server. Thanks!

1 Like

@zubrdev I have read these tutorial many times. so nice of you for sharing this wonderful info with us. I will try this as well as you mentioned.