Live Streaming
    Built-in Chat

    Deploy Owncast on a VPS

    Self-host Owncast, a lightweight live streaming and chat server, on a RamNode VPS with systemd, Nginx reverse proxy, and Let's Encrypt TLS.

    Owncast is a lightweight, self-hosted live streaming and chat server. It ships as a single Go binary, so it's the simplest of the three services to deploy.

    Assumptions: Ubuntu 22.04/24.04 VPS, root or sudo access, a domain name (e.g. stream.example.com) with an A record pointed at your VPS's IP.


    1. Initial server prep

    shell
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y curl wget unzip ufw nginx certbot python3-certbot-nginx

    Create a dedicated, unprivileged user to run Owncast:

    shell
    sudo adduser --disabled-password --gecos "" owncast

    2. Configure the firewall

    Owncast needs:

    • 1935/tcp — RTMP ingest (where OBS/streaming software pushes video)
    • 8080/tcp — Owncast's built-in web/admin server (we'll proxy this through Nginx instead of exposing it directly)
    shell
    sudo ufw allow OpenSSH
    sudo ufw allow 'Nginx Full'
    sudo ufw allow 1935/tcp
    sudo ufw enable

    3. Install Owncast

    Switch to the owncast user and run the official installer, which downloads the latest release binary:

    shell
    sudo su - owncast
    curl -s https://owncast.online/install.sh | bash

    This creates /home/owncast/owncast containing the owncast binary and default config. Exit back to your sudo user when done:

    shell
    exit

    4. Create a systemd service

    shell
    sudo nano /etc/systemd/system/owncast.service
    shell
    [Unit]
    Description=Owncast
    After=network.target
    
    [Service]
    Type=simple
    User=owncast
    WorkingDirectory=/home/owncast/owncast
    ExecStart=/home/owncast/owncast/owncast
    Restart=on-failure
    RestartSec=5
    LimitNOFILE=65535
    
    [Install]
    WantedBy=multi-user.target

    Enable and start it:

    shell
    sudo systemctl daemon-reload
    sudo systemctl enable --now owncast
    sudo systemctl status owncast

    By default the web UI listens on port 8080 and RTMP ingest on 1935.

    5. Reverse proxy with Nginx + TLS

    Create /etc/nginx/sites-available/owncast:

    shell
    server {
        listen 80;
        server_name stream.example.com;
    
        location / {
            proxy_pass http://127.0.0.1:8080;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
    
            # Needed for websocket-based chat
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    
        # HLS segments benefit from a large client body/buffer allowance
        client_max_body_size 20M;
    }

    Enable the site and get a certificate:

    shell
    sudo ln -s /etc/nginx/sites-available/owncast /etc/nginx/sites-enabled/
    sudo nginx -t && sudo systemctl reload nginx
    sudo certbot --nginx -d stream.example.com

    Certbot will edit the config to add the listen 443 ssl block and set up auto-renewal.

    6. Configure Owncast

    Visit https://stream.example.com and log into the admin panel at https://stream.example.com/admin (default user: admin, password is generated at first run — check /home/owncast/owncast/owncast.log or the terminal output from step 3 for it, and change it immediately in the admin settings).

    In the admin panel, set:

    • Stream key — a secret used by OBS to authenticate
    • Server name / summary / social links
    • Video encoding presets (adjust based on your VPS's CPU — Owncast transcodes with ffmpeg, which is CPU-bound; a low-core VPS should stick to one or two output resolutions)

    7. Point your streaming software (OBS) at it

    • Server: rtmp://stream.example.com/live
    • Stream key: the key you set in the admin panel

    8. Ongoing maintenance

    • Logs: journalctl -u owncast -f
    • Update: re-run the install script as the owncast user, then sudo systemctl restart owncast
    • Back up /home/owncast/owncast/data (contains your config and database)

    Troubleshooting

    SymptomCheck
    Can't connect via OBSufw status for port 1935, journalctl -u owncast for ingest errors
    Web page loads but stream doesn't startffmpeg CPU usage (top) — you may be transcoding too many qualities for your VPS tier
    502 from Nginxsystemctl status owncast — is the service actually running on 8080?