ancient-iron-20196
09/16/2025, 9:49 AMtall-airline-16756
09/16/2025, 9:49 AMtall-airline-16756
09/16/2025, 9:50 AMserver {
listen 443 ssl http2;
server_name <http://your-domain.com|your-domain.com>;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
# WebSocket upgrade for LiveKit signaling
location / {
proxy_pass <http://localhost:7880;>
proxy_http_version 1.1;
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;
}
}
2. RTMP Ingress (Optional):
stream {
server {
listen 1935;
proxy_pass localhost:1935;
}
}
3. WHIP Ingress (Optional):
server {
listen 443 ssl;
server_name <http://your-domain.com|your-domain.com>;
ssl_certificate /path/to/whip-cert.pem;
ssl_certificate_key /path/to/whip-key.pem;
location /whip {
proxy_pass <http://localhost:8080;>
proxy_http_version 1.1;
proxy_set_header Host $host;
}
}
To ensure everything runs smoothly, please make sure to:
• Open UDP ports 50000-60000 for WebRTC media traffic.
• Configure your LiveKit server with the correct base URLs for RTMP and WHIP.
• Use NGINX's stream module for RTMP and UDP traffic if needed.
If you have any questions or need more examples, feel free to reach out. I'm here to help you every step of the way!
Sources: config-sample.yaml | Docs::Home | Docs::Home | Docs::Homeancient-iron-20196
09/16/2025, 9:52 AMtall-airline-16756
09/16/2025, 9:52 AMancient-iron-20196
09/16/2025, 9:53 AMtall-airline-16756
09/16/2025, 9:55 AMLIVEKIT_URL to: <wss://enbot-dev.enteract.cloud>. This is the URL your clients will use to connect to the LiveKit server.
2. TURN Configuration:
Next, update your TURN settings in the LiveKit configuration file like this:
turn:
enabled: true
tls_port: 443
domain: enbot-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
Make sure the domain matches your TLS certificate, and the tls_port is set to 443, which helps with compatibility across most networks.
3. NGINX Configuration:
Finally, in your current NGINX configuration, add the following inside the location / block to proxy WebSocket traffic to LiveKit:
proxy_pass <http://127.0.0.1:7880;>
proxy_http_version 1.1;
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;
If anything feels unclear or if you’d like me to walk you through any part of this, just let me know—I’m here to help!
Sources: Docs::Recipes | web/.env.sample | env.example | .env.example | Deploying LiveKit | LiveKit Docsancient-iron-20196
09/16/2025, 9:57 AMtall-airline-16756
09/16/2025, 9:58 AMlocation / block, I noticed there are two proxy_pass directives (<API_BACKEND_URL> and <LIVEKIT_SIGNALING_URL>). Since NGINX only allows one proxy_pass per location block, it would be best to remove the proxy_pass <API_BACKEND_URL> line if this block is intended for LiveKit traffic.
2. WebSocket Upgrade:
You’ve done a great job including the WebSocket upgrade headers! Just double-check that the proxy_pass is pointing to <LIVEKIT_SIGNALING_URL> to ensure LiveKit signaling works perfectly.
3. TURN Configuration:
To make sure your TURN server is set up correctly, please confirm these settings in your LiveKit configuration file:
turn:
enabled: true
tls_port: 443
domain: enbot-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
4. Testing:
Once you’ve made these tweaks, it’s a good idea to test your configuration using nginx -t to catch any syntax issues. If all looks good, go ahead and reload NGINX with nginx -s reload.
If you run into any bumps along the way or have more questions, please don’t hesitate to reach out—I’m here to help!ancient-iron-20196
09/16/2025, 10:11 AMtall-airline-16756
09/16/2025, 10:11 AMserver {
listen 443 ssl;
server_name enbot-dev.enteract.cloud;
ssl_certificate /etc/pki/tls/certs/star.enteract.cloud.crt;
ssl_certificate_key /etc/pki/tls/private/star.enteract.cloud.key;
ssl_trusted_certificate /etc/pki/tls/certs/star.enteract.cloud.ca-bundle.pem;
access_log /var/log/nginx/livekit-access.log;
error_log /var/log/nginx/livekit-error.log warn;
location / {
proxy_pass <http://127.0.0.1:7880;>
proxy_http_version 1.1;
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;
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
}
}
2. Keep Existing Configuration for Other Services:
You can leave your existing server blocks for other services, like enbot-dev-api, just as they are. This way, LiveKit traffic will be handled separately without affecting anything else.
3. Test and Reload:
• Run nginx -t to check for any syntax errors in your configuration.
• Reload NGINX with nginx -s reload to apply the changes.
If you run into any issues or want me to help with further tweaks, just let me know—I’m here to help!ancient-iron-20196
09/17/2025, 2:14 PMtall-airline-16756
09/17/2025, 2:14 PMdomain field in your TURN setup should exactly match the domain name of your LiveKit server, but without including the wss:// prefix. Here’s how you can update your TURN configuration:
turn:
enabled: true
tls_port: 443
domain: livekit-server-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
Once you’ve made this adjustment, please restart your LiveKit server and try the connection again. If you run into any more trouble or have questions, I’m here to help—just let me know!ancient-iron-20196
09/17/2025, 2:16 PMtall-airline-16756
09/17/2025, 2:16 PM8496 is already being used by another process. No worries—we can work through this together! You have a couple of options to fix this:
1. Change the TURN Port:
You can update your TURN configuration in the lk_server_config.yaml file to use a different port that’s free. For example:
turn:
enabled: true
tls_port: 8500
domain: livekit-server-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
After that, don’t forget to update your NGINX configuration to use this new port:
upstream livekit-server-dev-api {
server 127.0.0.1:8500;
}
2. Identify and Stop the Conflicting Process:
If you prefer, you can find out which process is using port 8496 by running this command:
sudo lsof -i :8496
Once you know what’s running there, you can stop that process if it’s not needed.
After making these changes, just restart your LiveKit server and NGINX. If you run into any trouble or have more questions, feel free to reach out—I’m here to help!ancient-iron-20196
09/17/2025, 2:18 PMtall-airline-16756
09/17/2025, 2:18 PM8496, no worries! You can easily configure it to route traffic to the LiveKit TURN server running on a different internal port. Let me guide you through the steps to adjust your setup:
1. Update LiveKit TURN Configuration:
First, let's change the TURN server's tls_port to an unused port, like `8500`:
turn:
enabled: true
tls_port: 8500
domain: livekit-server-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
2. Update NGINX to Route TURN Traffic:
Next, update your NGINX configuration so it forwards traffic from port 8496 to the TURN server's new port:
server {
listen 8496 ssl;
server_name livekit-server-dev.enteract.cloud;
ssl_certificate /etc/pki/tls/certs/star.enteract.cloud.crt;
ssl_certificate_key /etc/pki/tls/private/star.enteract.cloud.key;
ssl_trusted_certificate /etc/pki/tls/certs/star.enteract.cloud.ca-bundle.pem;
location / {
proxy_pass <http://127.0.0.1:8500;>
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
3. Test and Restart:
• Run nginx -t to check the configuration for any syntax errors.
• Reload NGINX with nginx -s reload to apply the changes.
• Finally, restart the LiveKit server so the new TURN configuration takes effect.
This way, NGINX will handle incoming traffic on port 8496 and forward it smoothly to the TURN server on port 8500. If you run into any questions or need a hand with any step, just let me know—I’m here to help!ancient-iron-20196
09/17/2025, 2:30 PMtall-airline-16756
09/17/2025, 2:31 PMlocation / block in your NGINX configuration for port 443 includes the necessary WebSocket headers and properly routes traffic to the LiveKit signaling port (7880):
server {
listen 443 ssl;
server_name livekit-server-dev.enteract.cloud;
ssl_certificate /etc/pki/tls/certs/star.enteract.cloud.crt;
ssl_certificate_key /etc/pki/tls/private/star.enteract.cloud.key;
ssl_trusted_certificate /etc/pki/tls/certs/star.enteract.cloud.ca-bundle.pem;
location / {
proxy_pass <http://127.0.0.1:7880;>
proxy_http_version 1.1;
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;
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
}
}
2. Check TURN Configuration:
Next, let’s make sure your TURN server is properly configured and running on port 8365. The NGINX block for port 8496 should forward traffic to the TURN server like this:
server {
listen 8496;
server_name livekit-server-dev.enteract.cloud;
location / {
proxy_pass <http://127.0.0.1:8365;>
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
3. Test Connectivity:
• Make sure the LiveKit server is up and running, and accessible on port 7880.
• Try testing the WebSocket connection using a tool like wscat or even your browser console to confirm that <wss://livekit-server-dev.enteract.cloud> is reachable.
If you give these a try and still run into issues, please don’t hesitate to reach out. I’m here to help you every step of the way!ancient-iron-20196
09/17/2025, 3:05 PMtall-airline-16756
09/17/2025, 3:05 PMkeys:
APIbLLHJzVJJEei: ZSLMLLihE5l8sauRKnmNRIFm9nvC73Yf3k96QOWzbgE
log_level: info
port: 7880
redis:
address: localhost:6379
rtc:
port_range_start: 50000
port_range_end: 60000
tcp_port: 7881
turn:
enabled: true
tls_port: 8365
domain: livekit-server-dev.enteract.cloud
cert_file: /etc/pki/tls/certs/star.enteract.cloud.crt
key_file: /etc/pki/tls/private/star.enteract.cloud.key
Here's a quick explanation to help you understand each part:
• `keys`: These are your API key and secret used for authentication.
• `log_level`: Set to info so you get general logging details.
• `port`: This is the signaling port for WebSocket connections (7880).
• `redis`: Contains the connection details for your Redis instance.
• `rtc`: Configures WebRTC with the port range and TCP fallback port.
• `turn`: Settings for the TURN server, including TLS port, domain, and certificate file paths.
Once you save this as lk_server_config.yaml, you can start your LiveKit server by running:
livekit-server --config lk_server_config.yaml
If you have any questions or need help tweaking this further, please don’t hesitate to reach out. I’m here to support you!ancient-iron-20196
09/17/2025, 3:13 PMtall-airline-16756
09/17/2025, 3:13 PMLIVEKIT_URL not being formatted quite right. To get everything working smoothly, the LIVEKIT_URL should include the WebSocket protocol prefix (wss://). Here’s how you can update your environment variable:
LIVEKIT_URL=<wss://livekit-server-dev.enteract.cloud>
Also, a few other things to double-check:
1. NGINX Configuration:
Your NGINX setup for port 443 is properly routing WebSocket traffic to <LIVEKIT_SIGNALING_URL>, which is great!
2. TURN Configuration:
The TURN server is set up on port 8365, and NGINX is forwarding traffic from 8496 to 8365. That looks good too.
3. Restart Services:
• Once you’ve updated the LIVEKIT_URL, be sure to restart your application so the changes take effect.
• Also, please make sure the LiveKit server is running and accessible on port 7880.
If you run into any more issues or have questions, feel free to reach out—I’m here to help!ancient-iron-20196
10/16/2025, 10:20 AMtall-airline-16756
10/16/2025, 10:20 AM8496, but since the LiveKit server is running on port 7880, updating this will help. Here’s how you can update the upstream block:
upstream livekit-server-dev {
server 127.0.0.1:7880;
}
2. Verify the Proxy Pass:
In the location / block, double-check that the proxy_pass directive points to the updated upstream like this:
proxy_pass <http://127.0.0.1:7880;>
3. Check WebSocket Headers:
Your WebSocket headers seem to be set up correctly. Just make sure the $connection_upgrade variable is properly defined in your NGINX configuration as shown here:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
4. Test Connectivity:
• Confirm that the LiveKit server is up and running on port 7880.
• Try testing the WebSocket connection with a tool like wscat to see if <wss://livekit-server-dev.enteract.cloud> is reachable.
5. Restart Services:
• Once you’ve made these changes, restart NGINX using nginx -s reload.
• Also, restart the LiveKit server to make sure all the new settings take effect.
If you run into any more issues or need a hand with anything else, please don’t hesitate to reach out. I’m here to help!ancient-iron-20196
10/16/2025, 10:53 AMtall-airline-16756
10/16/2025, 10:54 AMlivekit-server-dev.enteract.cloud couldn’t be verified. This usually happens when the client can’t validate the certificate chain because an intermediate certificate might be missing or incorrect. Don’t worry, I’m here to help you through it! Here’s what you can do:
1. Verify the Certificate Chain:
First, double-check that the ssl_trusted_certificate in your NGINX configuration includes the full certificate chain, which means the root and intermediate certificates. You can update your NGINX configuration like this:
ssl_certificate /etc/pki/tls/certs/star.enteract.cloud.crt;
ssl_certificate_key /etc/pki/tls/private/star.enteract.cloud.key;
ssl_trusted_certificate /etc/pki/tls/certs/star.enteract.cloud.ca-bundle.pem;
2. Test the Certificate:
Next, try running this command to check the certificate chain:
openssl s_client -connect livekit-server-dev.enteract.cloud:443 -showcerts
This will help you see if the full chain is being presented and is valid.
3. Update the Client:
If your client is using a custom CA bundle, make sure it includes the intermediate certificates. If you’re just testing and want a quick workaround (though not recommended for production), you can disable SSL verification temporarily like this:
verify_ssl=False
4. Restart NGINX:
Finally, after you’ve updated the certificate settings, don’t forget to restart NGINX to apply the changes:
nginx -s reload
If you run into any trouble or have questions along the way, just let me know—I’m here to help!