I am trying to deploy livekit and sip server on my...
# ask-ai
l
I am trying to deploy livekit and sip server on my own server can you give me exact steps on infra as well as the server configuration along with the ports and everything that needs to be done to get the sip server up and running along with the livekit server
t
Thanks for reaching out, Ritesh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To help you get started with deploying LiveKit and the SIP server on your own server, here’s a friendly step-by-step guide: Infrastructure and Server Configuration You have the option to deploy the LiveKit SIP server either using Docker Compose or directly natively. I’ll walk you through both! Docker Compose Deployment 1. First, download the Docker Compose file by running:
wget <https://raw.githubusercontent.com/livekit/sip/main/docker-compose.yaml>
2. Then, start the services with:
docker compose up
This will launch a local LiveKit Server and SIP Server connected to Redis, making things smooth and simple. Native Deployment 1. Begin by installing the necessary dependencies: ◦ Go version ≥ 1.18 ◦ Libraries:
libopus
,
libopusfile
,
libsoxr
1. Next, build the SIP server with:
mage build
2. Create a
config.yaml
file including your API credentials and port settings. It should look like this:
Copy code
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
logging:
  level: debug
1. Finally, run the SIP server using:
livekit-sip --config=config.yaml
Required Ports To make sure everything communicates properly, please check that the following ports are open and accessible: • 5060 (UDP/TCP): for SIP signaling • 10000–20000 (UDP): for RTP media used by SIP • 7880 (TCP): for LiveKit API & WebSocket connections • 50000–60000 (UDP): for WebRTC over ICE/UDP (or you can use 7882 for a single UDP mux port) And if you want TURN support (which is optional), please also open: • 3478 (UDP): TURN/UDP • 5349 (TLS): TURN/TLS Additional Notes • In cloud environments, set
use_external_ip: true
to use your public IP address. • Make sure Redis is up and running and accessible by both LiveKit and SIP servers. • For WebRTC to work smoothly, HTTPS and valid TLS certificates are necessary. If you run into any questions or need a hand with any part of this, please don’t hesitate to reach out. I’m here to help you every step of the way! Sources: Ports and firewall | LiveKit Docs | SIP &amp; Telephony Integration | livekit/livekit_composite | DeepWiki | Running LiveKit on AWS | Self-hosted SIP server | LiveKit Docs | pkg/sip/server.go
l
What if I am using a reverse proxy like nginx to route the requests. What would be the additional steps required there
t
I'd love to understand a bit more about how you're planning to use Nginx as a reverse proxy. Could you share some details like: • Are you thinking of using Nginx for SSL termination, load balancing, or maybe both? • Which services are you aiming to route through Nginx—LiveKit API, WebSocket, SIP signaling, or others? • Do you have specific domain names or subdomains set up for these services? Once I have a clearer picture, I'll be more than happy to walk you through the configuration steps to get everything set up smoothly. Sources: Deploying LiveKit | LiveKit Docs
l
I have a domain setup for this and all the requests on that domain will be transferred to the actual instance on AWS which has the livekit and sip docker image running along with redis. I am able to make agents connect to the livekit server but they cannot talk and also no sip request is being accepted as well
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!