Skip to content

Instantly share code, notes, and snippets.



Last active Aug 24, 2020
What would you like to do?
nc_secret="$(openssl rand -hex 16)"
janus_api_key="$(openssl rand -base64 16)"
cat > /tmp/script.conf << EOF
listen =
debug = false
hashkey = $(openssl rand -hex 16)
blockkey = $(openssl rand -hex 16)
internalsecret = $(openssl rand -hex 16)
allowed = ${NC_DOMAIN}
allowall = false
secret = ${nc_secret}
timeout = 10
connectionsperhost = 8
url = nats://localhost:4222
type = janus
url = ws://
apikey = ${janus_api_key}
# probably we can get the settings from ourselves as we are installing coturn.
# do we know about the secret in some variable?
secret = ${turn_secret}
# do we know about the domain and the endpoint in some variable?
# looks like:
servers = ${turn_server}
sed -i 's,#turn_rest_api_key\s*=.*,turn_rest_api_key = "'"${janus_api_key}"'",' /etc/janus/janus.jcfg.dpkg-dist
systemctl restart janus
echo "enter nc secret into your talk settings: ${nc_secret}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment