From 1f8567cb7e896b9d60b9c3137b02a4ea964e7759 Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 08:32:41 +0100 Subject: [PATCH 1/6] Create egg-owncast-online.json egg Add an egg for https://owncast.online. Could do with an addition to the install script to scrape and find latest version instead of set version. --- software/owncast/egg-owncast-online.json | 59 ++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 software/owncast/egg-owncast-online.json diff --git a/software/owncast/egg-owncast-online.json b/software/owncast/egg-owncast-online.json new file mode 100644 index 00000000..30cff998 --- /dev/null +++ b/software/owncast/egg-owncast-online.json @@ -0,0 +1,59 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1", + "update_url": null + }, + "exported_at": "2022-03-31T08:25:53+01:00", + "name": "owncast.online", + "author": "psychoalex@thevcbc.com", + "description": "Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.", + "features": null, + "images": [ + "ghcr.io\/pterodactyl\/yolks:debian" + ], + "file_denylist": [], + "startup": ".\/owncast -webserverport {{SERVER_PORT}} -rtmpport {{RTMP_PORT}} -streamkey {{STREAM_KEY}}", + "config": { + "files": "{}", + "startup": "{\r\n \"done\": \"The web admin interface is available at \/admin.\"\r\n}", + "logs": "{}", + "stop": "^C" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/bash\r\n\r\n#Make Server Dir\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\ncd \/mnt\/server\/\r\n\r\n#Get Dependencies\r\napt-get -y update\r\napt-get -y install curl unzip tar\r\n\r\n#Get Owncast Install Files\r\ncurl -L https:\/\/github.com\/owncast\/owncast\/releases\/download\/v${OWNCAST_VERSION}\/owncast-${OWNCAST_VERSION}-linux-64bit.zip --output .\/owncast_installer.zip\r\n\r\n#Unzip Install Files\r\nunzip -o -q .\/owncast_installer.zip\r\nrm .\/owncast_installer.zip", + "container": "debian:buster-slim", + "entrypoint": "bash" + } + }, + "variables": [ + { + "name": "RTMP Port", + "description": "The port that is used to receive the stream data.", + "env_variable": "RTMP_PORT", + "default_value": "1935", + "user_viewable": true, + "user_editable": false, + "rules": "required|integer" + }, + { + "name": "Stream\/Admin Key", + "description": "This is used to authenticate to the web admin interface, as well as to authenticate your stream.", + "env_variable": "STREAM_KEY", + "default_value": "", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|min:32|max:128" + }, + { + "name": "Owncast Version", + "description": "The version of Owncast that you would like to install, from https:\/\/github.com\/owncast\/owncast\/releases", + "env_variable": "OWNCAST_VERSION", + "default_value": "0.0.11", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20" + } + ] +} From fbf314b180ee0b16d454cc919e31f3014bedb12f Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 08:37:00 +0100 Subject: [PATCH 2/6] Update README.md to include Owncast --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index bbed6550..2dd312ec 100644 --- a/README.md +++ b/README.md @@ -303,3 +303,7 @@ If you are reading this it looks like you are looking to add an egg to your serv ### RabbitMQ * [rabbitmq](/software/rabbitmq) + +### Owncast + +* [owncast](/software/owncast) From b94c6f4f8a7bcf98891306dec5d96ca2885b279c Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 08:45:36 +0100 Subject: [PATCH 3/6] Create Owncast README.md --- software/owncast/README.md | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 software/owncast/README.md diff --git a/software/owncast/README.md b/software/owncast/README.md new file mode 100644 index 00000000..6d2ea6f6 --- /dev/null +++ b/software/owncast/README.md @@ -0,0 +1,51 @@ +# Owncast + +## From the [Owncast](https://owncast.online) website + +Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software. + +## Installation + +Follow the common egg installation guide to install the egg on your Pterodactyl instance. +When setting up a server, the version set in the varaible will be used, default is 0.0.11. + +## Configuration + +Configuring Owncast in Pterodactyl can be done by using the command line switches: +* -backupdir string + * Directory where backups will be written to +* -database string + * Path to the database file. +* -enableDebugFeatures + * Enable additional debugging options. +* -enableVerboseLogging + * Enable additional logging. +* -logdir string + * Directory where logs will be written to +* -restoreDatabase string + * Restore an Owncast database backup +* -rtmpport int + * Set listen port for the RTMP server +* -streamkey string + * Set your stream key/admin password +* -webserverip string + * Force web server to listen on this IP address +* -webserverport string + * Force the web server to listen on a specific port + + + +## Update support + +The egg _should_ keep the `data` folder when reinstalling, to prevent destroying the configuration by accident. + +If you want to reset the server completly, remove the `data` directory manually before reinstalling. + +### Server Ports + +Ports required to run the server in a table format. + +| Port | default | +| --------------- | ------- | +| Webserver | 8080 | +| RTMP | 1935 | From 33c34e76475dd76b07547d07e003c3fed22bb3b7 Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:05:13 +0100 Subject: [PATCH 4/6] Update README.md --- software/owncast/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/owncast/README.md b/software/owncast/README.md index 6d2ea6f6..a1262166 100644 --- a/software/owncast/README.md +++ b/software/owncast/README.md @@ -47,5 +47,5 @@ Ports required to run the server in a table format. | Port | default | | --------------- | ------- | -| Webserver | 8080 | -| RTMP | 1935 | +| Webserver | 8090 | +| RTMP | 8091 | From 1200e4aeb182ff7074032ba2d84ada7b7ab05bbd Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:06:04 +0100 Subject: [PATCH 5/6] Update default port --- software/owncast/egg-owncast-online.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/owncast/egg-owncast-online.json b/software/owncast/egg-owncast-online.json index 30cff998..59f0025f 100644 --- a/software/owncast/egg-owncast-online.json +++ b/software/owncast/egg-owncast-online.json @@ -32,7 +32,7 @@ "name": "RTMP Port", "description": "The port that is used to receive the stream data.", "env_variable": "RTMP_PORT", - "default_value": "1935", + "default_value": "8091", "user_viewable": true, "user_editable": false, "rules": "required|integer" From 424d230c7c746f50886651a1f33803d63b171127 Mon Sep 17 00:00:00 2001 From: PsychoZander <62998704+PsychoZander@users.noreply.github.com> Date: Thu, 31 Mar 2022 11:33:10 +0100 Subject: [PATCH 6/6] Updated to add git release script --- software/owncast/egg-owncast-online.json | 46 +++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/software/owncast/egg-owncast-online.json b/software/owncast/egg-owncast-online.json index 59f0025f..f134c898 100644 --- a/software/owncast/egg-owncast-online.json +++ b/software/owncast/egg-owncast-online.json @@ -4,7 +4,7 @@ "version": "PTDL_v1", "update_url": null }, - "exported_at": "2022-03-31T08:25:53+01:00", + "exported_at": "2022-03-31T11:32:42+01:00", "name": "owncast.online", "author": "psychoalex@thevcbc.com", "description": "Owncast is a self-hosted live video and web chat server for use with existing popular broadcasting software.", @@ -22,7 +22,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/bash\r\n\r\n#Make Server Dir\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\ncd \/mnt\/server\/\r\n\r\n#Get Dependencies\r\napt-get -y update\r\napt-get -y install curl unzip tar\r\n\r\n#Get Owncast Install Files\r\ncurl -L https:\/\/github.com\/owncast\/owncast\/releases\/download\/v${OWNCAST_VERSION}\/owncast-${OWNCAST_VERSION}-linux-64bit.zip --output .\/owncast_installer.zip\r\n\r\n#Unzip Install Files\r\nunzip -o -q .\/owncast_installer.zip\r\nrm .\/owncast_installer.zip", + "script": "#!\/bin\/bash\r\n\r\n#Make Server Dir\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\ncd \/mnt\/server\/\r\n\r\n#Get Dependencies\r\napt-get -y update\r\napt-get -y install curl unzip tar jq\r\n\r\n#Get Owncast Install Files\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"user and oauth token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\r\necho Download URL is: ${DOWNLOAD_URL}\r\n\r\ncurl -L ${DOWNLOAD_URL} --output .\/owncast_installer.zip\r\n\r\n#curl -L https:\/\/github.com\/owncast\/owncast\/releases\/download\/v${OWNCAST_VERSION}\/owncast-${OWNCAST_VERSION}-linux-64bit.zip --output .\/owncast_installer.zip\r\n\r\n#Unzip Install Files\r\nunzip -o -q .\/owncast_installer.zip\r\nrm .\/owncast_installer.zip", "container": "debian:buster-slim", "entrypoint": "bash" } @@ -48,12 +48,48 @@ }, { "name": "Owncast Version", - "description": "The version of Owncast that you would like to install, from https:\/\/github.com\/owncast\/owncast\/releases", - "env_variable": "OWNCAST_VERSION", - "default_value": "0.0.11", + "description": "The version of Owncast that you would like to install, from https:\/\/github.com\/owncast\/owncast\/releases\r\nAs an Example - \"v0.0.11\" for a specific version or \"latest\" for the most up to date version.", + "env_variable": "VERSION", + "default_value": "latest", "user_viewable": true, "user_editable": true, "rules": "required|string|max:20" + }, + { + "name": "Github Repository", + "description": "Used to identify the github repository to pull the release from.", + "env_variable": "GITHUB_PACKAGE", + "default_value": "owncast\/owncast", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|max:120" + }, + { + "name": "Github File Match", + "description": "Used to identify the specific asset under a release for download.", + "env_variable": "MATCH", + "default_value": "linux-64bit", + "user_viewable": false, + "user_editable": false, + "rules": "required|string|max:20" + }, + { + "name": "Github User", + "description": "Required if you are doing more calls than the github anonymous API user allows.", + "env_variable": "GITHUB_USER", + "default_value": "", + "user_viewable": false, + "user_editable": false, + "rules": "nullable|string|max:20" + }, + { + "name": "Github Oauth Token", + "description": "Required if you are doing more calls than the github anonymous API user allows.", + "env_variable": "GITHUB_OAUTH_TOKEN", + "default_value": "", + "user_viewable": false, + "user_editable": false, + "rules": "nullable|string|max:128" } ] }