microscopic-dress-75199
09/24/2025, 12:58 PMtall-airline-16756
09/24/2025, 12:58 PMtall-airline-16756
09/24/2025, 12:58 PMmicroscopic-dress-75199
09/24/2025, 1:03 PMservices:
redis:
image: redis
volumes:
- redis_data:/data
ports:
- 6379:6379
# The following line might be uncommented to run on MacOS
# for testing and development purposes only.
network_mode: host
livekit:
image: livekit/livekit-server
command: --config /etc/livekit.yaml
network_mode: host
volumes:
- ./livekit.yaml:/etc/livekit.yaml
depends_on:
redis:
condition: service_started
sip:
image: livekit/sip
network_mode: host
environment:
SIP_CONFIG_BODY: |
api_key: 'devkey'
api_secret: 'secret'
ws_url: '<ws://localhost:7880>'
redis:
address: 'localhost:6379'
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
media_use_external_ip: true
logging:
level: debug
volumes:
redis_data:tall-airline-16756
09/24/2025, 1:04 PMdocker-compose.yaml file from the SIP repository. This lets you deploy everything with a single command:
wget <https://raw.githubusercontent.com/livekit/sip/main/docker-compose.yaml>
docker compose up
2. Configure SIP Server: Make sure your SIP configuration has use_external_ip: true set. This exposes your public IP for SIP connections, so your SIP URI will look like <public-ip>:5060.
3. Configure LiveKit Server: In the livekit.yaml file, bind the server to 0.0.0.0 and enable use_external_ip: true. This helps route traffic correctly through your public IP.
4. Set Network Mode: It’s important to use network_mode: host in your Docker setup. This shares the host’s network stack, which is essential for SIP and media traffic to flow smoothly.
5. Open Required Ports: Please double-check that these ports are open on your instance’s firewall:
◦ TCP 7880 – LiveKit signaling
◦ TCP 7881 – RTC (WebRTC over TCP)
◦ UDP 7882 – RTC (WebRTC over UDP)
◦ UDP 5060 – SIP signaling
◦ UDP 10000–20000 – RTP media traffic
1. Agent Configuration: Don’t forget to set the LIVEKIT_URL environment variable in your agent to your public WebSocket URL, like wss://<your-ip>.
Following these steps will make sure all your components are reachable via your instance’s public IP address. If you have any questions or run into any issues, please feel free to reach out—I’m here to help!
Sources: Deploying LiveKit | LiveKit Docs | Running LiveKit locally | LiveKit Docs | docker-compose.yaml | tests/docker-compose.yml | Self-hosted SIP server | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 1:05 PMtall-airline-16756
09/24/2025, 1:06 PMwss:// might not work properly, and your requests could be rejected. You'll need a domain and a valid SSL certificate issued by a trusted authority.
If you're using Docker Compose with Caddy, the great news is that SSL certificates can be automatically handled for you through services like Let’s Encrypt—so no need to worry about manually managing them. For TURN/TLS, just keep in mind that additional certificates might be necessary unless you’re using external TLS termination.
If you'd like, I’m here to help you step-by-step with setting up your certificates or automating the process. Just let me know!
Sources: Deploying LiveKit | LiveKit Docs | Deploy to a VM | LiveKit Docs | Deploy to Kubernetes | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 1:09 PMport: 7880
redis:
address: localhost:6379
keys:
devkey: secret
rtc:
port_range_start: 50000
port_range_end: 60000
tcp_port: 7881
udp_port: 7882
use_external_ip: true
# Network interface filter to fix UDP binding issues
interfaces:
excludes:
- docker0
- br-*
- veth*
# IP filter to only use IPv4 and exclude problematic IPv6 ranges
ips:
includes:
- 127.0.0.1/32
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
Also, I dont want to use default devkey and secret configs when deploying to production how do i manage that?tall-airline-16756
09/24/2025, 1:10 PM.env file like this:
`LIVEKIT_API_KEY=your_api_key
LIVEKIT_API_SECRET=your_api_secret`Just remember to add this file to .gitignore so it doesn’t get pushed to version control.
2. Use LiveKit's Secrets Management: If you’re deploying on LiveKit Cloud, you can take advantage of their encrypted secrets system to safely inject your secrets into containers when they run.
3. Separate Environments: It’s helpful to keep different API keys and configurations for development, staging, and production. This way, you reduce the chance of accidental exposure or misuse.
4. Rotate Keys Regularly: To keep things extra secure, try to update your API keys and secrets from time to time.
If you’d like, I’m here to help you set up environment variables or manage your secrets anytime!
Sources: LiveKit | README.md | README.md | Deploying to custom environments | LiveKit Docs | Secrets management | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 1:11 PMtall-airline-16756
09/24/2025, 1:12 PMdocker-compose.yaml, caddy.yaml, and other important files you’ll need.
2. Deploy with Docker Compose: Next, copy those generated files to your server and launch the services with:
`cd your-domain-folder
sudo docker-compose up -d`Caddy will then automatically handle requesting and renewing TLS certificates for your domain, so you don’t have to worry about it.
3. Make Sure DNS and Firewall Are Set:
◦ Create a DNS A record that points your domain to your server’s public IP address.
◦ Open these crucial ports to keep everything running smoothly: 80 (HTTP), 443 (HTTPS), 7881 (WebRTC TCP), and 50000–60000 (WebRTC UDP).
1. Check That the Certificate Was Issued: You can verify everything went well by checking Caddy’s logs with:
sudo docker-compose logs livekit-caddy-1
This method is really great for demo deployments because it takes the hassle out of SSL/TLS setup and ongoing management. If you hit any bumps or have questions along the way, please don’t hesitate to reach out—I’m here to help!
Sources: Deploy to a VM | LiveKit Docs | Deploying LiveKit | LiveKit Docs | Deploy to Kubernetes | LiveKit Docs | gclb-sample.yamlmicroscopic-dress-75199
09/24/2025, 1:16 PMdocker pull livekit/generate
it wants to forcefully setup the TURN and I have to enter a domain name for that as well. Since i am using it for telephony only do i still need to setup TURN?tall-airline-16756
09/24/2025, 1:17 PMmicroscopic-dress-75199
09/24/2025, 1:22 PMdocker run --rm -it -v $PWD:/output livekit/generate
It asks for What to deploy. I select livekit server
2. It asks for primary domain : abc.com
3. Then it asks for TURN domain name: which I cant skip so kind of forcefully setup TURN.
4. SSL : I select lets encrypt
5. Select version: I select latest
6. Use external redis: I select no.
7. Geenrate a script: I select Cloud init for Ubuntutall-airline-16756
09/24/2025, 1:23 PM<http://turn.example.com|turn.example.com>. Don’t worry, TURN will stay disabled unless you explicitly turn it on in the config.
2. After generating your config, double-check that turn.enabled: false is set in your livekit.yaml file.
If you’d like, I’m here to help you tweak the configuration or answer any other questions you might have. Just let me know!
Sources: Deploy to a VM | LiveKit Docs | config-sample.yaml | Ports and firewall | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 1:25 PM# This docker-compose requires host networking, which is only available on Linux
# This compose will not function correctly on Mac or Windows
services:
caddy:
image: livekit/caddyl4
command: run --config /etc/caddy.yaml --adapter yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./caddy.yaml:/etc/caddy.yaml
- ./caddy_data:/data
livekit:
image: livekit/livekit-server:latest
command: --config /etc/livekit.yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./livekit.yaml:/etc/livekit.yaml
redis:
image: redis:7-alpine
command: redis-server /etc/redis.conf
restart: unless-stopped
network_mode: "host"
volumes:
- ./redis.conf:/etc/redis.conf
Can i just add my sip server image in here?
sip:
image: livekit/sip
network_mode: host
environment:
SIP_CONFIG_BODY: |
api_key: 'devkey'
api_secret: 'secret'
ws_url: '<ws://localhost:7880>'
redis:
address: 'localhost:6379'
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
media_use_external_ip: true
logging:
level: debug
?Something like this ?tall-airline-16756
09/24/2025, 1:26 PMservices:
caddy:
image: livekit/caddyl4
command: run --config /etc/caddy.yaml --adapter yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./caddy.yaml:/etc/caddy.yaml
- ./caddy_data:/data
livekit:
image: livekit/livekit-server:latest
command: --config /etc/livekit.yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./livekit.yaml:/etc/livekit.yaml
redis:
image: redis:7-alpine
command: redis-server /etc/redis.conf
restart: unless-stopped
network_mode: "host"
volumes:
- ./redis.conf:/etc/redis.conf
sip:
image: livekit/sip
network_mode: host
environment:
SIP_CONFIG_BODY: |
api_key: 'devkey'
api_secret: 'secret'
ws_url: '<ws://localhost:7880>'
redis:
address: 'localhost:6379'
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
media_use_external_ip: true
logging:
level: debug
Just a couple of things to keep in mind:
• Make sure ports 5060 (for SIP signaling) and 10000–20000 (for RTP media) are open on your firewall.
• Your SIP server should connect to the same Redis instance as LiveKit for smooth communication.
• Don’t forget to create SIP Trunks and Dispatch Rules using the LiveKit SDK or CLI to properly handle inbound calls.
If you run into any questions or need a hand with this setup, please don’t hesitate to reach out—I’m here to help!
Sources: test/integration/livekit_test.go | Self-hosted SIP server | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 2:15 PMtall-airline-16756
09/24/2025, 2:16 PM<public-ip>:5060) as your SIP URI. This way, your SIP server will be reachable from outside networks, as long as the necessary ports (5060 for signaling and 10000–20000 for RTP media) are open and accessible.
If you have any more questions or need help setting things up, please don’t hesitate to ask—I’m here to support you!
Sources: Self-hosted SIP server | LiveKit Docs | README.md | Secure trunking | LiveKit Docs | Ports and firewall | LiveKit Docsmicroscopic-dress-75199
09/24/2025, 2:18 PMtall-airline-16756
09/24/2025, 2:18 PM<public-ip>:5060. Just make sure that port 5060 (used for SIP signaling) and the RTP media port range (10000–20000) are open and reachable from the internet.
If you have any questions or need a hand with anything else, please don’t hesitate to reach out—I’m here to help!microscopic-dress-75199
09/24/2025, 2:53 PMtall-airline-16756
09/24/2025, 2:54 PMmicroscopic-dress-75199
09/24/2025, 3:46 PMdocker run --rm -it -v $PWD:/output livekit/generate inside the instance or on my local machine ?tall-airline-16756
09/24/2025, 3:47 PMdocker run --rm -it -v $PWD:/output livekit/generate right on your local machine. This will create the configuration files you need (like docker-compose.yaml, livekit.yaml, and others) locally. After that, you can easily transfer these files to your server or instance for deployment.
Once you have the files on your instance, just run docker compose up there to get your services up and running.
If you have any questions or want a hand with any of these steps, please don’t hesitate to ask—I’m here to help!microscopic-dress-75199
09/24/2025, 3:48 PMtall-airline-16756
09/24/2025, 3:48 PMsip:
image: livekit/sip
network_mode: host
environment:
SIP_CONFIG_BODY: |
api_key: 'your_api_key'
api_secret: 'your_api_secret'
ws_url: '<ws://localhost:7880>'
redis:
address: 'localhost:6379'
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
media_use_external_ip: true
logging:
level: debug
2. Check Your Redis Configuration: It’s important that the SIP server connects to the same Redis instance as your LiveKit server. Please double-check that the Redis service is correctly set up in your docker-compose.yaml file.
3. Open the Necessary Ports: To ensure everything runs smoothly, please make sure these ports are open in your firewall:
◦ 5060 (SIP signaling)
◦ 10000–20000 (RTP media)
1. Set Up SIP Trunks and Dispatch Rules: You can use the LiveKit SDK or CLI to create SIP trunks and dispatch rules that will manage inbound calls effectively.
If you have any questions or need help with any of these steps, please don’t hesitate to reach out—I’m here to assist you!microscopic-dress-75199
09/24/2025, 3:55 PMtall-airline-16756
09/24/2025, 3:56 PM<http://livekit.abc.com|livekit.abc.com>, you'll want to share that with your SIP provider along with the port number. For instance, your SIP URI would look like <http://livekit.abc.com:5060|livekit.abc.com:5060> if you're using port 5060 for SIP signaling.
Also, please double-check that the domain points to your server's public IP address and that port 5060 is open and reachable from the internet.
I'm here if you'd like me to explain anything further or if you have any other questions!microscopic-dress-75199
09/24/2025, 7:27 PMtall-airline-16756
09/24/2025, 7:28 PMmicroscopic-dress-75199
09/24/2025, 7:28 PMtall-airline-16756
09/24/2025, 7:28 PMmicroscopic-dress-75199
09/24/2025, 7:29 PMtall-airline-16756
09/24/2025, 7:29 PM