There are several examples available for launching your own LiveKit server:
- User created guides for FoundryVTT
- LiveKit Getting Started
- Deploy to a VM (GCP/AWS/Digital Ocean/Linode/Vultr/etc)
- Deploy to Kubernetes
This example focuses on launching self-hosted LiveKit server not accessible from the Internet while also providing proper HTTPS, WSS using DNS-01 challenge propagation using awesome acme-dns server.
The contents of this repository were generated using:
docker run --rm -it -v$PWD:/output livekit/generate
And modified to account for an on-premise set-up using:
- owned domain name
- acmedns Caddy plugin
- local DNS server
to provide proper HTTPS/WSS addresses in your local network.
-
Acquire a domain name for which you are be able to create CNAME records.
-
Set up acme-dns:
- For testing purposes, you can use the public server at https://auth.acme-dns.io, refer to acmedns Caddy plugin documentation.
- For a production set-up a self-hosted instance of acme-dns is encouraged, refer to ACME-DNS documentation or a guide by Vykintas Baltrušaitis.
-
Replace
myhost.com
in all files with you domain name. -
Point subdomains using local DNS to the IP address of your server.
-
Replace Livekit API key and secret in all files with your custom one.
-
Use either
init_script.sh
orcloud_init.ubuntu.yaml
for automated set-up of LiveKit server.Note: Make sure that the contens of files that will be created by the
init_script.sh
orcloud_init.ubuntu.yaml
correspond to the ones you modified -caddy.yaml
,acme-dns-cred.json
,livekit.yaml
,ingress.yaml
.Note: For a set-up in a VirtualBox you can refer to these materials: #1, #2.
-
Develop your own LiveKit frontend and add it to the setup. For example:
- Fork LiveKit Meet.
- Add a corresponding Dockerfile to it.
Note: don't forget to copy env.local with the right API key and secret
COPY --from=builder /app/.env.local ./.env.local
- Deploy to Docker Hub.
- Modify
docker-compose.yaml
andcaddy.yaml
to include your frontend.
- Test out WHIP and URL ingress.