How to install Owncast v0.0.12 on Ubunto 20.0.4

Install curl

root@server:~# apt-get install curl

Remove Apache

root@server:~# apt-get purge apache2 apache2-utils apache2-bin apache2.2-common

Add a new user

root@server:~# adduser owncast

Switch the user

root@server:~# su owncast

Change directory

owncast@server:/root$ cd

Download Owncast

owncast@server:~$ curl -s | bash

Change directory

owncast@server:~$ cd owncast/

Run Owncast

owncast@server:~/owncast$ ./owncast


Owncast Installer v0.0.12

Created directory  [✓]
Downloaded Owncast v0.0.12 for linux  [✓]
Downloaded ffmpeg because it was not found on your system [✓]

Success! Run owncast by changing to the owncast directory and run ./owncast.
The default port is 8080 and the default streaming key is abc123.
Visit to learn how to configure your new Owncast server.

owncast@server:~$ cd owncast/
owncast@server:~/owncast$ ./owncast
INFO[2022-07-12T20:21:24Z] Owncast v0.0.12-linux-64bit (2d44f8603577bf1eb125447b3894462fa1310960)
INFO[2022-07-12T20:21:24Z] Video transcoder started using x264 with 1 stream variants.
INFO[2022-07-12T20:21:24Z] RTMP is accepting inbound streams on port 1935.
INFO[2022-07-12T20:21:24Z] Web server is listening on IP port 8080.
INFO[2022-07-12T20:21:24Z] The web admin interface is available at /admin.

Exit as user

owncast@server:~/owncast$ exit

Install a couple of packages

root@server:~# apt install nginx python3 python3-venv libaugeas0 ufw -y

Setup certbot

root@server:~# python3 -m venv /opt/certbot/
root@server:~# /opt/certbot/bin/pip install --upgrade pip
root@server:~# /opt/certbot/bin/pip install certbot certbot-nginx
root@server:~# ln -s /opt/certbot/bin/certbot /usr/bin/certbot

Create a certificate

root@server:~# certbot --nginx

Remove the default configuration

root@server:~# rm /etc/nginx/sites-enabled/default

Add a new configuration

root@server:~# vi /etc/nginx/sites-enabled/

With the following content

server {
    listen 80;
    listen [::]:80;
    access_log  /var/log/nginx/;
    error_log   /var/log/nginx/;
    # enforce https
    return 301 https://$server_name$request_uri;

server {
    listen 443 ssl http2;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;

        ssl_certificate /etc/letsencrypt/live/;
        ssl_certificate_key /etc/letsencrypt/live/;


Nginx test

root@server:~# nginx -t

Nginx restart

root@server:~# service nginx restart

Setup the firewall

root@server:~# ufw allow 22/any comment 'SSH'
root@server:~# ufw allow 80/any comment 'HTTP'
root@server:~# ufw allow 443/any comment 'HTTPS'
root@server:~# ufw allow 1935/any comment 'RTMP'
root@server:~# ufw enable

Change directory

root@server:~# cd /etc/systemd/system
root@server:/etc/systemd/system# vi owncast.service

Add a new configuration

Description=Owncast Service



Enable autostart

systemctl enable owncast.service
systemctl start owncast.service

Login to admin

Username: admin
Password: abc123 <-- Needs to be changed

Stream to Owncast with OBS

URL: rtmp://
Key: abc123 <-- Needs to be changed

Leave a Reply

Your email address will not be published. Required fields are marked *