Jitsi behind NAT and HAproxy

Hello everyone. I tried a lot of configurations to make it works but finally i gave up :frowning: and need help. Of course there is a problem with third connection. With 2 using PvP works OK.

Internal server (Ubuntu installed) serve jitsi-meet by nginx conf:

server_names_hash_bucket_size 64;

server {
    listen 1188;
    server_name jitsi.domain.net;

    add_header Strict-Transport-Security "max-age=31536000";

    ssl_certificate /etc/jitsi/meet/jitsi.domain.net.crt;
    ssl_certificate_key /etc/jitsi/meet/jitsi.domain.net.key;

    root /usr/share/jitsi-meet;
    ssi on;
    index index.html index.htm;
    error_page 404 /static/404.html;

    location = /config.js {
        alias /etc/jitsi/meet/jitsi.domain.net-config.js;

    location = /external_api.js {
        alias /usr/share/jitsi-meet/libs/external_api.min.js;

    #ensure all static content can always be found first
    location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
        add_header 'Access-Control-Allow-Origin' '*';
        alias /usr/share/jitsi-meet/$1/$2;

    # BOSH
    location = /http-bind {
        proxy_pass      http://localhost:5280/http-bind;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $http_host;

    location ~ ^/([^/?&:'"]+)$ {
        try_files $uri @root_path;

    location @root_path {
        rewrite ^/(.*)$ / break;

nginx is behind haproxy

    log local2
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy
    stats socket /var/lib/haproxy/stats
    stats socket *:1999 level admin
    stats socket /var/run/haproxy.sock mode 600 level admin
    server-state-file /etc/haproxy/haproxy.state 
    tune.ssl.default-dh-param 2048

    mode                    http
    log                     global
    option                  httplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

listen stats 
    bind *:8085 
    stats enable
    stats uri /stats
    stats realm HAProxy-04\ Statistics
    stats auth admin:pass
    stats admin if TRUE 

frontend wildcard.domain.com
    bind *:80
    bind *:443 ssl crt /etc/ssl/certs/domain_net_2019_06_15.pem
    reqadd X-Forwarded-Proto:\ https
    http-request set-header X-Forwarded-Proto https if { ssl_fc }
    redirect scheme https if !{ ssl_fc }

    # Define hosts
    acl host_jitsi hdr(host) -i jitsi.domain.net

    ## figure out which one to use
    use_backend nginx if host_jitsi

backend nginx
    option httpclose
    option forwardfor
    server cookie A check

cat /etc/jitsi/videobridge/sip-communicator.properties (current [lot time modified] setup)


Haproxy is at same IP as jitsi and haproxy is behind NAT - there are port forwarding on ports 443, 4443-4444 and 12345

You need to port forward udp 10000 from to .

thanks for response - even with this parameter?

@damencho can you explain me how to understand this:

a=candidate:3505284190 1 udp 2122260223 53541 typ host generation 0 network-id 1 network-cost 10
a=candidate:2657982638 1 tcp 1518280447 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=candidate:476273613 1 udp 1686052607 12955 typ srflx raddr rport 53541 generation 0 network-id 1 network-cost 10
a=candidate:476273613 1 udp 1686052607 27349 typ srflx raddr rport 53541 generation 0 network-id 1 network-cost 10
a=candidate:476273613 1 udp 1686052607 23378 typ srflx raddr rport 53541 generation 0 network-id 1 network-cost 10

I suppose these are from your P2P peer connection.

OK. Solved it. To anyone reading this topic. It’s REALLY important to solve all logs errors. Firstly I reinstalled everything. Then I started to solve logs issues. Last one was related to this topic issue. I saw PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and fixed it by workaround mentioned by @damencho here https://github.com/jitsi/jitsi-meet/issues/2676#issuecomment-377039435 . Now everything works as expected.

I have the very same problem… Server is Debian buster + Apache, basic install + jitsi and nothing else.

The web UI appears OK. Everything going through port 443 (and haproxy) is fine. However, no video stream ever shows up. And no meaningful error in the logs either (only lots of “INFOS” lines).

Port 10000 on the WAN IP is already used, so I set up 10111 instead:




The firewall redirect port 10111 to the right IP, but nothing never hits this port. I also redirected port 5347 because jetty seems to be listening there, no change. I also checked chrome://webrtc-internals and setRemoteDescription lists the right ports and IPs (both private and public IPs).

But no video and no sound… Any idea?