{"id":20398748,"url":"https://github.com/bcambl/rtmpauthbot","last_synced_at":"2025-08-24T16:11:26.672Z","repository":{"id":46341866,"uuid":"264499271","full_name":"bcambl/rtmpauthbot","owner":"bcambl","description":"A simple publish authentication API for nginx rtmp module","archived":false,"fork":false,"pushed_at":"2021-10-30T01:04:06.000Z","size":135,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T05:37:23.699Z","etag":null,"topics":["authentication","hacktoberfest","nginx-rtmp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcambl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-16T18:19:43.000Z","updated_at":"2023-09-16T20:49:18.000Z","dependencies_parsed_at":"2022-08-22T11:40:39.601Z","dependency_job_id":null,"html_url":"https://github.com/bcambl/rtmpauthbot","commit_stats":null,"previous_names":["bcambl/rtmpauthd","bcambl/rtmpauth"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/bcambl/rtmpauthbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Frtmpauthbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Frtmpauthbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Frtmpauthbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Frtmpauthbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcambl","download_url":"https://codeload.github.com/bcambl/rtmpauthbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcambl%2Frtmpauthbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271901227,"owners_count":24841115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","hacktoberfest","nginx-rtmp"],"created_at":"2024-11-15T04:23:55.967Z","updated_at":"2025-08-24T16:11:26.629Z","avatar_url":"https://github.com/bcambl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"rtmpauthbot\n===========\n\n`rtmpauthbot` is an authentication \u0026 notification system to be used along side the nginx rtmp module.\n\n## Background\n`rtmpauthbot` was built to provide a small Discord community with a private rtmp server with a simple authentication mechanism and basic notifications for when members start and stop streaming.\n\nEach member may also have a twitch channel configured which differs from their discord/publisher user name. When a twitch channel is defined for a member, notifications will be posted when the twitch stream is live/off-line. This functionality can also serve as general twitch notifications for favorite streamers of the discord community.\n\n## Features\n- Authentication system for NGiNX RTMP module\n- Discord channel notifications\n- Twitch stream notifications\n- HTTP REST user management\n- Embedded database\n- Single binary deployment\n\n## Configuration\nThe project is configured with environment variables.\n\n1. Create a local copy of the environment variable file\n    ```\n    mkdir /etc/rtmpauthbot\n    rtmpauthbot -environment \u003e /etc/rtmpauthbot/rtmpauthbot.env\n    ```\n2. Update the variables to suit your needs\n\n## Install Service\nInstallation documentation WIP\n\nTL;DR - compile project to a binary and either setup as a service with `systemd` or deploy the project in a container. Ensure all environment variables are configured from the previous section of this document.\n\n\nA basic systemd unit-file can be generated with the following command\n```\nrtmpauthbot -unitfile \u003e /etc/systemd/system/rtmpauthbot.service\nsystemctl daemon-reload\n```\n\n## Managing RTMP Publishers\nUser management can be performed with some basic REST calls. You can either interact with `rtmpauthbot` using your favorite REST client or build a custom application around the API. For the sake of simplicity, the following examples will be demonstrated using the `curl` command.  \n\n### Adding/Updating a publisher\n```\ncurl -X POST -d '{\"name\": \"discord_username\", \"key\": \"private_rtmp_stream_key\"}' http://127.0.0.1:9090/api/publisher\n```\nexpected response status code: `204`\n\nOptionally, If a user would also like to provide notifications for their public twitch stream:\n```\ncurl -X POST -d '{\"name\": \"discord_username\", \"key\": \"private_rtmp_stream_key\", \"twitch_stream\": \"twitch_username\"}' http://127.0.0.1:9090/api/publisher\n```\nexpected response status code: `204`\n\n### Retrieve all publishers\n```\ncurl http://127.0.0.1:9090/api/publisher\n```\n\nexpected response status code: `200`\n```\n[\n  {\n    \"name\": \"discord_username\",\n    \"key\": \"abcdefghijklmnopqrstuvwxyz0123456789\",\n    \"twitch_stream\": \"twitch_username\"\n  }\n]\n```\n\n### Retrieve a single publisher\n```\ncurl http://127.0.0.1:9090/api/publisher?name=discord_username\n```\n\nexpected response status code: `200`\n```\n{\n    \"name\": \"discord_username\",\n    \"key\": \"abcdefghijklmnopqrstuvwxyz0123456789\",\n    \"twitch_stream\": \"twitch_username\"\n}\n```\n\n### Deleting a publisher\n```\ncurl -X DELETE -d '{\"name\": \"discord_username\"}' http://127.0.0.1:9090/api/publisher\n```\n\nexpected response status code: `204`\n\n## Build From Source\nIf you would rather compile the project from source, please install the latest version of the Go programming language  [here](https://golang.org/dl/).\n```\nGOOS=linux GOARCH=amd64 go build -ldflags=\"-s -w\" -o rtmpauthbot main.go\n```\n\n## Security considerations\nWhile it is possible to run this service on a different host, it is intended to run on the same host/container pod as nginx and communicate via localhost. Due to this assumption, the `rtmpauthbot` service should NOT be publicly accessible or firewall rules should be configured to only allow connection from the nginx host/container.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcambl%2Frtmpauthbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcambl%2Frtmpauthbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcambl%2Frtmpauthbot/lists"}