How to Install Spreed WebRTC Server on Ubuntu 16.04

Spreed is a free open-source (AGPL) WebRTC audio/video call and conferencing server designed with privacy in mind. WebRTC is a free and open technology allows browsers to talk to each other in a peer-to-peer fashion. Spreed WebRTC server uses end-to-end encryption to protect users’ privacy and security.

Spreed WebRTC allows you to do the following things.

  • Secure audio, video and text chat
  • Web conferencing
  • One to one video chat

This tutorial is going to show you how to install Spreed WebRTC server on Ubuntu 16.04 VPS or dedicated server.

Install Spreed WebRTC Server on Ubuntu 16.04 from official PPA

We can easily install Spreed WebRTC server from official PPA on Ubuntu 16.04.

sudo apt-add-repository ppa:strukturag/spreed-webrtc

sudo apt update

sudo apt install spreed-webrtc

Once installed, spreed-webtrc will be automatically started and its built-in web server listens on You can check its status with:

systemctl status spreed-webrtc


 spreed-webrtc.service - Spreed WebRTC server
   Loaded: loaded (/lib/systemd/system/spreed-webrtc.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-12-13 02:28:18 EST; 3min 0s ago
 Main PID: 925 (spreed-webrtc-s)
    Tasks: 5
   Memory: 1.1M
      CPU: 14ms
   CGroup: /system.slice/spreed-webrtc.service
           └─925 /usr/sbin/spreed-webrtc-server -c /etc/spreed/webrtc.conf -l /var/log/spreed/webrtc/server.log

If it isn’t running, then manually start it with:

sudo systemctl start spreed-webrtc

And also enable auto start at boot time:

sudo systemctl enable spreed-webrtc

The main configuration file is /etc/spreed/webrtc.conf.

Setting Up Nginx Reverse Proxy

Spreed WebRTC by default listens on localhost. To access the web interface from a browser, we need to set up a reverse proxy for it using Nginx or Apache.

If you use Nginx, follow these instructions. 

First, install Nginx.

sudo apt install nginx

Then create a server block file for Spreed WebRTC.

sudo nano /etc/nginx/conf.d/spreed-webrtc.conf

Put the following text into the file. Replace with your preferred domain name and don’t forget to set an A record.

server {
        listen 80;
        location / {
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

                proxy_buffering             on;
                proxy_ignore_client_abort   off;
                proxy_redirect              off;
                proxy_connect_timeout       90;
                proxy_send_timeout          90;
                proxy_read_timeout          90;
                proxy_buffer_size           4k;
                proxy_buffers               4 32k;
                proxy_busy_buffers_size     64k;
                proxy_temp_file_write_size  64k;
                proxy_next_upstream         error timeout invalid_header http_502 http_503 http_504;

        location ~ /.well-known/acme-challenge {
             root /usr/share/nginx/spreed/;
             allow all;

Save and close the file. Then test Nginx configurations and reload.

sudo nginx -t

sudo systemctl reload nginx

Now you should be able to access Spreed WebRTC via a domain name from web browser.

spreed webrtc server

Setting Up Apache Reverse Proxy

If you use Apache, following these instructions.

Install Apache web server.

sudo apt install apache2

Then create a virtual host file for Spreed.

sudo nano /etc/apache2/sites-available/spreed-webrtc.conf

Put the following text into the file. Replace with your preferred domain name and don’t forget to set an A record.

<VirtualHost *:80>
    <Location />

    <Location /ws>
       ProxyPass ws://
    ProxyVia On
    ProxyPreserveHost On

Save and close the file.  Then we need to enable proxy_http module.

sudo a2enmod proxy_http

Next, enable this virtual host.

sudo a2ensite spreed-webrtc.conf

Test configurations and reload Apache

sudo apachectl configtest

sudo systemctl reload apache2

Now you should be able to access Spreed WebRTC via a domain name from web browser.

spreed webrtc server

Enabling HTTPS

To obtain a TLS certificate and encrypt your communication with Spreed WebRTC, please see the following article.

That’s it!

I hope this tutorial helped you install Spreed WebRTC server on Ubuntu 16.04. As always, if you found this post useful, then subscribe to our free newsletter. You can also follow us on Google+ Twitter or like our Facebook page.

Rate this tutorial
[Total: 17 Average: 3.5]

6 Responses to “How to Install Spreed WebRTC Server on Ubuntu 16.04

  • Tjarko Tjaden
    2 years ago

    Hi, great tutorial! But for me it doesnt work completely.
    — In installed Ubuntu 16.04 with your tutorial with LAMP (with MariaDB) and Nextcloud
    — now, i followed this tutorial

    Problem: look at
    without and with enables SSL cert the site doesnt load completely and “initialisiere” stays 🙁

    Do you know this issue?

  • I’m developing mobile app, Can you please guide me how can i start with WebRTC which can also provide support for iOs and Android?

  • Vaibhav Gupta
    1 year ago

    Is it same as Stun/Turn server. i wanted to host on for my rocket chat server.

  • Hi!

    I installed but the calls don’t work camera and microphone …

  • Can you please guide how to install on ubuntu 18.04 server.

  • Hi,

    I have installed spreed webrtc by document which i got in internet,below link i have follewed

    I have tried both apache2 and nginx reverse proxy servers,but when i enter my domain name in web url,I am getting site cant reached.

    I set ServerName is in apache2

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community ( for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB.
You can upload: image.