Skip to content

Deployment Overview of Owncast on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the following requirements must be met:

  • Operating System: Ubuntu

  • Privileges: Root or sudo access is required for package installation and service management.

  • Dependencies: unzip and ffmpeg must be installed on the system.

  • Ports:

  • Internal port: 8080 (Application)

  • External port: 443 (HTTPS/Nginx)

FQDN of the final panel on the hostkey.in domain

The application is accessible via a specific subdomain based on the server ID.

Parameter Value
Prefix owncast
Domain hostkey.in
Full template owncast{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

The following directories are used for configuration, application data, and SSL certificates:

  • /root/nginx: Contains the Nginx Docker Compose configuration.

  • /data/nginx/user_conf.d: Stores Nginx virtual host configuration files.

  • /data/nginx/nginx-certbot.env: Environment file for Certbot.

  • /root/owncast: The working directory for the Owncast application.

Application installation process

The installation of Owncast is performed using a combination of package management and an automated installation script:

  1. System Preparation: The system package cache is updated, and unzip and ffmpeg are installed via apt.

  2. Application Installation: The application is installed by executing the official installation script from the web:

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

  3. Service Configuration: A systemd service unit is created at /etc/systemd/system/owncast.service to manage the application as a background service.

  4. Proxy Setup: An Nginx container is deployed via Docker Compose in /root/nginx to handle SSL termination and proxy requests to the application on 127.0.0.1:8080.

Access Rights and Security

  • Firewall: Ensure that port 443 (HTTPS) is open to allow external traffic.

  • Service User: The Owncast service runs under the root user within its working directory /root/owncast.

  • Nginx Configuration: Nginx acts as a reverse proxy, forwarding traffic from the public domain to the internal application port.

Databases

This specific deployment does not utilize an external database container; it relies on the local storage provided by the Owncast installation for data persistence.

Docker Containers and Their Deployment

The deployment utilizes one primary Docker container for web serving and SSL management:

Nginx-Certbot Container

  • Image: jonasal/nginx-certbot:latest

  • Ports: Uses host network mode to bind directly to host ports.

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (External volume for SSL certificates)

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Configuration files)

  • Environment Variables: [email protected]

  • Restart Policy: unless-stopped

Custom Scripts and Additional Setup

The deployment includes several configuration steps performed after the main application is installed:

  • Nginx Configuration Injection: The installation process automatically modifies the Nginx configuration file located in /data/nginx/user_conf.d/owncast{Server_ID_from_Invapi}.hostkey.in.conf to include a proxy_pass directive pointing to http://127.0.0.1:8080.

  • Systemd Integration: A custom service file is created to ensure the application starts automatically on system boot and restarts if it crashes.

Application Update Instructions

To update the Owncast application, you must re-run the installation script:

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

Location of configuration files and data

  • Application Data: /root/owncast

  • Nginx User Configs: /data/nginx/user_conf.d

  • SSL Certificates: Managed via the nginx_secrets Docker volume.

Available ports for connection

Service Port Protocol
Owncast (Internal) 8080 TCP
Nginx (External/HTTPS) 443 TCP

Starting and Stopping the application

The application is managed via systemctl.

To start the application:

systemctl start owncast

To stop the application:

systemctl stop owncast

To check the status of the application:

systemctl status owncast

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×