Nginx Reverse Proxy...
 
Notifications
Clear all

Nginx Reverse Proxy Livekit

3 Posts
1 Users
0 Reactions
234 Views
(@aurora)
Posts: 4
Active Member
Topic starter
 

I had another WebRTC server application running on my hardware (a nextcloud talk instance) so I needed a custom configuration. I didn't go through the automated installer so ended up doing some manual things, including installing livekit from scratch while setting up the configuration. 

Things to note for a Linux Install:

  • The livekit server runs multiple servers. DSTC connects to livekit on port 7880. This needs a reverse proxy to run. There is a section in your DSTC configuration file (I installed DSTC to /opt instead of /home, so mine is at /opt/dstc/configs in config.json) where you need to set your domain. Do not include the protocol - only include the domain name (livetalk.yourdomain.com). 
  • The configuration file that livetalk actually uses can be changed in the systemd services file for livetalk. If you think there is an error, connect to your DSTC server and take a look at your console network traffic as well as your headers. Try starting the livetalk server manually as well (`sudo livetalk-server --config /path/to/livetalk/yaml/file`)
  • I had to change the port in my livetalk.yaml file as 3478 was already in use by a nextcloud talk app. I just changed it to 3479 without any issues seeminly

This topic was modified 2 months ago 5 times by aurora
 
Posted : 17/02/2026 11:14 am
(@aurora)
Posts: 4
Active Member
Topic starter
 
server {
    server_name livekit.mydomain.com;

    access_log  removed link ;
    error_log  removed link ;

    location / {
        proxy_pass  http://localhost:7880; 
        proxy_http_version 1.1;
        proxy_set_header   Access-Control-Allow-Origin *;
        proxy_set_header   Upgrade            $http_upgrade;
        proxy_set_header   Connection         "upgrade";
        proxy_set_header   Host               $host;
        proxy_set_header   X-Real-IP          $remote_addr;
        proxy_set_header   X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto  $scheme;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate  removed link ; # managed by Certbot
    ssl_certificate_key  removed link ; # managed by Certbot
    include  removed link ; # managed by Certbot
    ssl_dhparam  removed link ; # managed by Certbot

}

server {
    if ($host = livekit.mydomain.com) {
        return 301  https://$host$request_uri; 
    } # managed by Certbot


    listen 80;

    server_name livekit.mydomain.com;
    return 404; # managed by Certbot
}

 
Posted : 17/02/2026 11:23 am
(@aurora)
Posts: 4
Active Member
Topic starter
 

Make sure the secret matches what the key is set to in livetalk.yaml (the config file you set in your systemd service file for livetalk)

Also do not forget to create a DNS A record for your subdomain! I use a wildcard on Cloudfare's DNS management because all my subdomains are bound to a single IP.

        "livekit": {
            "enabled": true,
            "key": "dev",
            "secret": "[REDACTED]",
            "url": "livekit.mydomain.com"
        },

 
Posted : 17/02/2026 11:26 am
Share:
Scroll to Top