What server/technology is needed for self-hosting ...
# ask-ai
a
What server/technology is needed for self-hosting LiveKit? Can it be done on a VPS? If so, which one do you recommend and with what power?
t
Thanks for reaching out, Tanguy. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you get started with LiveKit! You can definitely self-host it on a VPS or any virtual machine using Docker Compose, which makes deployment quite straightforward. Here’s a recommended setup to keep in mind: • Operating System: Ubuntu or Amazon Linux • Containerization: Docker and Docker Compose • Reverse Proxy & TLS: Caddy for automatic SSL certificate management For a smooth production experience, it’s best to use compute-optimized VPS instances with high network throughput—around 10 Gbps is ideal. While there aren't strict minimum specs for the main server, performance really depends on your CPU and bandwidth. For additional services like Egress or Ingress, I’d recommend at least 4 CPUs and 4 GB RAM per instance since these can be resource-intensive. If you'd like, I’m here to guide you through choosing a VPS provider or help you set up the environment step-by-step. Just let me know how I can assist! Sources: Deploy to a VM | LiveKit Docs | Docs::Home | Self-hosting the Egress Service | LiveKit Docs | Self-hosting the Ingress Service | LiveKit Docs | Docs::Home
a
Actually i have a vps on elestio with this performance : Server type: LARGE-4C-8G-CAX (4 VCPU s - 8 GB RAM - 80 GB storage) Provider: hetzner Do you think it's enought ?
t
Thank you for sharing the details of your VPS! With 4 vCPUs, 8 GB RAM, and 80 GB storage, you’re in a good spot to host LiveKit, especially if you’re starting with smaller-scale deployments or just testing things out. That said, when it comes to production use, the key will be how many users you expect at the same time and the type of workload, like media processing or transcoding. If you’re planning on handling more resource-heavy tasks such as Egress or Ingress with transcoding, it’s a great idea to keep an eye on your server’s CPU and memory usage during peak times. If things start to feel tight, scaling up might be the way to go. Please feel free to reach out if you’d like any tips on optimizing your setup or how to monitor your resources effectively—I’m here to help!
a
Copy code
I only want to make calls with Twilio or Telnyx, do I need Egress or Ingress?
``````
t
Great question! You actually don’t need Egress or Ingress to make calls with Twilio or Telnyx in LiveKit. What’s important is setting up SIP trunking for your outbound calls. Here’s a simple way to get started: • First, set up a SIP trunk with your provider, whether that’s Twilio or Telnyx. • Next, configure an outbound trunk within LiveKit. • Then, use the LiveKit SIP API to initiate your calls, which will connect participants to LiveKit rooms where they can interact seamlessly. LiveKit handles SIP calls natively through its SIP integration, so this part is separate from Ingress or Egress. If you’re interested in recording your calls, Egress can be used optionally for that. Please feel free to reach out if you’d like any help with setting up SIP trunking or recording calls—I’m here to assist you every step of the way! Sources: Sources/LiveKit/Protos/livekit_models.pb.swift | Making calls using SIP | LiveKit Docs | Making calls using SIP | LiveKit Docs | SIP Integration | livekit/livekit_composite | DeepWiki
a
yess i want to record my calls and i want to make inbound call not outbound, it change something ?
t
I'm glad you're interested in recording inbound SIP calls with Twilio or Telnyx in LiveKit! To make this happen, you'll want to route the SIP call into a LiveKit room and then use LiveKit’s room recording features. Here’s a simple way to approach it: • Route the SIP call: You’ll need to configure your SIP provider (Twilio or Telnyx) to send calls to your LiveKit SIP URI. Then, set up an inbound trunk and a dispatch rule in LiveKit to direct the call to a specific room. • Enable recording: LiveKit’s Egress feature lets you record the room, capturing all media including the SIP participant’s audio. Once your call is active in the room, you can start recording easily using the LiveKit API or CLI. For example:
Copy code
lk egress start-room-composite \
  --room <room_name> \
  --output file:///path/to/output.mp3
If you'd like, I’m here to help you automate the recording process or guide you through setting up the SIP trunk and dispatch rules. Just let me know! Sources: Integrating with Telephony | LiveKit Docs | Integrating with Telephony | LiveKit Docs