livekit deployment docs in aws
# ask-ai
p
livekit deployment docs in aws
t
Thanks for reaching out, arpan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Ready to get LiveKit up and running on AWS? Just follow these simple steps: 1. Generate API Key and Secret: First, create your LiveKit API key and secret by checking out the guide right here. 2. Acquire Domain and SSL Certificate: Grab a domain through AWS Route 53 and get an SSL certificate for your subdomain (like livekit.example-domain.com). 3. Download and Configure Cloud-Config Template: Next, download the Cloud-Config template for Ubuntu from the LiveKit GitHub repo and update it with your API key, secret, SSL certificate, and private key. 4. Launch EC2 Instance: Spin up an Ubuntu Server instance in the AWS EC2 Console, and paste your customized Cloud-Config template into the "User data" field under "Advanced Details." 5. Configure Security Group: Make sure to open these ports in your Security Group: TCP 22 (SSH), TCP 443 (HTTPS), TCP 7880 (LiveKit Server), TCP 7881 (TURN over TCP), and UDP 7882 (TURN over UDP). 6. Create DNS A Record: Point your subdomain to your EC2 instance’s public IP using Route 53. 7. Verify Deployment: Give it a quick test with the LiveKit Connection Tester right here. You can also generate a LiveKit token and try out the connection using the React Example app here. If you’re thinking about more advanced setups, like multiple instances or Kubernetes, the official LiveKit deployment guide has you covered right here. And hey, if you want a hand setting up your SSL certificate with Let’s Encrypt, just give me a shout—I’m happy to help! Sources: Running LiveKit on AWS
p
how to deploy with fastapi
t
Hey there! While there isn't a specific guide for deploying LiveKit with FastAPI just yet, you can definitely get LiveKit up and running using some common methods like these: 1. Deploying to a VM 2. Deploying to Kubernetes After you've got LiveKit set up, it’s pretty straightforward to connect it with your FastAPI app using LiveKit's SDKs and APIs. For step-by-step deployment help, you might find these guides super useful: • VM Deployment GuideKubernetes Deployment Guide If you hit any bumps along the way or have any specific questions, just give me a shout—I’m here to help! Sources: README.md
p
example of docker
t
Here’s a handy example of how you can deploy LiveKit using Docker with Docker Compose:
Copy code
services:
  redis:
    image: redis
    volumes:
      - redis_data:/data
    ports:
      - 6379:6379
  livekit:
    image: livekit/livekit-server
    command: --dev --redis-host localhost:6379
    network_mode: host
    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
        logging:
          level: debug
volumes:
  redis_data:
Here’s how to get it up and running: 1. Create a
docker-compose.yaml
file and pop the above content in it. 2. Run your services with this command:
docker compose up
. This will start a local LiveKit Server and SIP Server connected to Redis. Just make sure you have Docker and Docker Compose installed, and that the necessary ports (like 5060 and 10000-20000) are open and ready to go. If you want to dive deeper or need help with more advanced setups, just give me a shout—I’m here to help!
p
add fastapi and docker full code
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!