Skip to content

Deploy Janus on Linode

Lim Meng Kiat edited this page Oct 10, 2025 · 8 revisions

Install

On Ubuntu 24.04

sudo apt-get update
sudo apt-get install janus janus-demos

This will install janus v1.1.2-1build5 and it's corresponding demo files. Send a POST request to check that it is running:

curl -X POST -H "Content-Type: application/json" -d '{"janus":"info", "transaction": ""}' localhost:8088/janus

Expected results: image

Useful Info:

  • Configuration files in /etc/janus
  • Demo files in /usr/share/janus/demos

Configure Janus to use stun server. If I don't do this, intermittently Janus might not reply with an answer after I send an offer.

sudo vim /etc/janus/janus.jcfg
# In nat section add the following stun server
# nat: {
#       stun_server = "stun.l.google.com"
#       stun_port=19302
#       nice_debug = false
#       #full_trickle = true
#       #ice_lite = true
#       #ice_tcp = true
# }
# Save the file and then restart janus
sudo systemctl restart janus

Serve Janus to public

Directly serve it on public IP. Edit /etc/janus/janus.jcfg and set interface = "0.0.0.0":

image

Configure firewall to open port for Janus.

image

Serve Janus demos

Install nginx to serve static files for janus demos.

sudo apt-get install nginx
curl 0.0.0.0  # This should return some html

sudo vim /etc/nginx/sites-enabled/default
# Configure to set root to /usr/share/janus/demos
# Finally restart nginx
sudo systemctl restart nginx
curl 0.0.0.0  # This should return some longer html with the title "About Janus"
image

Use Certbot to setup SSL.

sudo apt update
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com

Configure

These are configurations done for this Python client test server. We do not configure HTTPS because that is a transport specific feature. We test Websockets as a convenience for users, but also don't test Websockets Secure.

In /etc/janus/janus.jcfg:

  • Set interface to "0.0.0.0"
  • Set apisecret
  • Enable token_auth
  • Set admin_secret

In /etc/janus/janus.transport.http.jcfg:

  • Set base_path
  • Set http to true
  • Set https to false
  • Set port
  • Set admin_base_path, admin_http, admin_port and admin_https
  • Ignore certificates

In /etc/janus/janus.transport.websockets.jcfg:

  • Set ws to true
  • Set wss to false
  • Set port
  • Set admin_ws, admin_ws_port and admin_wss
  • Ignore certificates

Clone this wiki locally