Deployment / Deploy to a VM
This guide helps you to set up LiveKit server on a virtual machine on AWS EC2 or Digital Ocean.
To start, you'll need:
This is the easiest method for deploying LiveKit Server. You can deploy a LiveKit Server using a vanilla Linux image and Cloud Init configuration file.
LiveKit Server can be deployed with either Amazon Linux 2 or Ubuntu. Use the cloud-init.<platform>.yaml
file corresponding to your desired platform:
Steps:
cloud-init.<platform>.yaml
files. Edit it to include your LiveKit Server configuration, SSL certificate, and SSL private key.cloud-init.yaml
file from step 1 into the "User data" field, under the "Advanced Details" section.Steps:
cloud-init.ubuntu.yaml
file from step 1 into the "User data" field, under the "Advanced Details" section.In addition to the required ports listed above, you'll also want to open up the following ports:
If something is not working as expected, SSH in to your server and use the following commands to investigate:
systemctl status docker.servicesystemctl status nginx.servicesystemctl status [email protected]tail /var/log/nginx/access.logtail /var/log/nginx/error.log
When using cloud-init, it's possible that the instance started up before networking was available to the machine. This is commonly the case on EC2 instances. When this happens, your cloud-init scripts will be stuck in a bad state. To fix this, you can SSH into the machine and trigger a re-run:
sudo cloud-init clean --logssudo reboot now
Previous
Deploying LiveKit
Up Next
Deploy to Kubernetes