Files
livekit/deploy/cloud-init.ubuntu.yaml
2022-01-21 14:28:03 -08:00

41 lines
1.1 KiB
YAML

#cloud-config
package_update: true
package_upgrade: all
packages:
- docker.io
- nginx
bootcmd:
- mkdir /opt/livekit-server/ssl
write_files:
- path: /opt/livekit-server/config.yaml
content: |
log_level: info
port: 7880
rtc:
use_external_ip: true
tcp_port: 7881
udp_port: 7882
keys:
APIkey: secret
- path: /opt/livekit-server/ssl/server.crt
content: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
- path: /opt/livekit-server/ssl/server.key
content: |
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
runcmd:
- export LIVEKIT_VERSION=v0.15 # set LiveKit version
- curl -o /etc/systemd/system/docker.livekit-server@.service -O https://raw.githubusercontent.com/livekit/livekit-server/master/deploy/docker.livekit-server%40.service
- systemctl enable docker.livekit-server@${LIVEKIT_VERSION}
- systemctl start docker.livekit-server@${LIVEKIT_VERSION}
- curl -o /etc/nginx/conf.d/livekit.conf -O https://raw.githubusercontent.com/livekit/livekit-server/master/deploy/livekit.nginx.conf
- systemctl restart nginx