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:
unzipandffmpegmust 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:
-
System Preparation: The system package cache is updated, and
unzipandffmpegare installed viaapt. -
Application Installation: The application is installed by executing the official installation script from the web:
-
Service Configuration: A systemd service unit is created at
/etc/systemd/system/owncast.serviceto manage the application as a background service. -
Proxy Setup: An Nginx container is deployed via Docker Compose in
/root/nginxto handle SSL termination and proxy requests to the application on127.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
rootuser 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
hostnetwork 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.confto include aproxy_passdirective pointing tohttp://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:
Location of configuration files and data¶
-
Application Data:
/root/owncast -
Nginx User Configs:
/data/nginx/user_conf.d -
SSL Certificates: Managed via the
nginx_secretsDocker 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:
To stop the application:
To check the status of the application: